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.mazarg...@6wind.com>
Cc: Ferruh Yigit <ferruh.yi...@intel.com>
Cc: Thomas Monjalon <tho...@monjalon.net>
Cc: Wenzhuo Lu <wenzhuo...@intel.com>
Cc: Jingjing Wu <jingjing...@intel.com>
Cc: Ajit Khaparde <ajit.khapa...@broadcom.com>
Cc: Somnath Kotur <somnath.ko...@broadcom.com>
Cc: John Daley <johnd...@cisco.com>
Cc: Hyong Youb Kim <hyon...@cisco.com>
Cc: Beilei Xing <beilei.x...@intel.com>
Cc: Qi Zhang <qi.z.zh...@intel.com>
Cc: Konstantin Ananyev <konstantin.anan...@intel.com>
Cc: Nelio Laranjeiro <nelio.laranje...@6wind.com>
Cc: Yongseok Koh <ys...@mellanox.com>
Cc: Tomasz Duszynski <t...@semihalf.com>
Cc: Dmitri Epshtein <d...@marvell.com>
Cc: Natalie Samsonov <nsams...@marvell.com>
Cc: Jianbo Liu <jianbo....@arm.com>
Cc: Andrew Rybchenko <arybche...@solarflare.com>
Cc: Pascal Mazon <pascal.ma...@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 <arybche...@solarflare.com>

Reply via email to