From 54d78462344e2b3ec0a54cb6f13af0bf3da47032 Mon Sep 17 00:00:00 2001 From: Wenjun Wu Date: Tue, 17 Aug 2021 16:44:01 +0800 Subject: [PATCH] net/iavf: fix default RSS hash for IP fragments Previously, hash value is calculated by src IP address, dst IP address and IP ID. However, default RSS field only needs src and dst IP address. This patch removes IP ID from default RSS field for IP fragment packets to improve default RSS configuration. Fixes: 9e29a278bc0c ("net/iavf: support default RSS for IP fragment") Cc: stable@dpdk.org Signed-off-by: Wenjun Wu Acked-by: Qi Zhang --- drivers/net/iavf/iavf_hash.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index 2b03dad858..eba55ecea5 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -624,34 +624,12 @@ iavf_rss_hash_set(struct iavf_adapter *ad, uint64_t rss_hf, bool 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; + rss_cfg.proto_hdrs = outer_ipv4_tmplt; 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; + rss_cfg.proto_hdrs = outer_ipv6_tmplt; iavf_add_del_rss_cfg(ad, &rss_cfg, add); } -- 2.20.1