net/sched: act_ct: Enable hardware offload of flow table entires
Pass the zone's flow table instance on the flow action to the drivers. Thus, allowing drivers to register FT add/del/stats callbacks. Finally, enable hardware offload on the flow table instance. Signed-off-by: Paul Blakey <paulb@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8b3646d6e0
commit
edd5861e59
@@ -27,6 +27,7 @@ struct tcf_ct_params {
|
||||
struct rcu_head rcu;
|
||||
|
||||
struct tcf_ct_flow_table *ct_ft;
|
||||
struct nf_flowtable *nf_ft;
|
||||
};
|
||||
|
||||
struct tcf_ct {
|
||||
@@ -50,9 +51,18 @@ static inline int tcf_ct_action(const struct tc_action *a)
|
||||
return to_ct_params(a)->ct_action;
|
||||
}
|
||||
|
||||
static inline struct nf_flowtable *tcf_ct_ft(const struct tc_action *a)
|
||||
{
|
||||
return to_ct_params(a)->nf_ft;
|
||||
}
|
||||
|
||||
#else
|
||||
static inline uint16_t tcf_ct_zone(const struct tc_action *a) { return 0; }
|
||||
static inline int tcf_ct_action(const struct tc_action *a) { return 0; }
|
||||
static inline struct nf_flowtable *tcf_ct_ft(const struct tc_action *a)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif /* CONFIG_NF_CONNTRACK */
|
||||
|
||||
#if IS_ENABLED(CONFIG_NET_ACT_CT)
|
||||
|
||||
Reference in New Issue
Block a user