net/mlx5: fix zero out UDP checksum in encap data
Checks
Commit Message
From: Eli Britstein <elibr@mellanox.com>
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 <elibr@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Matan Azrad
> Sent: Wednesday, January 22, 2020 5:04 PM
> To: Slava Ovsiienko <viacheslavo@mellanox.com>
> Cc: dev@dpdk.org; Eli Britstein <elibr@mellanox.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix zero out UDP checksum in encap
> data
>
> From: Eli Britstein <elibr@mellanox.com>
>
> 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 <elibr@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index 5a1b426..367e7d7 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -2931,8 +2931,6 @@ struct field_modify_info modify_tcp[] = {
> (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 =
> @@ -2946,6 +2944,8 @@ struct field_modify_info modify_tcp[] = {
> &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,
> --
> 1.8.3.1
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
@@ -2931,8 +2931,6 @@ struct field_modify_info modify_tcp[] = {
(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 =
@@ -2946,6 +2944,8 @@ struct field_modify_info modify_tcp[] = {
&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,