> -----Original Message-----
> From: Amber, Kumar <kumar.am...@intel.com>
> Sent: Friday 1 April 2022 12:24
> To: ovs-dev@openvswitch.org
> Cc: Stokes, Ian <ian.sto...@intel.com>; echau...@redhat.com; Ferriter, Cian 
> <cian.ferri...@intel.com>;
> f...@sysclose.org; Van Haaren, Harry <harry.van.haa...@intel.com>; Amber, 
> Kumar <kumar.am...@intel.com>
> Subject: [PATCH v8 2/4] dpif-netdev/mfex: Add packet hash check to 
> autovalidator.
> 
> This patch adds the scalar hash calls to the autovalidator.
> It also adds checks for comparing the scalar hash against
> the profile based hash calculated as part of AVX512 MFEX implementations.
> 
> The per profile AVX512 optimized hash was added to the autovalidator
> in the last commit. The autovalidator was already calling that code,
> we just add the checks and scalar hashing in this commit.
> 
> Signed-off-by: Kumar Amber <kumar.am...@intel.com>
> 
> ---
> v8:
> - Fix hash validation.
> ---

<snip some of the diff away>

> 
> -    /* Preserve packet correctness by storing back the good offsets in
> -     * packets back. */
> +    /* Reset all packet values. */
>      DP_PACKET_BATCH_FOR_EACH (i, packet, packets) {
> -        packet->l2_5_ofs = good_l2_5_ofs[i];
> -        packet->l3_ofs = good_l3_ofs[i];
> -        packet->l4_ofs = good_l4_ofs[i];
> -        packet->l2_pad_size = good_l2_pad_size[i];
> +        dp_packet_reset_offsets(packet);
> +        *dp_packet_ol_flags_ptr(packet) &= ~DP_PACKET_OL_RSS_HASH;
>      }


Thanks for addressing my comments Amber. I think this change makes sense. Since 
we always return 0 from the autovalidator, we want to reset 'struct dp_packet' 
values such as offsets and offload flags.

After intentionally introducing errors into the ipv4 profile specific hashing 
code added in patch 1/4 of this series, I can verify that the autovalidator 
correctly identifies the wrongly calculated hash values.

Acked-by: Cian Ferriter <cian.ferri...@intel.com>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to