]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: cls: Allow dropping packets with classification offload
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Tue, 30 Apr 2019 13:14:29 +0000 (15:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 21:13:14 +0000 (17:13 -0400)
commit5b8bc6d45059af1ced5e0ce0f080731d430dfd08
treedc28c02b3d457355d77f8a89a9a5c679e89022ac
parent271601d228ce2b184f155263322d087061c1760a
net: mvpp2: cls: Allow dropping packets with classification offload

This commit introduces support for the "Drop" action in classification
offload. This corresponds to the "-1" action with ethtool -N.

This is achieved using the color marking actions available in the C2
engine, which associate a color to a packet. These colors can be either
Green, Yellow or Red, Red meaning that the packet should be dropped.

Green and Yellow colors are interpreted by the Policer, which isn't
supported yet.

This method of dropping using the Classifier is different than the
already existing early-drop features, such as VLAN filtering and MAC
UC/MC filtering, which are performed during the Parsing step, and
therefore take precedence over classification actions.

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