summaryrefslogtreecommitdiff
path: root/net/sched/act_ct.c
diff options
context:
space:
mode:
authorPaul Blakey <paulb@mellanox.com>2020-03-12 12:23:09 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-12 15:00:39 -0700
commitedd5861e597b7ec2fae2fa3bc8180164045b5075 (patch)
tree53d58189c25c94f11c481b7361eb3f1570b3f261 /net/sched/act_ct.c
parent8b3646d6e0c4ca4ba5615facaef1312d6d40d123 (diff)
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 'net/sched/act_ct.c')
-rw-r--r--net/sched/act_ct.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 16fc731e5b03..56b66d215a89 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -292,6 +292,7 @@ static int tcf_ct_flow_table_get(struct tcf_ct_params *params)
goto err_insert;
ct_ft->nf_ft.type = &flowtable_ct;
+ ct_ft->nf_ft.flags |= NF_FLOWTABLE_HW_OFFLOAD;
err = nf_flow_table_init(&ct_ft->nf_ft);
if (err)
goto err_init;
@@ -299,6 +300,7 @@ static int tcf_ct_flow_table_get(struct tcf_ct_params *params)
__module_get(THIS_MODULE);
out_unlock:
params->ct_ft = ct_ft;
+ params->nf_ft = &ct_ft->nf_ft;
mutex_unlock(&zones_mutex);
return 0;