From: Eli Britstein Date: Wed, 22 Jan 2020 15:03:58 +0000 (+0000) Subject: net/mlx5: fix zero out UDP checksum in encap data X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=27767e217f8a7a9333967ddf5f98abe7943393aa;p=dpdk.git net/mlx5: fix zero out UDP checksum in encap data The cited commit zeroed the UDP checksum for raw-encap case. Add the same handling for vxlan-encap case. Fixes: bf1d7d9a033a ("net/mlx5: zero out UDP checksum in encapsulation") Cc: stable@dpdk.org Signed-off-by: Eli Britstein Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index fc156a348f..a32f0be803 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -2883,8 +2883,6 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev, (const struct rte_flow_action_raw_encap *)action->conf; res.size = raw_encap_data->size; memcpy(res.buf, raw_encap_data->data, res.size); - if (flow_dv_zero_encap_udp_csum(res.buf, error)) - return -rte_errno; } else { if (action->type == RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP) encap_data = @@ -2898,6 +2896,8 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev, &res.size, error)) return -rte_errno; } + if (flow_dv_zero_encap_udp_csum(res.buf, error)) + return -rte_errno; if (flow_dv_encap_decap_resource_register(dev, &res, dev_flow, error)) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,