On Wed, Jun 12, 2024 at 6:45 AM Emma Finn <[email protected]> wrote:
>
> The AVX implementation for IPv4 action did not check whether
> the IPv4 checksum offload flag has been set and was incorrectly
> calculating checksums in software. Adding a check to skip AVX
> checksum claculation when offload flags are set.

Nit: calculation

>
> Signed-off-by: Emma Finn <[email protected]>
> Reported-by: Eelco Chaudron <[email protected]>
> ---
>  lib/odp-execute-avx512.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/odp-execute-avx512.c b/lib/odp-execute-avx512.c
> index 569ea789e..3ddbfcd15 100644
> --- a/lib/odp-execute-avx512.c
> +++ b/lib/odp-execute-avx512.c
> @@ -473,7 +473,8 @@ action_avx512_ipv4_set_addrs(struct dp_packet_batch 
> *batch,
>           * (v_pkt_masked). */
>          __m256i v_new_hdr = _mm256_or_si256(v_key_shuf, v_pkt_masked);
>
> -        if (dp_packet_hwol_tx_ip_csum(packet)) {
> +        if (dp_packet_hwol_tx_ip_csum(packet) ||
> +            dp_packet_hwol_l3_ipv4(packet)) {

dp_packet_hwol_tx_ip_csum() should be a subset of
dp_packet_hwol_l3_ipv4(). If it's not set then the good flag may not
be checked.


Cheers,
M

>              dp_packet_ol_reset_ip_csum_good(packet);
>          } else {
>              ovs_be16 old_csum = ~nh->ip_csum;
> --
> 2.34.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