diff options
author | Paul Blakey <paulb@mellanox.com> | 2020-03-12 13:23:09 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-13 01:00:39 +0300 |
commit | edd5861e597b7ec2fae2fa3bc8180164045b5075 (patch) | |
tree | 53d58189c25c94f11c481b7361eb3f1570b3f261 /include/net/tc_act | |
parent | 8b3646d6e0c4ca4ba5615facaef1312d6d40d123 (diff) | |
download | linux-edd5861e597b7ec2fae2fa3bc8180164045b5075.tar.xz |
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>
Diffstat (limited to 'include/net/tc_act')
-rw-r--r-- | include/net/tc_act/tc_ct.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/tc_act/tc_ct.h b/include/net/tc_act/tc_ct.h index 735da5912974..79654bcb9a29 100644 --- a/include/net/tc_act/tc_ct.h +++ b/include/net/tc_act/tc_ct.h @@ -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) |