[dpdk-dev] [PATCH v3 11/16] ethdev: limit default VLAN TCI mask in flow API

Andrew Rybchenko arybchenko at solarflare.com
Wed Apr 11 14:48:29 CEST 2018


On 04/10/2018 07:36 PM, Adrien Mazarguil wrote:
> VLAN TCI is a 16-bit field broken down as PCP (3b), DEI (1b) and VID (12b).
>
> The default mask used by PMDs for the VLAN pattern when one isn't provided
> by the application comprises the entire TCI, which is problematic because
> most devices only support VID matching.
>
> This forces applications to always provide a mask limited to the VID part
> in order to successfully apply a flow rule with a VLAN pattern item.
> Moreover, applications rarely want to match PCP and DEI intentionally.
>
> Given the above and since VID is what is commonly referred to when talking
> about VLAN, this commit excludes PCP and DEI from the default mask.
>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
> Cc: Ferruh Yigit <ferruh.yigit at intel.com>
> Cc: Thomas Monjalon <thomas at monjalon.net>
> Cc: Wenzhuo Lu <wenzhuo.lu at intel.com>
> Cc: Jingjing Wu <jingjing.wu at intel.com>
> Cc: Ajit Khaparde <ajit.khaparde at broadcom.com>
> Cc: Somnath Kotur <somnath.kotur at broadcom.com>
> Cc: John Daley <johndale at cisco.com>
> Cc: Hyong Youb Kim <hyonkim at cisco.com>
> Cc: Beilei Xing <beilei.xing at intel.com>
> Cc: Qi Zhang <qi.z.zhang at intel.com>
> Cc: Konstantin Ananyev <konstantin.ananyev at intel.com>
> Cc: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
> Cc: Yongseok Koh <yskoh at mellanox.com>
> Cc: Tomasz Duszynski <tdu at semihalf.com>
> Cc: Dmitri Epshtein <dima at marvell.com>
> Cc: Natalie Samsonov <nsamsono at marvell.com>
> Cc: Jianbo Liu <jianbo.liu at arm.com>
> Cc: Andrew Rybchenko <arybchenko at solarflare.com>
> Cc: Pascal Mazon <pascal.mazon at 6wind.com>
>
> ---
>
> v3 changes:
>
> These changes were previously mistakenly made part of the previous patch
> ("ethdev: refine TPID handling in flow API") from which they were split
> following Andrew's rightful comment [1].
>
> [1] http://dpdk.org/ml/archives/dev/2018-April/095870.html
> ---
>   doc/guides/prog_guide/rte_flow.rst | 2 +-
>   lib/librte_ether/rte_flow.h        | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Acked-by: Andrew Rybchenko <arybchenko at solarflare.com>


More information about the dev mailing list