From: Chenghu Yao Date: Mon, 9 Jan 2017 03:31:04 +0000 (+0800) Subject: net/i40e: fix segment number in reassemble process X-Git-Tag: spdx-start~4839 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=65600813884cf018358dc09c032c78f8f5f5a83b;p=dpdk.git 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 --- 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 -