summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXiao Zhang <xiao.zhang@intel.com>2019-08-06 07:20:51 +0800
committerQi Zhang <qi.z.zhang@intel.com>2019-08-06 13:29:25 +0200
commit91342addd15fdfe47273feb784ab58c48609098a (patch)
treef97c8a4ab5e8c1e5de6db6169a512d032bdd8e3b /drivers
parent739c35f08bc0296ffda47f006f1903a67527063f (diff)
downloaddpdk-91342addd15fdfe47273feb784ab58c48609098a.zip
dpdk-91342addd15fdfe47273feb784ab58c48609098a.tar.gz
dpdk-91342addd15fdfe47273feb784ab58c48609098a.tar.xz
net/ice: fix address of first segment
This patch fixes (dereference after null check) coverity issue. The address of first segmented packets was not set correctly during reassembling packets which led to this issue. Coverity issue: 343452, 343407 Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang <xiao.zhang@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ice/ice_rxtx_vec_avx2.c1
-rw-r--r--drivers/net/ice/ice_rxtx_vec_sse.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index fac869a..5ce29c2 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -656,6 +656,7 @@ ice_recv_scattered_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
i++;
if (i == nb_bufs)
return nb_bufs;
+ rxq->pkt_first_seg = rx_pkts[i];
}
return i + ice_rx_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
&split_flags[i]);
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index 049f60d..967a7b1 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -509,6 +509,7 @@ ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
i++;
if (i == nb_bufs)
return nb_bufs;
+ rxq->pkt_first_seg = rx_pkts[i];
}
return i + ice_rx_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
&split_flags[i]);