[dpdk-dev] [PATCH] doc: refine ethernet and VLAN flow rule items

Ori Kam orika at mellanox.com
Mon Apr 27 08:52:24 CEST 2020


Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Sunday, April 26, 2020 8:02 PM
> To: Dekel Peled <dekelp at mellanox.com>
> Cc: Andrew Rybchenko <arybchenko at solarflare.com>; Ori Kam
> <orika at mellanox.com>; john.mcnamara at intel.com;
> marko.kovacevic at intel.com; Thomas Monjalon <thomas at monjalon.net>;
> ferruh.yigit at intel.com; dev at dpdk.org; Asaf Penso <asafp at mellanox.com>
> Subject: Re: [dpdk-dev] [PATCH] doc: refine ethernet and VLAN flow rule items
> 
> On Sun, 26 Apr 2020 09:18:54 +0000
> Dekel Peled <dekelp at mellanox.com> wrote:
> 
> > Thanks, PSB.
> >
> > > -----Original Message-----
> > > From: Andrew Rybchenko <arybchenko at solarflare.com>
> > > Sent: Saturday, April 25, 2020 5:00 PM
> > > To: Dekel Peled <dekelp at mellanox.com>; Ori Kam <orika at mellanox.com>;
> > > john.mcnamara at intel.com; marko.kovacevic at intel.com; Thomas Monjalon
> > > <thomas at monjalon.net>; ferruh.yigit at intel.com
> > > Cc: dev at dpdk.org; Asaf Penso <asafp at mellanox.com>
> > > Subject: Re: [PATCH] doc: refine ethernet and VLAN flow rule items
> > >
> > > On 4/23/20 9:30 PM, Dekel Peled wrote:
> > > > Specified pattern may be translated in different manner.
> > > > For example the pattern "eth / ipv4" can be translated to match
> > > > untagged packets only, since the pattern doesn't specify a vlan item.
> > >
> > > vlan -> VLAN
> >
> > I will change to uppercase.
> >
> > >
> > > > It can also be translated to match both tagged and untagged packets,
> > > > for the same reason.
> > > > This patch updates the rte_flow documentation to clearly specify the
> > > > required pattern to use.
> > > > For example:
> > > > To match tagged ipv4 packets, the pattern "eth type is 0x8100 / vlan /
> > > > ipv4 / end" should be used.
> > >
> > > Isn't eth / vlan / ipv4 /end sufficient? What's the difference?
> > > I guess later should allow any VLAN TPID, but it is greyish since it is HW
> > > dependent.
> >
> > In the example I wanted to show explicit rule, to emphasize the importance of
> detailed pattern structure.
> >
> > >
> > > > To match untagged ipv4 packets, the pattern "eth type is 0x0800 /
> > > > ipv4 / end" should be used.
> > >
> > > What about eth / ipv4 / end?
> > > Does usage of ipv4 assume that EtherType is 0x0800?
> >
> > Same as above.
> >
> > >
> > > > To match both tagged and untagged packets, the pattern "eth / end"
> > > > should be used.
> > >
> > > The interesting question is what should be used if I want either tagged or
> > > untagged IPv4 packets. I think it worse to mention to make the picture
> > > complete.
> >
> > To match any IPV4 packet, either tagged or untagged, need to apply two
> rules.
> > One for tagged packets and the other for untagged packets.
> > I will add this example as well.
> >
> > >
> > > > Signed-off-by: Dekel Peled <dekelp at mellanox.com>
> 
> All this reminds me that "code is the best documentation" and there
> is no working code that does a complete software implementation of the
> rte_flow engine. This means the actual interpretation of what the rte_flow
> means is left to documentation and hardware vendors choices in
> implementation.

I agree with you, that is why I think this patch is important. 

Best,
Ori


More information about the dev mailing list