2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

dpif-netdev/mfex: Add ipv6 profile based hashing.

For packets which don't already have a hash calculated,
miniflow_hash_5tuple() calculates the hash of a packet
using the previously built miniflow.

This commit adds IPv6 profile specific hashing which
uses fixed offsets into the packet to improve hashing
performance.

Signed-off-by: Kumar Amber <kumar.amber@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Kumar Amber
2022-07-01 17:58:38 +05:30
committed by Ian Stokes
parent 8cab30a9d2
commit b80f58cde2
3 changed files with 51 additions and 4 deletions

View File

@@ -1019,6 +1019,8 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
miniflow_push_be16(mf, ct_tp_dst, ct_tp_dst);
if (dl_type == htons(ETH_TYPE_IP)) {
dp_packet_update_rss_hash_ipv4_tcp_udp(packet);
} else if (dl_type == htons(ETH_TYPE_IPV6)) {
dp_packet_update_rss_hash_ipv6_tcp_udp(packet);
}
}
}
@@ -1032,6 +1034,8 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
miniflow_push_be16(mf, ct_tp_dst, ct_tp_dst);
if (dl_type == htons(ETH_TYPE_IP)) {
dp_packet_update_rss_hash_ipv4_tcp_udp(packet);
} else if (dl_type == htons(ETH_TYPE_IPV6)) {
dp_packet_update_rss_hash_ipv6_tcp_udp(packet);
}
}
} else if (OVS_LIKELY(nw_proto == IPPROTO_SCTP)) {