On 12 Jan 2022, at 17:23, Harry van Haaren wrote:

> This commit fixes the minimum packet size for the vlan/ipv4/tcp
> traffic profile, which was previously incorrectly set.
>
> This commit also disallows any fragmented IPv4 packets from being
> matched in the optimized miniflow-extract, avoiding complexity of
> handling fragmented packets and using scalar fallback instead.
>
> Fixes: aa85a25095 ("dpif-netdev/mfex: Add more AVX512 traffic profiles.")
>
> Signed-off-by: Harry van Haaren <[email protected]>
>
> ---
>
> This patch should be applied to 2.16 as well. I expect it applies cleanly, but
> volunteer to rebase/fixup on 2.16 release and send new patch if required.
>
> ---
>
>  lib/dpif-netdev-extract-avx512.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/dpif-netdev-extract-avx512.c 
> b/lib/dpif-netdev-extract-avx512.c
> index d23349482..7b21a3af9 100644
> --- a/lib/dpif-netdev-extract-avx512.c
> +++ b/lib/dpif-netdev-extract-avx512.c
> @@ -157,7 +157,7 @@ _mm512_maskz_permutexvar_epi8_wrap(__mmask64 kmask, 
> __m512i idx, __m512i a)
>    0, 0, 0, 0, /* Src IP */                                              \
>    0, 0, 0, 0, /* Dst IP */
>
> -#define PATTERN_IPV4_MASK PATTERN_IPV4_GEN(0xFF, 0xFE, 0xFF, 0xFF)
> +#define PATTERN_IPV4_MASK PATTERN_IPV4_GEN(0xFF, 0xFF, 0xFF, 0xFF)

I assume the original idea was not to include the may fragment bit, which I 
think should be fine to ignore.
But the previous mask was 0xFE was masking of bit in the “Fragment offset”, so 
I think setting this to 0xDF would accomplish making sure this is not a 
fragment (or reserved bit set).

>  #define PATTERN_IPV4_UDP PATTERN_IPV4_GEN(0x45, 0, 0, 0x11)
>  #define PATTERN_IPV4_TCP PATTERN_IPV4_GEN(0x45, 0, 0, 0x06)
>
> @@ -389,7 +389,7 @@ static const struct mfex_profile 
> mfex_profiles[PROFILE_COUNT] =
>          .dp_pkt_offs = {
>              14, UINT16_MAX, 18, 38,
>          },
> -        .dp_pkt_min_size = 46,
> +        .dp_pkt_min_size = 58,

ACK

>      },
>  };
>
> -- 
> 2.25.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to