DPDK patches and discussions
 help / color / mirror / Atom feed
From: Slava Ovsiienko <viacheslavo@mellanox.com>
To: Dekel Peled <dekelp@mellanox.com>,
	Yongseok Koh <yskoh@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>
Cc: Ori Kam <orika@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Eli Britstein <elibr@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix order of lines in loop
Date: Mon, 5 Aug 2019 12:44:12 +0000	[thread overview]
Message-ID: <AM4PR05MB3265D42799A52379F0839EE1D2DA0@AM4PR05MB3265.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <a48a3f51990c6959eb4cc34cfdf2de465baf2061.1565005897.git.dekelp@mellanox.com>

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Monday, August 5, 2019 14:51
> To: Yongseok Koh <yskoh@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org; Eli Britstein
> <elibr@mellanox.com>
> Subject: [PATCH] net/mlx5: fix order of lines in loop
> 
> Function flow_dv_zero_encap_udp_csum() uses a while loop to iterate over
> vlan items in flow rule.
> Pointer next_hdr is incremented to the next item before it is used, so the first
> item is skipped.
> 
> This patch moves the incrementing of next_hdr to the correct place.
> 
> Fixes: bf1d7d9a033a ("net/mlx5: zero out UDP checksum in encapsulation")
> Cc: elibr@mellanox.com
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 536059d..6c58634 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1504,9 +1504,9 @@ struct field_modify_info modify_tcp[] = {
> 
>  	/* VLAN skipping */
>  	while (proto == RTE_ETHER_TYPE_VLAN || proto ==
> RTE_ETHER_TYPE_QINQ) {
> -		next_hdr += sizeof(struct rte_vlan_hdr);
>  		vlan = (struct rte_vlan_hdr *)next_hdr;
>  		proto = RTE_BE16(vlan->eth_proto);
> +		next_hdr += sizeof(struct rte_vlan_hdr);
>  	}
> 
>  	/* HW calculates IPv4 csum. no need to proceed */
> --
> 1.8.3.1


  parent reply	other threads:[~2019-08-05 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05 11:51 Dekel Peled
2019-08-05 12:16 ` Eli Britstein
2019-08-05 12:44 ` Slava Ovsiienko [this message]
2019-08-05 15:16 ` Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM4PR05MB3265D42799A52379F0839EE1D2DA0@AM4PR05MB3265.eurprd05.prod.outlook.com \
    --to=viacheslavo@mellanox.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=elibr@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).