DPDK patches and discussions
 help / color / mirror / Atom feed
From: Suanming Mou <suanmingm@mellanox.com>
To: Matan Azrad <matan@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Dekel Peled <dekelp@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix incorrect L3 layer chosen in TTL action
Date: Thu, 21 Nov 2019 09:41:47 +0000	[thread overview]
Message-ID: <HE1PR05MB3484F7DE78A3DFB2C7608ACCCC4E0@HE1PR05MB3484.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <DB3PR0502MB4028EFA2F2B58C469EEAA418D24E0@DB3PR0502MB4028.eurprd05.prod.outlook.com>



> -----Original Message-----
> From: Matan Azrad <matan@mellanox.com>
> Sent: Thursday, November 21, 2019 3:40 PM
> To: Suanming Mou <suanmingm@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Dekel Peled <dekelp@mellanox.com>
> Subject: RE: [PATCH] net/mlx5: fix incorrect L3 layer chosen in TTL action
> 
> 
> Hi Mou
> 
> From: Suanming Mou
> > For IPINIP flow, there are two L3 layer match pattern items, the inner
> > layer follows the outer layer as the latter L3 layer item, the TTL
> > action handles the outer layer.
> >
> > Current the outer and inner L3 layers are both regared as the outer L3
> > layer, it caueses TTL action uses the incorrect latter inner protocal
> > in
> > flow_dv_convert_action_modify_ttl() for header modifier.
> >
> > Check former L3 outer layer existence avoid set the incorrect inner
> > layer to the flow attr.
> >
> > Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct
> > Verbs")
> > Cc: dekelp@mellanox.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
> > ---
> >  drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> > b/drivers/net/mlx5/mlx5_flow_dv.c index c402a8d..7cef5d3 100644
> > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > @@ -84,10 +84,18 @@
> >  	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
> >  		switch (item->type) {
> >  		case RTE_FLOW_ITEM_TYPE_IPV4:
> > -			attr->ipv4 = 1;
> > +			/*
> > +			 * flow_dv_validate() avoids multiple L3 layers case
> > +			 * other than IPINIP. If attr->ipv6 set, ipv4 should
> > +			 * be the IPINIP inner layer.
> > +			 */
> > +			if (!attr->ipv6)
> > +				attr->ipv4 = 1;
> >  			break;
> >  		case RTE_FLOW_ITEM_TYPE_IPV6:
> > -			attr->ipv6 = 1;
> > +			/* If ipv4 set, ipv6 is the IPINIP inner layer. */
> > +			if (!attr->ipv4)
> > +				attr->ipv6 = 1;
> >  			break;
> >  		case RTE_FLOW_ITEM_TYPE_UDP:
> >  			attr->udp = 1;
> 
> What are about udp\tcp?
> 
> They both can be in outer and inner.....

Good catch. Per the command below, the udp tcp should also need to be taken care in vxlan mode.
flow create 0 group 2 ingress pattern ipv4 src is 192.168.1.1 /  udp src is 250 / vxlan vni is 125 / ipv4 src is 192.168.1.2 /  tcp src is 135 / end actions set_tp_src port 125 / jump group 3 / end

Maybe we need a new patch named "net/mlx5: fix incorrect L3/L4 layer chosen in tunnel mode".

> 


  reply	other threads:[~2019-11-21  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  3:31 Suanming Mou
2019-11-21  7:39 ` Matan Azrad
2019-11-21  9:41   ` Suanming Mou [this message]
2019-11-21 12:09 ` [dpdk-dev] [PATCH v2] net/mlx5: fix incorrect L3/L4 layer chosen with tunnel Suanming Mou
2019-11-22  1:29   ` Suanming Mou
2019-11-24  7:05     ` Matan Azrad
2019-11-24  9:15   ` 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=HE1PR05MB3484F7DE78A3DFB2C7608ACCCC4E0@HE1PR05MB3484.eurprd05.prod.outlook.com \
    --to=suanmingm@mellanox.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@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).