From 65600813884cf018358dc09c032c78f8f5f5a83b Mon Sep 17 00:00:00 2001 From: Chenghu Yao Date: Mon, 9 Jan 2017 11:31:04 +0800 Subject: [PATCH] net/i40e: fix segment number in reassemble process When freeing up last mbuf, start->nb_segs should be decremented by one. See also ixgbe process. Fixes: 0e0da28cd888 ("i40e: add vector scatter Rx") Signed-off-by: Chenghu Yao Acked-by: Ferruh Yigit --- drivers/net/i40e/i40e_rxtx_vec_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 6cb5dce9f5..990520f3c1 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -71,6 +71,7 @@ reassemble_packets(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_bufs, /* free up last mbuf */ struct rte_mbuf *secondlast = start; + start->nb_segs--; while (secondlast->next != end) secondlast = secondlast->next; secondlast->data_len -= (rxq->crc_len - -- 2.20.1