patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/bnxt: limit per-poll Rx representor pkts
@ 2020-12-14 18:53 Lance Richardson
  2020-12-17 23:54 ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde
  2021-01-06  9:27 ` [dpdk-stable] " Ferruh Yigit
  0 siblings, 2 replies; 5+ messages in thread
From: Lance Richardson @ 2020-12-14 18:53 UTC (permalink / raw)
  To: Ajit Khaparde, Somnath Kotur, Venkat Duvvuru; +Cc: dev, ferruh.yigit, stable

Limit number of representor packets transferred per poll
to requested burst size.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Cc: stable@dpdk.org
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 2b1dd97617..ffdeeecc3a 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -901,7 +901,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		}
 
 		raw_cons = NEXT_RAW_CMP(raw_cons);
-		if (nb_rx_pkts == nb_pkts || evt)
+		if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt)
 			break;
 		/* Post some Rx buf early in case of larger burst processing */
 		if (nb_rx_pkts == BNXT_RX_POST_THRESH)
-- 
2.25.1


-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: limit per-poll Rx representor pkts
  2020-12-14 18:53 [dpdk-stable] [PATCH] net/bnxt: limit per-poll Rx representor pkts Lance Richardson
@ 2020-12-17 23:54 ` Ajit Khaparde
  2021-01-06  9:27 ` [dpdk-stable] " Ferruh Yigit
  1 sibling, 0 replies; 5+ messages in thread
From: Ajit Khaparde @ 2020-12-17 23:54 UTC (permalink / raw)
  To: Lance Richardson
  Cc: Ajit Khaparde, Somnath Kotur, Venkat Duvvuru, dev, ferruh.yigit, stable

On Mon, Dec 14, 2020 at 10:54 AM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Limit number of representor packets transferred per poll
> to requested burst size.
>
> Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Cc: stable@dpdk.org

Patch applied to dpdk-next-net-brcm. Thanks

> ---
>  drivers/net/bnxt/bnxt_rxr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index 2b1dd97617..ffdeeecc3a 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -901,7 +901,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
>                 }
>
>                 raw_cons = NEXT_RAW_CMP(raw_cons);
> -               if (nb_rx_pkts == nb_pkts || evt)
> +               if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt)
>                         break;
>                 /* Post some Rx buf early in case of larger burst processing */
>                 if (nb_rx_pkts == BNXT_RX_POST_THRESH)
> --
> 2.25.1
>
>
> --
> This electronic communication and the information and any files transmitted
> with it, or attached to it, are confidential and are intended solely for
> the use of the individual or entity to whom it is addressed and may contain
> information that is confidential, legally privileged, protected by privacy
> laws, or otherwise restricted from disclosure to anyone else. If you are
> not the intended recipient or the person responsible for delivering the
> e-mail to the intended recipient, you are hereby notified that any use,
> copying, distributing, dissemination, forwarding, printing, or copying of
> this e-mail is strictly prohibited. If you received this e-mail in error,
> please return the e-mail to the sender, delete it from your computer, and
> destroy any printed copy of it.



-- 
Ajit Khaparde

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

* Re: [dpdk-stable] [PATCH] net/bnxt: limit per-poll Rx representor pkts
  2020-12-14 18:53 [dpdk-stable] [PATCH] net/bnxt: limit per-poll Rx representor pkts Lance Richardson
  2020-12-17 23:54 ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde
@ 2021-01-06  9:27 ` Ferruh Yigit
  2021-01-06 20:54   ` [dpdk-stable] [dpdk-dev] " Lance Richardson
  1 sibling, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2021-01-06  9:27 UTC (permalink / raw)
  To: Lance Richardson, Ajit Khaparde, Somnath Kotur, Venkat Duvvuru
  Cc: dev, stable

On 12/14/2020 6:53 PM, Lance Richardson wrote:
> Limit number of representor packets transferred per poll
> to requested burst size.
> 

Hi Lance,

Can you please describe the impact of the change? Since it has a fixes line, it 
seems it is fixing something but it is not clear what is fixed.

> Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Cc: stable@dpdk.org
> ---
>   drivers/net/bnxt/bnxt_rxr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index 2b1dd97617..ffdeeecc3a 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -901,7 +901,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
>   		}
>   
>   		raw_cons = NEXT_RAW_CMP(raw_cons);
> -		if (nb_rx_pkts == nb_pkts || evt)
> +		if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt)
>   			break;
>   		/* Post some Rx buf early in case of larger burst processing */
>   		if (nb_rx_pkts == BNXT_RX_POST_THRESH)
> 


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: limit per-poll Rx representor pkts
  2021-01-06  9:27 ` [dpdk-stable] " Ferruh Yigit
@ 2021-01-06 20:54   ` Lance Richardson
  2021-01-07 15:33     ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Lance Richardson @ 2021-01-06 20:54 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Lance Richardson, Ajit Khaparde, Somnath Kotur, Venkat Duvvuru,
	dev, stable

On Wed, Jan 6, 2021 at 4:27 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 12/14/2020 6:53 PM, Lance Richardson wrote:
> > Limit number of representor packets transferred per poll
> > to requested burst size.
> >
>
> Hi Lance,
>
> Can you please describe the impact of the change? Since it has a fixes line, it
> seems it is fixing something but it is not clear what is fixed.
>
Hi Ferruh,

How does this look:

Without some limit on the number of packets transferred from the
hw ring to the representor ring per burst receive call, an entire ring's
worth of packets can be transferred. This can break assumptions
about ring indices (index on return could be identical to the index
on entry, which is assumed to mean that no packets were processed),
and can result in representor packets being dropped unnecessarily
due to representor ring overflow.

Fix by limiting the number of representor packets transferred per
poll to requested burst size.

Thanks,
    Lance

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: limit per-poll Rx representor pkts
  2021-01-06 20:54   ` [dpdk-stable] [dpdk-dev] " Lance Richardson
@ 2021-01-07 15:33     ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2021-01-07 15:33 UTC (permalink / raw)
  To: Lance Richardson
  Cc: Lance Richardson, Ajit Khaparde, Somnath Kotur, Venkat Duvvuru,
	dev, stable

On 1/6/2021 8:54 PM, Lance Richardson wrote:
> On Wed, Jan 6, 2021 at 4:27 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 12/14/2020 6:53 PM, Lance Richardson wrote:
>>> Limit number of representor packets transferred per poll
>>> to requested burst size.
>>>
>>
>> Hi Lance,
>>
>> Can you please describe the impact of the change? Since it has a fixes line, it
>> seems it is fixing something but it is not clear what is fixed.
>>
> Hi Ferruh,
> 
> How does this look:
> 
> Without some limit on the number of packets transferred from the
> hw ring to the representor ring per burst receive call, an entire ring's
> worth of packets can be transferred. This can break assumptions
> about ring indices (index on return could be identical to the index
> on entry, which is assumed to mean that no packets were processed),
> and can result in representor packets being dropped unnecessarily
> due to representor ring overflow.
> 
> Fix by limiting the number of representor packets transferred per
> poll to requested burst size.
> 

Thank you, updated the commit log in next-net.

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

end of thread, other threads:[~2021-01-07 15:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 18:53 [dpdk-stable] [PATCH] net/bnxt: limit per-poll Rx representor pkts Lance Richardson
2020-12-17 23:54 ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde
2021-01-06  9:27 ` [dpdk-stable] " Ferruh Yigit
2021-01-06 20:54   ` [dpdk-stable] [dpdk-dev] " Lance Richardson
2021-01-07 15:33     ` Ferruh Yigit

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git