diff options
author | Xiaoliang Yang <xiaoliang.yang_1@nxp.com> | 2020-10-02 15:02:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-10-02 15:40:30 -0700 |
commit | 75944fda1dfe836fdd406bef6cb3cc8a80f7af83 (patch) | |
tree | b5eeaea64af17ddfa20b332090453a2de8f32253 /drivers/net/dsa/ocelot | |
parent | 1397a2eb52e20e20363cc0a1cb707d5eb473dbb7 (diff) |
net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1
VCAP IS1 is a VCAP module which can filter on the most common L2/L3/L4
Ethernet keys, and modify the results of the basic QoS classification
and VLAN classification based on those flow keys.
There are 3 VCAP IS1 lookups, mapped over chains 10000, 11000 and 12000.
Currently the driver is hardcoded to use IS1_ACTION_TYPE_NORMAL half
keys.
Note that the VLAN_MANGLE has been omitted for now. In hardware, the
VCAP_IS1_ACT_VID_REPLACE_ENA field replaces the classified VLAN
(metadata associated with the frame) and not the VLAN from the header
itself. There are currently some issues which need to be addressed when
operating in standalone, or in bridge with vlan_filtering=0 modes,
because in those cases the switch ports have VLAN awareness disabled,
and changing the classified VLAN to anything other than the pvid causes
the packets to be dropped. Another issue is that on egress, we expect
port tagging to push the classified VLAN, but port tagging is disabled
in the modes mentioned above, so although the classified VLAN is
replaced, it is not visible in the packet transmitted by the switch.
Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot')
-rw-r--r-- | drivers/net/dsa/ocelot/felix_vsc9959.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index bfbf811b060f..875ea60c0df0 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -711,6 +711,7 @@ static const struct vcap_field vsc9959_vcap_is1_actions[] = { [VCAP_IS1_ACT_PAG_OVERRIDE_MASK] = { 13, 8}, [VCAP_IS1_ACT_PAG_VAL] = { 21, 8}, [VCAP_IS1_ACT_RSV] = { 29, 9}, + /* The fields below are incorrectly shifted by 2 in the manual */ [VCAP_IS1_ACT_VID_REPLACE_ENA] = { 38, 1}, [VCAP_IS1_ACT_VID_ADD_VAL] = { 39, 12}, [VCAP_IS1_ACT_FID_SEL] = { 51, 2}, |