From: Sunil Kumar Kori <skori@marvell.com>
Application may choose to enable/disable interrupts on Rx queues
so that application can select its processing if no packets are
available on queues for a longer period.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
doc/guides/nics/cnxk.rst | 1 +
doc/guides/nics/features/cnxk.ini | 1 +
doc/guides/nics/features/cnxk_vec.ini | 1 +
doc/guides/nics/features/cnxk_vf.ini | 1 +
drivers/net/cnxk/cnxk_ethdev.c | 2 ++
drivers/net/cnxk/cnxk_ethdev.h | 4 ++++
drivers/net/cnxk/cnxk_ethdev_ops.c | 19 +++++++++++++++++++
7 files changed, 29 insertions(+)
@@ -30,6 +30,7 @@ Features of the CNXK Ethdev PMD are:
- MTU update
- Scatter-Gather IO support
- Vector Poll mode driver
+- Support Rx interrupt
Prerequisites
-------------
@@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
+Rx interrupt = Y
Lock-free Tx queue = Y
SR-IOV = Y
Multiprocess aware = Y
@@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
+Rx interrupt = Y
Lock-free Tx queue = Y
SR-IOV = Y
Multiprocess aware = Y
@@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
+Rx interrupt = Y
Lock-free Tx queue = Y
Multiprocess aware = Y
Link status = Y
@@ -1164,6 +1164,8 @@ struct eth_dev_ops cnxk_eth_dev_ops = {
.dev_set_link_down = cnxk_nix_set_link_down,
.get_module_info = cnxk_nix_get_module_info,
.get_module_eeprom = cnxk_nix_get_module_eeprom,
+ .rx_queue_intr_enable = cnxk_nix_rx_queue_intr_enable,
+ .rx_queue_intr_disable = cnxk_nix_rx_queue_intr_disable,
};
static int
@@ -242,6 +242,10 @@ int cnxk_nix_get_module_info(struct rte_eth_dev *eth_dev,
struct rte_eth_dev_module_info *modinfo);
int cnxk_nix_get_module_eeprom(struct rte_eth_dev *eth_dev,
struct rte_dev_eeprom_info *info);
+int cnxk_nix_rx_queue_intr_enable(struct rte_eth_dev *eth_dev,
+ uint16_t rx_queue_id);
+int cnxk_nix_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,
+ uint16_t rx_queue_id);
int cnxk_nix_configure(struct rte_eth_dev *eth_dev);
int cnxk_nix_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
@@ -592,3 +592,22 @@ cnxk_nix_get_module_eeprom(struct rte_eth_dev *eth_dev,
rte_memcpy(info->data, eeprom_info.buf + info->offset, info->length);
return 0;
}
+
+int
+cnxk_nix_rx_queue_intr_enable(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
+{
+ struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+
+ roc_nix_rx_queue_intr_enable(&dev->nix, rx_queue_id);
+ return 0;
+}
+
+int
+cnxk_nix_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,
+ uint16_t rx_queue_id)
+{
+ struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+
+ roc_nix_rx_queue_intr_disable(&dev->nix, rx_queue_id);
+ return 0;
+}