DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix zero out UDP checksum in encap data
@ 2020-01-22 15:03 Matan Azrad
  2020-01-26 16:19 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Matan Azrad @ 2020-01-22 15:03 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dev, Eli Britstein, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix zero out UDP checksum in encap data
  2020-01-22 15:03 [dpdk-dev] [PATCH] net/mlx5: fix zero out UDP checksum in encap data Matan Azrad
@ 2020-01-26 16:19 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-01-26 16:19 UTC (permalink / raw)
  To: Matan Azrad, Slava Ovsiienko; +Cc: dev, Eli Britstein, stable

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-26 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 15:03 [dpdk-dev] [PATCH] net/mlx5: fix zero out UDP checksum in encap data Matan Azrad
2020-01-26 16:19 ` Raslan Darawsheh

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git