net/iavf: fix default RSS hash for IP fragments
authorWenjun Wu <wenjun1.wu@intel.com>
Tue, 17 Aug 2021 08:44:01 +0000 (16:44 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Sun, 29 Aug 2021 11:46:06 +0000 (13:46 +0200)
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 <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_hash.c

index 2b03dad..eba55ec 100644 (file)
@@ -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);
        }