Updating mbuf data_len, Pkt_len for each segment before chaining them Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")
Signed-off-by: Bhagyada Modali <bhagyada.mod...@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 2c2554e900..7c07fd90ef 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -412,6 +412,10 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, } } + /* Mbuf populate */ + mbuf->data_off = RTE_PKTMBUF_HEADROOM; + mbuf->data_len = data_len; + mbuf->pkt_len = data_len; if (first_seg != NULL) { if (rte_pktmbuf_chain(first_seg, mbuf) != 0) @@ -443,9 +447,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, mbuf->vlan_tci = 0; } } - /* Mbuf populate */ - mbuf->data_off = RTE_PKTMBUF_HEADROOM; - mbuf->data_len = data_len; err_set: rxq->cur++; -- 2.25.1