Skip to content
Permalink
Browse files

net/i40e: fix address of first segment

[ upstream commit 4916f63985ddb56af43980252d1134d051523685 ]

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: 343422, 343403
Fixes: ca74903 ("net/i40e: extract non-x86 specific code from vector driver")

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
  • Loading branch information...
Xiao Zhang authored and kevintraynor committed Aug 5, 2019
1 parent 75e1723 commit eef15e619c648389dcf15ca114b6e24fc1614ce5
Showing with 2 additions and 0 deletions.
  1. +1 −0 drivers/net/i40e/i40e_rxtx_vec_avx2.c
  2. +1 −0 drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -619,6 +619,7 @@ i40e_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 + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
&split_flags[i]);
@@ -506,6 +506,7 @@ i40e_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 + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
&split_flags[i]);

0 comments on commit eef15e6

Please sign in to comment.
You can’t perform that action at this time.