]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
flow_offload: fill flags to action structure
authorBaowen Zheng <baowen.zheng@corigine.com>
Fri, 17 Dec 2021 18:16:17 +0000 (19:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:55:59 +0000 (12:55 +0100)
[ Upstream commit 40bd094d65fc9f83941b024cde7c24516f036879 ]

Fill flags to action structure to allow user control if
the action should be offloaded to hardware or not.

Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 21c167aa0ba9 ("net/sched: act_ctinfo: use percpu stats")
Signed-off-by: Sasha Levin <sashal@kernel.org>
14 files changed:
net/sched/act_bpf.c
net/sched/act_connmark.c
net/sched/act_ctinfo.c
net/sched/act_gate.c
net/sched/act_ife.c
net/sched/act_ipt.c
net/sched/act_mpls.c
net/sched/act_nat.c
net/sched/act_pedit.c
net/sched/act_police.c
net/sched/act_sample.c
net/sched/act_simple.c
net/sched/act_skbedit.c
net/sched/act_skbmod.c

index a4c7ba35a3438a1f104bc018b0c9da54e59a780d..78f1cd70c8d199157e4f441e054a0a5e502b607e 100644 (file)
@@ -307,7 +307,7 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla,
        ret = tcf_idr_check_alloc(tn, &index, act, bind);
        if (!ret) {
                ret = tcf_idr_create(tn, index, est, act,
-                                    &act_bpf_ops, bind, true, 0);
+                                    &act_bpf_ops, bind, true, flags);
                if (ret < 0) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index 31d268eedf3f90a0312c8650d53185a0c061fbd8..b6576a250e851e393901df0d532c380e516f4148 100644 (file)
@@ -124,7 +124,7 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
        ret = tcf_idr_check_alloc(tn, &index, a, bind);
        if (!ret) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_connmark_ops, bind, false, 0);
+                                    &act_connmark_ops, bind, false, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index 06c74f22ab98b76bb3a43d69bcfb59c75eaeaa7c..9bde94e7bb939827ce44f5cf4c0e7f6a156e12ee 100644 (file)
@@ -212,7 +212,7 @@ static int tcf_ctinfo_init(struct net *net, struct nlattr *nla,
        err = tcf_idr_check_alloc(tn, &index, a, bind);
        if (!err) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_ctinfo_ops, bind, false, 0);
+                                    &act_ctinfo_ops, bind, false, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index a78cb79657182d6e1a87424f715cc151f29176f7..0e7568a06351b9db0ee4c833f5bb0550c16c9638 100644 (file)
@@ -357,7 +357,7 @@ static int tcf_gate_init(struct net *net, struct nlattr *nla,
 
        if (!err) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_gate_ops, bind, false, 0);
+                                    &act_gate_ops, bind, false, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index a2ddea04183afbf9ddd30e43ad29c4feec56332a..99548b2a1bc8331d9c8e10588eaa319ea88e07c0 100644 (file)
@@ -553,7 +553,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, est, a, &act_ife_ops,
-                                    bind, true, 0);
+                                    bind, true, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        kfree(p);
index 8dc3bec0d3258a020145352dd38dfde58be21099..080f2952cd536637e1b8c14b5488dfc64ff8f1ae 100644 (file)
@@ -144,7 +144,7 @@ static int __tcf_ipt_init(struct net *net, unsigned int id, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, est, a, ops, bind,
-                                    false, 0);
+                                    false, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index 09799412b248980898c07597dd0959b1a084651d..47b963ded4e432cbb41714a0d257c491359d2882 100644 (file)
@@ -254,7 +254,7 @@ static int tcf_mpls_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_mpls_ops, bind, true, 0);
+                                    &act_mpls_ops, bind, true, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index 1ebd2a86d980fc631a5f970543993f37aebdf3b1..8466dc25fe3974d4ea2966f475f4328ab960be5b 100644 (file)
@@ -61,7 +61,7 @@ static int tcf_nat_init(struct net *net, struct nlattr *nla, struct nlattr *est,
        err = tcf_idr_check_alloc(tn, &index, a, bind);
        if (!err) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_nat_ops, bind, false, 0);
+                                    &act_nat_ops, bind, false, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index 0d5463ddfd62f94e041ec8439ca3261d3b2e783a..db0d3bff19ebaf371da6c3575c8837b40cb08267 100644 (file)
@@ -189,7 +189,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
        err = tcf_idr_check_alloc(tn, &index, a, bind);
        if (!err) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_pedit_ops, bind, false, 0);
+                                    &act_pedit_ops, bind, false, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        goto out_free;
index 380733588959060e1b9aff44d0fd5f4ce49e257f..c30cd3ecb3911723e60e751e14e42fa197d21a84 100644 (file)
@@ -87,7 +87,7 @@ static int tcf_police_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, NULL, a,
-                                    &act_police_ops, bind, true, 0);
+                                    &act_police_ops, bind, true, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index 3ebf9ede3cf10cccc825305faec1a15b810fd120..2f0e98bcf494534e02f241de53395fb5d194533f 100644 (file)
@@ -69,7 +69,7 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_sample_ops, bind, true, 0);
+                                    &act_sample_ops, bind, true, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index a4f3d0f0daa969f4e78e363ff01f9d42991ee323..b9bbc87a87c5b8ee6c97886138f3321518b15dde 100644 (file)
@@ -128,7 +128,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_simp_ops, bind, false, 0);
+                                    &act_simp_ops, bind, false, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index e5f3fb8b00e32a0cc6bcd65cc3fdb54bcb2e0d6f..a5661f2d93e999049b71474b2e72da10838bbc65 100644 (file)
@@ -176,7 +176,7 @@ static int tcf_skbedit_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_skbedit_ops, bind, true, 0);
+                                    &act_skbedit_ops, bind, true, act_flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
index 8d17a543cc9fef921dfba1bb5fe10a6d4494f63b..aa98dcac94b952f1ea5047dcfdb9af0f1b9bd19a 100644 (file)
@@ -147,7 +147,7 @@ static int tcf_skbmod_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, est, a,
-                                    &act_skbmod_ops, bind, true, 0);
+                                    &act_skbmod_ops, bind, true, flags);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;