OSDN Git Service

net: mvpp2: cls: Add steering based on vlan Id and priority.
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Tue, 18 Jun 2019 14:55:19 +0000 (16:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2019 02:26:05 +0000 (22:26 -0400)
commit1274daede3eff80e04a792219cf74c62994713fb
tree36c534f567d574844d085c512c1320db313fd26a
parent12b8e2dd01ce642ce968819078f5f2798227087a
net: mvpp2: cls: Add steering based on vlan Id and priority.

This commit allows using the vlan Id and priority as parts of the key
for classification offload. These fields are extracted from the
outermost tag, if multiple tags are present.

Vlan Id and priority are considered as 2 different fields by the
classifier, however the fields are both appended in the Header Extracted
Key in the same layout as they are found in the tags. This means that
when steering only based on the prio, a 16-bit slot is still taken in
the HEK.

The classifier doesn't allow extracting the DEI bit from the tag, so we
explicitly prevent user from using this bit in the key.

This commit adds the vlan priotity as a compatible HEK field for
tagged traffic, meaning that we limit the possibility of extracting this
field only to the flows that contain tagged traffic.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h