From 67ab160ed08f5bb55aff55aa41e6bde56cb83661 Mon Sep 17 00:00:00 2001 From: Edward Cree Date: Thu, 28 Jul 2022 19:57:49 +0100 Subject: 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 Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/sfc/ef100_rep.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/ethernet/sfc/ef100_rep.h') diff --git a/drivers/net/ethernet/sfc/ef100_rep.h b/drivers/net/ethernet/sfc/ef100_rep.h index f3787133f793..070f700893c1 100644 --- a/drivers/net/ethernet/sfc/ef100_rep.h +++ b/drivers/net/ethernet/sfc/ef100_rep.h @@ -14,6 +14,7 @@ #define EF100_REP_H #include "net_driver.h" +#include "tc.h" struct efx_rep_sw_stats { atomic64_t rx_packets, tx_packets; @@ -32,6 +33,7 @@ struct efx_rep_sw_stats { * @write_index: number of packets enqueued to @rx_list * @read_index: number of packets consumed from @rx_list * @rx_pring_size: max length of RX list + * @dflt: default-rule for MAE switching * @list: entry on efx->vf_reps * @rx_list: list of SKBs queued for receive in NAPI poll * @rx_lock: protects @rx_list @@ -46,6 +48,7 @@ struct efx_rep { unsigned int idx; unsigned int write_index, read_index; unsigned int rx_pring_size; + struct efx_tc_flow_rule dflt; struct list_head list; struct list_head rx_list; spinlock_t rx_lock; -- cgit