diff options
author | Edward Cree <ecree.xilinx@gmail.com> | 2022-09-26 19:57:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-28 09:43:22 +0100 |
commit | 9dc0cad203ab57efac34e6bcb67635edf3b62ebf (patch) | |
tree | eb1fdfdfb6f921c0190fead69650966a7e757f53 /drivers/net/ethernet/sfc/tc.h | |
parent | c87e4ad1d3a09504de0e573ff3a2ee3f04a24642 (diff) |
sfc: bind blocks for TC offload on EF100
Bind direct blocks for the MAE-admin PF and each VF representor.
Currently these connect to a stub efx_tc_flower() that only returns
-EOPNOTSUPP; subsequent patches will implement flower offloads to the
Match-Action Engine.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/tc.h')
-rw-r--r-- | drivers/net/ethernet/sfc/tc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/tc.h b/drivers/net/ethernet/sfc/tc.h index 309123c6b386..7b1a6fa0097d 100644 --- a/drivers/net/ethernet/sfc/tc.h +++ b/drivers/net/ethernet/sfc/tc.h @@ -11,6 +11,7 @@ #ifndef EFX_TC_H #define EFX_TC_H +#include <net/flow_offload.h> #include "net_driver.h" struct efx_tc_action_set { @@ -49,6 +50,7 @@ enum efx_tc_rule_prios { /** * struct efx_tc_state - control plane data for TC offload * + * @block_list: List of &struct efx_tc_block_binding * @reps_mport_id: MAE port allocated for representor RX * @reps_filter_uc: VNIC filter for representor unicast RX (promisc) * @reps_filter_mc: VNIC filter for representor multicast RX (allmulti) @@ -57,14 +59,17 @@ enum efx_tc_rule_prios { * %EFX_TC_PRIO_DFLT. Named by *ingress* port * @dflt.pf: rule for traffic ingressing from PF (egresses to wire) * @dflt.wire: rule for traffic ingressing from wire (egresses to PF) + * @up: have TC datastructures been set up? */ struct efx_tc_state { + struct list_head block_list; u32 reps_mport_id, reps_mport_vport_id; s32 reps_filter_uc, reps_filter_mc; struct { struct efx_tc_flow_rule pf; struct efx_tc_flow_rule wire; } dflt; + bool up; }; struct efx_rep; @@ -72,6 +77,8 @@ struct efx_rep; int efx_tc_configure_default_rule_rep(struct efx_rep *efv); void efx_tc_deconfigure_default_rule(struct efx_nic *efx, struct efx_tc_flow_rule *rule); +int efx_tc_flower(struct efx_nic *efx, struct net_device *net_dev, + struct flow_cls_offload *tc, struct efx_rep *efv); int efx_tc_insert_rep_filters(struct efx_nic *efx); void efx_tc_remove_rep_filters(struct efx_nic *efx); |