On 1/6/22 12:45, Harry van Haaren wrote:
> This commit improves handling of packets where the allocated memory
> is less than 64 bytes. In the DPDK datapath this never matters, as
> an mbuf always pre-allocates enough space, however this can occur in
> test environments such as the dummy netdev.

This statement is not correct.  Few reasons:

1. Nitpick: there is no such thing as 'DPDK datapath'.

2. The issue is easily reproducible in production environments, i.e.
   it's not test-only.  The reason for that is netdev-linux and other
   ports which are present in every OVS setup (at least the bridge port
   in userspace datapath is a tap interface).  In a vast majority of
   setups these ports are actually up and has ip addresses.  E.g.
   OpenStack is using tap/veth interfaces for DHCP and other stuff.
   And locally delivered packets (packets that never left the hypervisor)
   are not obliged to be padded up to 64 bytes.  You may find that
   local ARP packets, for example, are typically 42 bytes long and that
   triggers the memory over-read in our case.

> The fix is required to
> ensure ASAN enabled builds don't error on testing this, hence the
> fix is valuable.
> 
> The solution implemented uses a mask-to-zero if the available buffer
> size is less than 64 bytes, and a branch for which type of load is used.
> 
> Fixes: 250ceddcc2d0 ("dpif-netdev/mfex: Add AVX512 based optimized miniflow 
> extract")
> 
> Reported-by: Ilya Maximets <[email protected]>
> Signed-off-by: Harry van Haaren <[email protected]>
> ---
>  lib/dpif-netdev-extract-avx512.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Thanks, Harry and Eelco.  The change itself looks good to me and it
fixes ASAN errors while running a few tests under SDE.  So, I fixed
the commit message and applied the patch.  Also backported to 2.16.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to