sfc: insert default MAE rules to connect VFs to representors
authorEdward Cree <ecree.xilinx@gmail.com>
Thu, 28 Jul 2022 18:57:49 +0000 (19:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Jul 2022 04:22:06 +0000 (21:22 -0700)
commit67ab160ed08f5bb55aff55aa41e6bde56cb83661
tree611feea2a240f51fa9948d70dff15b1887d90f61
parentf50e8fcda6b8d39db9098f7e1146dc491696ab91
sfc: insert default MAE rules to connect VFs to representors

Default rules are low-priority switching rules which the hardware uses
 in the absence of higher-priority rules.  Each representor requires a
 corresponding rule matching traffic from its representee VF and
 delivering to the PF (where a check on INGRESS_MPORT in
 __ef100_rx_packet() will direct it to the representor).  No rule is
 required in the reverse direction, because representor TX uses a TX
 override descriptor to bypass the MAE and deliver directly to the VF.
Since inserting any rule into the MAE disables the firmware's own
 default rules, also insert a pair of rules to connect the PF to the
 physical network port and vice-versa.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 files changed:
drivers/net/ethernet/sfc/Makefile
drivers/net/ethernet/sfc/ef100.c
drivers/net/ethernet/sfc/ef100_netdev.c
drivers/net/ethernet/sfc/ef100_nic.c
drivers/net/ethernet/sfc/ef100_rep.c
drivers/net/ethernet/sfc/ef100_rep.h
drivers/net/ethernet/sfc/mae.c
drivers/net/ethernet/sfc/mae.h
drivers/net/ethernet/sfc/mcdi.h
drivers/net/ethernet/sfc/mcdi_pcol_mae.h [new file with mode: 0644]
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/tc.c [new file with mode: 0644]
drivers/net/ethernet/sfc/tc.h [new file with mode: 0644]