From 7cfc9a273e7691dabf610cb6d34923db3ad4bbf8 Mon Sep 17 00:00:00 2001 From: Tianyu Li Date: Fri, 9 Apr 2021 15:51:46 +0800 Subject: rdma: fix skip_ipv4_cksum behavior in scalar path Current rdma input L3 validating behavior for scalar path is: if any packet L3_OK flag matches, then unset skip_ip4_cksum. The correct behavior should be if any packet L3_OK NOT match, then unset skip_ip4_cksum. The logic is also different from the vector path. This patch fixes the wrong behavior for scalar path. Type: fix Signed-off-by: Tianyu Li Change-Id: I5ca5ed3aa0c07d441f3c87b33f03ea8f7a3c9826 --- src/plugins/rdma/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/rdma') diff --git a/src/plugins/rdma/input.c b/src/plugins/rdma/input.c index 69b14ee7d46..df101e544bd 100644 --- a/src/plugins/rdma/input.c +++ b/src/plugins/rdma/input.c @@ -704,7 +704,7 @@ rdma_device_mlx5dv_l3_validate_and_swap_bc (rdma_per_thread_data_t *(u32x4 *) (bc + i) = u32x4_byte_swap (*(u32x4 *) (bc + i)); #else for (int i = 0; i < n_rx_packets; i++) - if ((ptd->cqe_flags[i] & mask) == match) + if ((ptd->cqe_flags[i] & mask) != match) skip_ip4_cksum = 0; for (int i = 0; i < n_rx_packets; i++) -- cgit 1.2.3-korg