> -----Original Message-----
> From: Amber, Kumar <[email protected]>
> Sent: Friday 1 April 2022 12:24
> To: [email protected]
> Cc: Stokes, Ian <[email protected]>; [email protected]; Ferriter, Cian
> <[email protected]>;
> [email protected]; Van Haaren, Harry <[email protected]>; Amber,
> Kumar <[email protected]>
> 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 <[email protected]>
>
> ---
> 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 <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev