patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [DPDK 1/8] net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist
@ 2020-07-10  2:04 Junfeng Guo
  2020-07-10  2:04 ` [dpdk-stable] [DPDK 7/8] net/ice/base: clear and free XLT entries on reset Junfeng Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Junfeng Guo @ 2020-07-10  2:04 UTC (permalink / raw)
  To: qabuild; +Cc: Qi Zhang, stable, Junfeng Guo, Qiming Yang

From: Qi Zhang <qi.z.zhang@intel.com>

An IP header combined with GTP-U header should be regarded as
inner layer for RSS, otherwise it mess the field vector between
an IPv4 rule and IPv6 rule e.g:

testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
gtp_psc / ipv4 / udp / end actions rss types ipv4-udp end key_len \
0 queues end / end
testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
gtp_psc / ipv6 / udp / end actions rss types ipv6-udp end key_len \
0 queues end / end

Fixes: b7d34ccc47b5 ("net/ice/base: packet encapsulation for RSS")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 6adcda844..984fa90ce 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -3557,6 +3557,11 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	if (status)
 		goto exit;
 
+	/* don't do RSS for GTPU outer */
+	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
+		return ICE_SUCCESS;
+
 	/* Search for a flow profile that has matching headers, hash fields
 	 * and has the input VSI associated to it. If found, no further
 	 * operations required and exit.
@@ -3673,6 +3678,7 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	ice_acquire_lock(&hw->rss_locks);
 	status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs,
 				      ICE_RSS_OUTER_HEADERS, symm);
+
 	if (!status)
 		status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds,
 					      addl_hdrs, ICE_RSS_INNER_HEADERS,
@@ -3712,6 +3718,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	if (status)
 		goto out;
 
+	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
+		return ICE_SUCCESS;
+
 	prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
 					vsi_handle,
 					ICE_FLOW_FIND_PROF_CHK_FLDS);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-10  2:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10  2:04 [dpdk-stable] [DPDK 1/8] net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist Junfeng Guo
2020-07-10  2:04 ` [dpdk-stable] [DPDK 7/8] net/ice/base: clear and free XLT entries on reset Junfeng Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).