OSDN Git Service

net: dsa: felix: support psfp filter on vsc9959
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>
Thu, 18 Nov 2021 10:12:00 +0000 (18:12 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Nov 2021 12:07:24 +0000 (12:07 +0000)
commit7d4b564d6adde3167dd015f7dbb7aee1d7a4294e
tree7c8d2946d1737333405b9203913ce8ae351acf09
parent23e2c506ad6c588b469e3d06cc20299434440d02
net: dsa: felix: support psfp filter on vsc9959

VSC9959 supports Per-Stream Filtering and Policing(PSFP) that complies
with the IEEE 802.1Qci standard. The stream is identified by Null stream
identification(DMAC and VLAN ID) defined in IEEE802.1CB.

For PSFP, four tables need to be set up: stream table, stream filter
table, stream gate table, and flow meter table. Identify the stream by
parsing the tc flower keys and add it to the stream table. The stream
filter table is automatically maintained, and its index is determined by
SGID(flow gate index) and FMID(flow meter index).

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix_vsc9959.c
include/soc/mscc/ocelot.h
include/soc/mscc/ocelot_ana.h