]> git.droids-corp.org - dpdk.git/commitdiff
net/cnxk: support Rx interrupt
authorSunil Kumar Kori <skori@marvell.com>
Wed, 23 Jun 2021 04:46:41 +0000 (10:16 +0530)
committerJerin Jacob <jerinj@marvell.com>
Tue, 29 Jun 2021 23:08:04 +0000 (01:08 +0200)
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
doc/guides/nics/features/cnxk.ini
doc/guides/nics/features/cnxk_vec.ini
doc/guides/nics/features/cnxk_vf.ini
drivers/net/cnxk/cnxk_ethdev.c
drivers/net/cnxk/cnxk_ethdev.h
drivers/net/cnxk/cnxk_ethdev_ops.c

index d9365ffc13fa6e42c4b733df0aa54ac6628c5ac8..14b6cb9b5ad5d0d483f4f2717fc5517473ba6310 100644 (file)
@@ -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
 -------------
index b1e86414bdda1e19d5b0d295b8d2812c90f34eb0..e5669f56b82e1e238eaed09cc6a840e183fe51b5 100644 (file)
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Rx interrupt         = Y
 Lock-free Tx queue   = Y
 SR-IOV               = Y
 Multiprocess aware   = Y
index 0f996344678fb790ede8d7c4bf4e0cabf498bb70..dff0c9b7610c444a875fc1dad90acc9dd2e9d1f8 100644 (file)
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Rx interrupt         = Y
 Lock-free Tx queue   = Y
 SR-IOV               = Y
 Multiprocess aware   = Y
index cecced95d3956e241458b0c4ab3be0bd287ef5d3..b950d2f4297755a14831036b81f71630d445f034 100644 (file)
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Rx interrupt         = Y
 Lock-free Tx queue   = Y
 Multiprocess aware   = Y
 Link status          = Y
index 165c35477aa43c0bd9f0d21385196411ef57e566..1ff3afa93047b7bd29cf7fda48adca99526ba068 100644 (file)
@@ -1193,6 +1193,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
index 083af2924e0b20d6a81e05435a51a0ca5b85ef6e..a01b72a5acaffa9aedcdacdb13fda4af5e70293d 100644 (file)
@@ -257,6 +257,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,
index 55b0411e6cf83748a7ee510b9665788d3a2c2012..45683dd31283dde41970c15b0afc187152ef5d82 100644 (file)
@@ -598,3 +598,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;
+}