[v2] net/iavf: support default RSS for IP fragment packet

Message ID 20210712082730.908291-1-wenjun1.wu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v2] net/iavf: support default RSS for IP fragment packet |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing warning Testing issues
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-testing fail Testing issues
ci/iol-intel-Performance fail Performance Testing issues

Commit Message

Wenjun Wu July 12, 2021, 8:27 a.m. UTC
  This patch adds default RSS support for IPv4 and IPv6 fragment packet.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>

---
v2: modify error implementation
---
 drivers/net/iavf/iavf_hash.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
  

Comments

Qi Zhang July 13, 2021, 12:44 a.m. UTC | #1
> -----Original Message-----
> From: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Sent: Monday, July 12, 2021 4:28 PM
> To: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Subject: [PATCH v2] net/iavf: support default RSS for IP fragment packet
> 
> This patch adds default RSS support for IPv4 and IPv6 fragment packet.
> 
> Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 03dae5d999..2b03dad858 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -623,6 +623,38 @@  iavf_rss_hash_set(struct iavf_adapter *ad, uint64_t rss_hf, bool add)
 		iavf_add_del_rss_cfg(ad, &rss_cfg, add);
 	}
 
+	if (rss_hf & ETH_RSS_FRAG_IPV4) {
+		struct virtchnl_proto_hdrs hdr = {
+			.tunnel_level = TUNNEL_LEVEL_OUTER,
+			.count = 3,
+			.proto_hdr = {
+				proto_hdr_eth,
+				proto_hdr_ipv4,
+				{
+					VIRTCHNL_PROTO_HDR_IPV4_FRAG,
+					FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_FRAG_PKID),
+					{BUFF_NOUSED},
+				},
+			},
+		};
+		rss_cfg.proto_hdrs = hdr;
+		iavf_add_del_rss_cfg(ad, &rss_cfg, add);
+	}
+
+	if (rss_hf & ETH_RSS_FRAG_IPV6) {
+		struct virtchnl_proto_hdrs hdr = {
+			.tunnel_level = TUNNEL_LEVEL_OUTER,
+			.count = 3,
+			.proto_hdr = {
+				proto_hdr_eth,
+				proto_hdr_ipv6,
+				proto_hdr_ipv6_frag,
+			},
+		};
+		rss_cfg.proto_hdrs = hdr;
+		iavf_add_del_rss_cfg(ad, &rss_cfg, add);
+	}
+
 	vf->rss_hf = rss_hf & IAVF_RSS_HF_ALL;
 	return 0;
 }