Skip to contentSkip to conversation

net/bnxt: fix null termination of receive mbuf chain

PATCH In review Lance Richardson 2 participants 2 messages Jan 22, 2021 – Jan 24, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix null termination of receive mbuf chain

The last mbuf in a multi-segment packet needs to be NULL-terminated.

---
 drivers/net/bnxt/bnxt_rxr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/bnxt/bnxt_rxr.c +1 -0
index 969cae19fc..c34a8905e7 100644
@@ -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;
 }
Signature · 1 line
2.25.1
#1 lore raw
Quoted 9 lines · Lance Richardson

The last mbuf in a multi-segment packet needs to be NULL-terminated.

Patch applied to dpdk-next-net-brcm.

Quoted 19 lines
---
 drivers/net/bnxt/bnxt_rxr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/bnxt/bnxt_rxr.c +1 -1
index 969cae19fc..c34a8905e7 100644
@@ -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