DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: set rxq interrupt config to 0
@ 2021-07-01 18:12 Ajit Khaparde
  2021-07-01 19:44 ` David Marchand
  0 siblings, 1 reply; 5+ messages in thread
From: Ajit Khaparde @ 2021-07-01 18:12 UTC (permalink / raw)
  To: dev; +Cc: Lance Richardson

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

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;
 	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)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: set rxq interrupt config to 0
  2021-07-01 18:12 [dpdk-dev] [PATCH] net/bnxt: set rxq interrupt config to 0 Ajit Khaparde
@ 2021-07-01 19:44 ` David Marchand
  2021-07-02  1:16   ` Ajit Khaparde
  0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2021-07-01 19:44 UTC (permalink / raw)
  To: Ajit Khaparde
  Cc: dev, Lance Richardson, Andrew Rybchenko, Yigit, Ferruh, Thomas Monjalon

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?


-- 
David Marchand


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: set rxq interrupt config to 0
  2021-07-01 19:44 ` David Marchand
@ 2021-07-02  1:16   ` Ajit Khaparde
  2021-07-02  1:24     ` [dpdk-dev] [PATCH v2] net/bnxt: fix rxq interrupt setting Ajit Khaparde
  0 siblings, 1 reply; 5+ messages in thread
From: Ajit Khaparde @ 2021-07-02  1:16 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, Lance Richardson, Andrew Rybchenko, Yigit, Ferruh, Thomas Monjalon

[-- Attachment #1: Type: text/plain, Size: 1853 bytes --]

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
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] net/bnxt: fix rxq interrupt setting
  2021-07-02  1:16   ` Ajit Khaparde
@ 2021-07-02  1:24     ` Ajit Khaparde
  2021-07-02 21:38       ` Ajit Khaparde
  0 siblings, 1 reply; 5+ messages in thread
From: Ajit Khaparde @ 2021-07-02  1:24 UTC (permalink / raw)
  To: dev; +Cc: stable, Lance Richardson

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]

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")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
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(-)

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/bnxt: fix rxq interrupt setting
  2021-07-02  1:24     ` [dpdk-dev] [PATCH v2] net/bnxt: fix rxq interrupt setting Ajit Khaparde
@ 2021-07-02 21:38       ` Ajit Khaparde
  0 siblings, 0 replies; 5+ messages in thread
From: Ajit Khaparde @ 2021-07-02 21:38 UTC (permalink / raw)
  To: dpdk-dev; +Cc: dpdk stable

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

On Thu, Jul 1, 2021 at 6:24 PM Ajit Khaparde <ajit.khaparde@broadcom.com>
wrote:

> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> ---
> 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.



>  drivers/net/bnxt/bnxt_ethdev.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> index 495c6cd21e..ed09f1bf52 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -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)
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-02 21:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 18:12 [dpdk-dev] [PATCH] net/bnxt: set rxq interrupt config to 0 Ajit Khaparde
2021-07-01 19:44 ` David Marchand
2021-07-02  1:16   ` Ajit Khaparde
2021-07-02  1:24     ` [dpdk-dev] [PATCH v2] net/bnxt: fix rxq interrupt setting Ajit Khaparde
2021-07-02 21:38       ` Ajit Khaparde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).