]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Add support for VLAN priority filters in switchdev
authorMartyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
Thu, 15 Sep 2022 12:14:34 +0000 (14:14 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 28 Sep 2022 18:40:57 +0000 (11:40 -0700)
commit2b50d732839d0d5bc8f0255afaf82d6b9199465c
treedd5a5b144cbd2df992860573f573d7f0af25e894
parentc3da89e510e1ef5ddd52c6567637d2eb33e5cdbd
ice: Add support for VLAN priority filters in switchdev

Enable support for adding TC rules that filter on the VLAN priority
in switchdev mode.

VLAN priority are the first 3 bits of 16b switch field vector word
which contain also vlan id value within its last 12 bits.
When getting vlan priority value from tc match.key it
has to be shifted first to proper bits positions (by VLAN_PRIO_SHIFT)
and then can be added to the joint 'vlan' field in ice_vlan_hdr
in lookup element.

The mask of lookup changes accordingly.
0x0FFF - when only vlan id is added in filter
0xE000 - when only vlan priority is added in filter
0xEFFF - when both these values are specified

Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_tc_lib.c
drivers/net/ethernet/intel/ice/ice_tc_lib.h