[2/5] net/iavf: fix dereference after null check coverity

Message ID 1564952430-6585-2-git-send-email-xiao.zhang@intel.com (mailing list archive)
State Superseded, archived
Headers
Series [1/5] net/fm10k: fix dereference after null check coverity |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xiao Zhang Aug. 4, 2019, 9 p.m. UTC
  The address of receive queue start segment was not updated when found by
iterated checking, update the address to fix coverity issue.

Coverity issue: 343447
Fixes: 319c421f ("net/avf: enable SSE Rx Tx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_sse.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 3d98514..d3ac125 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -519,6 +519,7 @@  iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}