linux/drivers/net/ethernet
Po Liu 888ae5a395 net: enetc: add tc flower psfp offload driver
This patch is to add tc flower offload for the enetc IEEE 802.1Qci(PSFP)
function. There are four main feature parts to implement the flow
policing and filtering for ingress flow with IEEE 802.1Qci features.
They are stream identify(this is defined in the P802.1cb exactly but
needed for 802.1Qci), stream filtering, stream gate and flow metering.
Each function block includes many entries by index to assign parameters.
So for one frame would be filtered by stream identify first, then
flow into stream filter block by the same handle between stream identify
and stream filtering. Then flow into stream gate control which assigned
by the stream filtering entry. And then policing by the gate and limited
by the max sdu in the filter block(optional). At last, policing by the
flow metering block, index choosing at the fitering block.
So you can see that each entry of block may link to many upper entries
since they can be assigned same index means more streams want to share
the same feature in the stream filtering or stream gate or flow
metering.
To implement such features, each stream filtered by source/destination
mac address, some stream maybe also plus the vlan id value would be
treated as one flow chain. This would be identified by the chain_index
which already in the tc filter concept. Driver would maintain this chain
and also with gate modules. The stream filter entry create by the gate
index and flow meter(optional) entry id and also one priority value.
Offloading only transfer the gate action and flow filtering parameters.
Driver would create (or search same gate id and flow meter id and
 priority) one stream filter entry to set to the hardware. So stream
filtering do not need transfer by the action offloading.
This architecture is same with tc filter and actions relationship. tc
filter maintain the list for each flow feature by keys. And actions
maintain by the action list.

Below showing a example commands by tc:
> tc qdisc add dev eth0 ingress
> ip link set eth0 address 10:00:80:00:00:00
> tc filter add dev eth0 parent ffff: protocol ip chain 11 \
	flower skip_sw dst_mac 10:00:80:00:00:00 \
	action gate index 10 \
	sched-entry open 200000000 1 8000000 \
	sched-entry close 100000000 -1 -1

Command means to set the dst_mac 10:00:80:00:00:00 to index 11 of stream
identify module. Then setting the gate index 10 of stream gate module.
Keep the gate open for 200ms and limit the traffic volume to 8MB in this
sched-entry. Then direct the frames to the ingress queue 1.

Signed-off-by: Po Liu <Po.Liu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-01 16:08:20 -07:00
..
3com docs: networking: device drivers: convert 3com/vortex.txt to ReST 2020-05-01 12:24:41 -07:00
8390
adaptec drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon net: ena: Make some functions static 2020-03-30 10:53:40 -07:00
amd amd-xgbe: Use __napi_schedule() in BH context 2020-04-16 13:59:53 -07:00
apm
apple
aquantia net: atlantic: A2 ingress / egress hw configuration 2020-05-01 15:37:59 -07:00
arc
atheros net: ag71xx: extend link validation to support other SoCs 2020-04-27 10:09:21 -07:00
aurora
broadcom net: bcmgenet: Move wake-up event out of side band ISR 2020-05-01 15:54:33 -07:00
brocade
cadence net: macb: Fix handling of fixed-link node 2020-03-31 10:06:27 -07:00
calxeda
cavium liquidio: remove unused inline functions 2020-04-25 20:42:57 -07:00
chelsio docs: networking: device drivers: convert chelsio/cxgb.txt to ReST 2020-05-01 12:24:41 -07:00
cirrus docs: networking: device drivers: convert cirrus/cs89x0.txt to ReST 2020-05-01 12:24:41 -07:00
cisco
cortina
davicom
dec docs: networking: device drivers: convert dec/dmfe.txt to ReST 2020-05-01 12:24:42 -07:00
dlink docs: networking: device drivers: convert dlink/dl2k.txt to ReST 2020-05-01 12:24:42 -07:00
emulex
ezchip
faraday net/faraday: Fix unnecessary check in ftmac100_probe() 2020-04-30 12:20:54 -07:00
freescale net: enetc: add tc flower psfp offload driver 2020-05-01 16:08:20 -07:00
fujitsu
google
hisilicon net: hns3: adds support for reading module eeprom info 2020-04-29 11:41:33 -07:00
huawei hinic: Use kmemdup instead of kzalloc and memcpy 2020-04-30 20:59:34 -07:00
i825xx
ibm
intel ice: Fix error return code in ice_add_prof() 2020-04-30 20:29:09 -07:00
marvell octeontx2-pf: Fix error return code in otx2_probe() 2020-04-30 20:28:34 -07:00
mediatek net: ethernet: mediatek: move mt7623 settings out off the mt7530 2020-04-07 18:28:28 -07:00
mellanox mlx5-updates-2020-04-30 2020-04-30 13:15:16 -07:00
micrel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2020-03-29 21:25:29 -07:00
microchip
moxa
mscc net: mscc: ocelot: lift protocol restriction for flow_match_eth_addrs keys 2020-04-22 11:40:51 -07:00
myricom
natsemi
neterion docs: networking: device drivers: convert neterion/vxge.txt to ReST 2020-05-01 12:24:42 -07:00
netronome net/nfp: Update driver to use global kernel version 2020-04-21 13:27:37 -07:00
ni
nvidia
nxp net: lpc-enet: fix error return code in lpc_mii_init() 2020-04-30 20:29:39 -07:00
oki-semi
packetengines
pasemi
pensando drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
qlogic qlcnic: remove unused inline function qlcnic_hw_write_wx_2M 2020-04-25 20:42:57 -07:00
qualcomm net: qualcomm: rmnet: Allow configuration updates to existing devices 2020-04-02 06:50:04 -07:00
rdc
realtek r8169: switch from netif_xxx message functions to netdev_xxx 2020-05-01 12:53:06 -07:00
renesas
rocker
samsung
seeq
sfc sfc: falcon: convert to use i2c_new_client_device() 2020-03-26 19:31:21 -07:00
sgi net: meth: remove spurious copyright text 2020-04-23 15:59:43 -07:00
silan
sis
smsc docs: networking: device drivers: convert smsc/smc9.txt to ReST 2020-05-01 12:24:42 -07:00
socionext
stmicro net: ethernet: stmmac: simplify phy modes management for stm32 2020-05-01 15:17:32 -07:00
sun net: sun: Remove unneeded cast from memory allocation 2020-04-20 12:21:21 -07:00
synopsys
tehuti
ti drivers: net: davinci_mdio: fix potential NULL dereference in davinci_mdio_probe() 2020-05-01 15:27:09 -07:00
toshiba docs: networking: convert netconsole.txt to ReST 2020-04-30 12:56:36 -07:00
tundra
via
wiznet
xilinx net: ll_temac: Fix return value check in temac_probe() 2020-04-30 20:39:22 -07:00
xircom
xscale net: ethernet: ixp4xx: Add error handling in ixp4xx_eth_probe() 2020-04-23 15:32:45 -07:00
dnet.c net: ethernet: dnet: convert to devm_platform_get_and_ioremap_resource 2020-04-20 12:18:13 -07:00
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile