Skip to contentSkip to conversation

drivers/net: fix address of first segment

PATCH Applied Joyce Kong 3 participants 6 messages Sep 24, 2019 – Oct 17, 2019 Network drivers

lore
Share & tools
lore

Joyce Kong

author
#0 lore raw

cover drivers/net: fix address of first segment

The series fix (dereference after null check) coverity issue on NEON vPMD. Which for x86 sse/avx2 (commit 4916f63985ddb56af43980252d1134d051523685, commit 739c35f08bc0296ffda47f006f1903a67527063f) have been merged.

Joyce Kong (2):
net/i40e: fix address of first segment
net/ixgbe: fix address of first segment

 drivers/net/i40e/i40e_rxtx_vec_neon.c   | 1 +
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 1 +
 2 files changed, 2 insertions(+)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 net/i40e: 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: 343422, 343403

Fixes ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver")
---
 drivers/net/i40e/i40e_rxtx_vec_neon.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/i40e/i40e_rxtx_vec_neon.c +1 -0
index 864eb9a..deb185f 100644
@@ -474,6 +474,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]);
Signature · 1 line
2.7.4
Reviewed-by on v1 1/2
#2 lore raw

Re: [dpdk-dev] [PATCH 1/2] net/i40e: fix address of first segment

Quoted 38 lines

-----Original Message-----
From: Joyce Kong [mailto:[email protected]]
Sent: Tuesday, September 24, 2019 1:49 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; Zhang, Xiao <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [PATCH 1/2] net/i40e: 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: 343422, 343403

Fixes ca74903b75cf ("net/i40e: extract non-x86 specific code from vector

driver")
Cc: [email protected]

---
 drivers/net/i40e/i40e_rxtx_vec_neon.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/i40e/i40e_rxtx_vec_neon.c +1 -0
index 864eb9a..deb185f 100644
@@ -474,6 +474,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,
Quoted 3 lines

&split_flags[i]);
--
2.7.4

author
#3 lore raw

PATCH 2/2 net/ixgbe: fix address of first segment

In reply to Joyce Kong

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: 13245

Fixes 8a44c15aa57d ("net/ixgbe: extract non-x86 specific code from vector driver")
---
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c +1 -0
index eeb8259..26c0ef5 100644
@@ -375,6 +375,7 @@ ixgbe_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]);
Signature · 1 line
2.7.4
Reviewed-by on v1 2/2
#4 lore raw

Re: [dpdk-dev] [PATCH 2/2] net/ixgbe: fix address of first segment

Quoted 38 lines

-----Original Message-----
From: Joyce Kong [mailto:[email protected]]
Sent: Tuesday, September 24, 2019 1:49 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; Zhang, Xiao <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [PATCH 2/2] net/ixgbe: 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: 13245

Fixes 8a44c15aa57d ("net/ixgbe: extract non-x86 specific code from vector

driver")
Cc: [email protected]

---
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c +1 -0
index eeb8259..26c0ef5 100644
@@ -375,6 +375,7 @@ ixgbe_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,
Quoted 3 lines

&split_flags[i]);
--
2.7.4

Reviewed-by on the v1 series Applied
#5 lore raw
In reply to Joyce Kong
Quoted 4 lines · Joyce Kong

The series fix (dereference after null check) coverity issue on NEON vPMD. Which for x86 sse/avx2 (commit 4916f63985ddb56af43980252d1134d051523685, commit 739c35f08bc0296ffda47f006f1903a67527063f) have been merged.

Quoted 11 lines

Joyce Kong (2):
net/i40e: fix address of first segment
net/ixgbe: fix address of first segment

drivers/net/i40e/i40e_rxtx_vec_neon.c | 1 +
drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 1 +

2 files changed, 2 insertions(+)
Signature · 1 line
2.7.4

For series:

Applied to dpdk-next-net-intel.

Thanks,
Xiaolong