diff mbox series

net/bnxt: fix null termination of receive mbuf chain

Message ID 20210122214900.10430-1-lance.richardson@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers show
Series net/bnxt: fix null termination of receive mbuf chain | expand

Checks

Context Check Description
ci/iol-testing warning Testing issues
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Lance Richardson Jan. 22, 2021, 9:49 p.m. UTC
The last mbuf in a multi-segment packet needs to be
NULL-terminated.

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

Comments

Ajit Khaparde Jan. 24, 2021, 4:32 p.m. UTC | #1
On Fri, Jan 22, 2021 at 1:49 PM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> The last mbuf in a multi-segment packet needs to be
> NULL-terminated.
>
> Fixes: 0958d8b6435d ("net/bnxt: support LRO")
> Cc: stable@dpdk.org
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Patch applied to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_rxr.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index 969cae19fc..c34a8905e7 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -325,6 +325,7 @@ static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,
>                  */
>                 rte_bitmap_set(rxr->ag_bitmap, ag_cons);
>         }
> +       last->next = NULL;
>         bnxt_prod_ag_mbuf(rxq);
>         return 0;
>  }
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 969cae19fc..c34a8905e7 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -325,6 +325,7 @@  static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,
 		 */
 		rte_bitmap_set(rxr->ag_bitmap, ag_cons);
 	}
+	last->next = NULL;
 	bnxt_prod_ag_mbuf(rxq);
 	return 0;
 }