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: 9e29a278bc ("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>
This commit is contained in:
Wenjun Wu 2021-08-17 16:44:01 +08:00 committed by Qi Zhang
parent fc299d7348
commit 54d7846234

View 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);
}