This patch avoids calculating the software hash of the packet again if the optimized miniflow-extract hit and has already calculated the packet hash. In cases of scalar miniflow extract, the normal hashing calculation is performed.
Signed-off-by: Kumar Amber <kumar.am...@intel.com> --- lib/dpif-netdev-avx512.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c index 544d36903..2188abfd9 100644 --- a/lib/dpif-netdev-avx512.c +++ b/lib/dpif-netdev-avx512.c @@ -210,15 +210,15 @@ dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd, if (!mfex_hit) { /* Do a scalar miniflow extract into keys. */ miniflow_extract(packet, &key->mf); + key->len = netdev_flow_key_size(miniflow_n_values(&key->mf)); + key->hash = dpif_netdev_packet_get_rss_hash_orig_pkt(packet, + &key->mf); } /* Cache TCP and byte values for all packets. */ pkt_meta[i].bytes = dp_packet_size(packet); pkt_meta[i].tcp_flags = miniflow_get_tcp_flags(&key->mf); - key->len = netdev_flow_key_size(miniflow_n_values(&key->mf)); - key->hash = dpif_netdev_packet_get_rss_hash_orig_pkt(packet, &key->mf); - if (emc_enabled) { f = emc_lookup(&cache->emc_cache, key); -- 2.25.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev