net/bnxt: set rxq interrupt config to 0
PATCH 1/1 net/bnxt: set rxq interrupt config to 0
Set rxq interrupt config to 0 instead of 1. Applications can set the rxq interrupt config to 1 or 0 as needed. If an application is not interested in handling Rx interrupts and prefers to poll Rx rings, there is no need for the PMD to set this config option to 1.
--- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +1 -1
@@ -1011,7 +1011,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, }; eth_dev->data->dev_conf.intr_conf.lsc =1 ; - eth_dev->data->dev_conf.intr_conf.rxq =1 ; + eth_dev->data->dev_conf.intr_conf.rxq =0 ; dev_info->rx_desc_lim.nb_min =BNXT_MIN_RING_DESC ; dev_info->rx_desc_lim.nb_max =BNXT_MAX_RX_RING_DESC ; dev_info->tx_desc_lim.nb_min =BNXT_MIN_RING_DESC ;
Signature · 1 line
2.21.1 (Apple Git-122.3)
Quoted 18 lines · Ajit Khaparde
Set rxq interrupt config to 0 instead of 1. Applications can set the rxq interrupt config to 1 or 0 as needed. If an application is not interested in handling Rx interrupts and prefers to poll Rx rings, there is no need for the PMD to set this config option to 1.
Signed-off-by Ajit Khaparde <[email protected]>Reviewed-by Lance Richardson <[email protected]>--- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/bnxt/bnxt_ethdev.c +0
-0
drivers/net/bnxt/bnxt_ethdev.c static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, · line 1014
Quoted 5 lines
drivers/net/bnxt/bnxt_ethdev.c +1
-1@@ -1011,7 +1011,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, }; eth_dev->data->dev_conf.intr_conf.lsc =1 ; - eth_dev->data->dev_conf.intr_conf.rxq =1 ; + eth_dev->data->dev_conf.intr_conf.rxq =0 ;
The application passes a dev_conf structure at configure time. This structure configures many features, like rx interrupts. Resetting anything from this configuration in the get_infos op is wrong, be it 1 or 0.
Idem with LSC.
I don't think enabling LSC works as expected, because this driver does not report the RTE_ETH_DEV_INTR_LSC capability.
Which leads me to a question for ethdev maintainers.
I am surprised we don't have a capability for rx interrupts, is this feature advertised through another way than device flags?
Signature · 1 line
David Marchand
Quoted 25 lines · David Marchand
Quoted 7 lines · Ajit Khaparde
Set rxq interrupt config to 0 instead of 1. Applications can set the rxq interrupt config to 1 or 0 as needed. If an application is not interested in handling Rx interrupts and prefers to poll Rx rings, there is no need for the PMD to set this config option to 1.
Review
Quoted 7 lines
Signed-off-by Ajit Khaparde <[email protected]>Reviewed-by Lance Richardson <[email protected]>--- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/net/bnxt/bnxt_ethdev.cdrivers/net/bnxt/bnxt_ethdev.c static int bnxt_dev_info_get_op(struct rte_eth_dev
Quoted 4 lines
index
495c6cd21e..bef9605fed100644drivers/net/bnxt/bnxt_ethdev.c +0
-0@@ -1011,7 +1011,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev
*eth_dev,Quoted 3 lines
drivers/net/bnxt/bnxt_ethdev.c +0
-0}; eth_dev->data->dev_conf.intr_conf.lsc =1 ;
Quoted 7 lines
drivers/net/bnxt/bnxt_ethdev.c static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, · line 1014
Quoted 2 lines
drivers/net/bnxt/bnxt_ethdev.c +1
-1- eth_dev->data->dev_conf.intr_conf.rxq =1 ; + eth_dev->data->dev_conf.intr_conf.rxq =0 ;The application passes a
dev_confstructure at configure time. This structure configures many features, like rx interrupts. Resetting anything from this configuration in theget_infosop is wrong, be it 1 or 0.
Agree. I will spin a v2.
Quoted 3 lines
Idem with LSC.
I was testing that as well. But I could not complete all the tests.
Quoted 12 lines
I don't think enabling LSC works as expected, because this driver does not report the
RTE_ETH_DEV_INTR_LSCcapability.
Which leads me to a question for ethdev maintainers.
I am surprised we don't have a capability for rx interrupts, is this feature advertised through another way than device flags?--
David Marchand
PATCH v2 1/1 net/bnxt: fix rxq interrupt setting
Don't set rxq interrupt config
Applications can set the rxq interrupt config to 1 or 0 as needed. If an application is not interested in handling Rx interrupts and prefers to poll Rx rings, there is no need for the PMD to set this config option to 1.
---v1->v2: Setting 0 or 1 in PMD would override application setting. So skip it.
--- drivers/net/bnxt/bnxt_ethdev.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +0 -1
@@ -1011,7 +1011,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, }; eth_dev->data->dev_conf.intr_conf.lsc =1 ; - eth_dev->data->dev_conf.intr_conf.rxq =1 ; dev_info->rx_desc_lim.nb_min =BNXT_MIN_RING_DESC ; dev_info->rx_desc_lim.nb_max =BNXT_MAX_RX_RING_DESC ; dev_info->tx_desc_lim.nb_min =BNXT_MIN_RING_DESC ;
Signature · 1 line
2.21.1 (Apple Git-122.3)
Re: [dpdk-dev] [PATCH v2] net/bnxt: fix rxq interrupt setting
Quoted 9 lines · Ajit Khaparde
Don't set rxq interrupt config
Applications can set the rxq interrupt config to 1 or 0 as needed. If an application is not interested in handling Rx interrupts and prefers to poll Rx rings, there is no need for the PMD to set this config option to 1.Fixes 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")
Quoted 7 lines
Signed-off-by Ajit Khaparde <[email protected]>Reviewed-by Lance Richardson <[email protected]>---
v1->v2: Setting 0 or 1 in PMD would override application setting. So skip it.
---
Patch applied dpdk-next-net-brcm tree, for-next-net branch.
Quoted 21 lines
drivers/net/bnxt/bnxt_ethdev.c | 1 - 1 file changed, 1 deletion(-)drivers/net/bnxt/bnxt_ethdev.c +0
-1@@ -1011,7 +1011,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, }; eth_dev->data->dev_conf.intr_conf.lsc =1 ; - eth_dev->data->dev_conf.intr_conf.rxq =1 ; dev_info->rx_desc_lim.nb_min =BNXT_MIN_RING_DESC ; dev_info->rx_desc_lim.nb_max =BNXT_MAX_RX_RING_DESC ;dev_info->tx_desc_lim.nb_min = BNXT_MIN_RING_DESC;--
2.21.1 (Apple Git-122.3)