mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
dpif-netdev/mfex: Add ipv4 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 IPv4 profile specific hashing which uses fixed offsets into the packet to improve hashing performance. Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Co-authored-by: Harry van Haaren <harry.van.haaren@intel.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Co-authored-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Kumar Amber <kumar.amber@intel.com> Acked-by: Cian Ferriter <cian.ferriter@intel.com> Acked-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
@@ -1017,6 +1017,9 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
|
||||
miniflow_push_be16(mf, tp_dst, tcp->tcp_dst);
|
||||
miniflow_push_be16(mf, ct_tp_src, ct_tp_src);
|
||||
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 (OVS_LIKELY(nw_proto == IPPROTO_UDP)) {
|
||||
@@ -1027,6 +1030,9 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
|
||||
miniflow_push_be16(mf, tp_dst, udp->udp_dst);
|
||||
miniflow_push_be16(mf, ct_tp_src, ct_tp_src);
|
||||
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 (OVS_LIKELY(nw_proto == IPPROTO_SCTP)) {
|
||||
if (OVS_LIKELY(size >= SCTP_HEADER_LEN)) {
|
||||
|
Reference in New Issue
Block a user