net/bnxt: set rxq interrupt config to 0

Message ID 20210701181253.39373-1-ajit.khaparde@broadcom.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ajit Khaparde
Headers
Series net/bnxt: set rxq interrupt config to 0 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing fail Testing issues
ci/iol-mellanox-Functional fail Functional Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Ajit Khaparde July 1, 2021, 6:12 p.m. UTC
  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 <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Marchand July 1, 2021, 7:44 p.m. UTC | #1
On Thu, Jul 1, 2021 at 8:13 PM Ajit Khaparde <ajit.khaparde@broadcom.com> wrote:
>
> 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 <ajit.khaparde@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 495c6cd21e..bef9605fed 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -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?
  
Ajit Khaparde July 2, 2021, 1:16 a.m. UTC | #2
On Thu, Jul 1, 2021 at 12:44 PM David Marchand <david.marchand@redhat.com>
wrote:

> On Thu, Jul 1, 2021 at 8:13 PM Ajit Khaparde <ajit.khaparde@broadcom.com>
> wrote:
> >
> > 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 <ajit.khaparde@broadcom.com>
> > Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> > ---
> >  drivers/net/bnxt/bnxt_ethdev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> > index 495c6cd21e..bef9605fed 100644
> > --- a/drivers/net/bnxt/bnxt_ethdev.c
> > +++ b/drivers/net/bnxt/bnxt_ethdev.c
> > @@ -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.

Agree. I will spin a v2.


>
> Idem with LSC.
>
I was testing that as well. But I could not complete all the tests.


>
> 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?
>
>
> --
> David Marchand
>
>
  

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 495c6cd21e..bef9605fed 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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;