netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency
@ 2018-08-12 13:34 Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 01/13] net: sched: act_connmark method " Jamal Hadi Salim
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Having a structure (example tcf_mirred) and a function with the same name is
not good for readability or grepability.

This long overdue patchset improves it and make sure there is consistency
across all actions

Jamal Hadi Salim (13):
  net: sched: act_connmark method rename for grep-ability and
    consistency
  net: sched: act_bpf method rename for grep-ability and consistency
  net: sched: act_sum method rename for grep-ability and consistency
  net: sched: act_gact method rename for grep-ability and consistency
  net: sched: act_ipt method rename for grep-ability and consistency
  net: sched: act_nat method rename for grep-ability and consistency
  net: sched: act_pedit method rename for grep-ability and consistency
  net: sched: act_police method rename for grep-ability and consistency
  net: sched: act_simple method rename for grep-ability and consistency
  net: sched: act_skbedit method rename for grep-ability and consistency
  net: sched: act_skbmod method rename for grep-ability and consistency
  net: sched: act_vlan method rename for grep-ability and consistency
  net: sched: act_mirred method rename for grep-ability and consistency

 net/sched/act_bpf.c      |  6 +++---
 net/sched/act_connmark.c |  6 +++---
 net/sched/act_csum.c     |  6 +++---
 net/sched/act_gact.c     |  6 +++---
 net/sched/act_ipt.c      |  8 ++++----
 net/sched/act_mirred.c   |  6 +++---
 net/sched/act_nat.c      |  6 +++---
 net/sched/act_pedit.c    |  6 +++---
 net/sched/act_police.c   | 16 ++++++++--------
 net/sched/act_simple.c   |  6 +++---
 net/sched/act_skbedit.c  |  6 +++---
 net/sched/act_skbmod.c   |  4 ++--
 net/sched/act_vlan.c     |  6 +++---
 13 files changed, 44 insertions(+), 44 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 01/13] net: sched: act_connmark method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 02/13] net: sched: act_bpf " Jamal Hadi Salim
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_connmark.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c
index 2f9bc833d046..54c0bf54f2ac 100644
--- a/net/sched/act_connmark.c
+++ b/net/sched/act_connmark.c
@@ -31,8 +31,8 @@
 static unsigned int connmark_net_id;
 static struct tc_action_ops act_connmark_ops;
 
-static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
-			struct tcf_result *res)
+static int tcf_connmark_act(struct sk_buff *skb, const struct tc_action *a,
+			    struct tcf_result *res)
 {
 	const struct nf_conntrack_tuple_hash *thash;
 	struct nf_conntrack_tuple tuple;
@@ -209,7 +209,7 @@ static struct tc_action_ops act_connmark_ops = {
 	.kind		=	"connmark",
 	.type		=	TCA_ACT_CONNMARK,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_connmark,
+	.act		=	tcf_connmark_act,
 	.dump		=	tcf_connmark_dump,
 	.init		=	tcf_connmark_init,
 	.walk		=	tcf_connmark_walker,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 02/13] net: sched: act_bpf method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 01/13] net: sched: act_connmark method " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 03/13] net: sched: act_sum " Jamal Hadi Salim
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_bpf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index 9e8a33f9fee3..9b30e62805c7 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
@@ -34,8 +34,8 @@ struct tcf_bpf_cfg {
 static unsigned int bpf_net_id;
 static struct tc_action_ops act_bpf_ops;
 
-static int tcf_bpf(struct sk_buff *skb, const struct tc_action *act,
-		   struct tcf_result *res)
+static int tcf_bpf_act(struct sk_buff *skb, const struct tc_action *act,
+		       struct tcf_result *res)
 {
 	bool at_ingress = skb_at_tc_ingress(skb);
 	struct tcf_bpf *prog = to_bpf(act);
@@ -406,7 +406,7 @@ static struct tc_action_ops act_bpf_ops __read_mostly = {
 	.kind		=	"bpf",
 	.type		=	TCA_ACT_BPF,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_bpf,
+	.act		=	tcf_bpf_act,
 	.dump		=	tcf_bpf_dump,
 	.cleanup	=	tcf_bpf_cleanup,
 	.init		=	tcf_bpf_init,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 03/13] net: sched: act_sum method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 01/13] net: sched: act_connmark method " Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 02/13] net: sched: act_bpf " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 04/13] net: sched: act_gact " Jamal Hadi Salim
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_csum.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index f01c59ba6d12..5596fae4e478 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -555,8 +555,8 @@ static int tcf_csum_ipv6(struct sk_buff *skb, u32 update_flags)
 	return 0;
 }
 
-static int tcf_csum(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_csum_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_csum *p = to_tcf_csum(a);
 	struct tcf_csum_params *params;
@@ -670,7 +670,7 @@ static struct tc_action_ops act_csum_ops = {
 	.kind		= "csum",
 	.type		= TCA_ACT_CSUM,
 	.owner		= THIS_MODULE,
-	.act		= tcf_csum,
+	.act		= tcf_csum_act,
 	.dump		= tcf_csum_dump,
 	.init		= tcf_csum_init,
 	.cleanup	= tcf_csum_cleanup,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 04/13] net: sched: act_gact method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (2 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 03/13] net: sched: act_sum " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 05/13] net: sched: act_ipt " Jamal Hadi Salim
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_gact.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index bfccd34a3968..52a3e474d822 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -133,8 +133,8 @@ static int tcf_gact_init(struct net *net, struct nlattr *nla,
 	return ret;
 }
 
-static int tcf_gact(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_gact_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_gact *gact = to_gact(a);
 	int action = READ_ONCE(gact->tcf_action);
@@ -254,7 +254,7 @@ static struct tc_action_ops act_gact_ops = {
 	.kind		=	"gact",
 	.type		=	TCA_ACT_GACT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_gact,
+	.act		=	tcf_gact_act,
 	.stats_update	=	tcf_gact_stats_update,
 	.dump		=	tcf_gact_dump,
 	.init		=	tcf_gact_init,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 05/13] net: sched: act_ipt method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (3 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 04/13] net: sched: act_gact " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 06/13] net: sched: act_nat " Jamal Hadi Salim
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_ipt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index e149f0e66cb6..51f235bbeb5b 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -222,8 +222,8 @@ static int tcf_xt_init(struct net *net, struct nlattr *nla,
 			      bind);
 }
 
-static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a,
-		   struct tcf_result *res)
+static int tcf_ipt_act(struct sk_buff *skb, const struct tc_action *a,
+		       struct tcf_result *res)
 {
 	int ret = 0, result = 0;
 	struct tcf_ipt *ipt = to_ipt(a);
@@ -348,7 +348,7 @@ static struct tc_action_ops act_ipt_ops = {
 	.kind		=	"ipt",
 	.type		=	TCA_ACT_IPT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_ipt,
+	.act		=	tcf_ipt_act,
 	.dump		=	tcf_ipt_dump,
 	.cleanup	=	tcf_ipt_release,
 	.init		=	tcf_ipt_init,
@@ -406,7 +406,7 @@ static struct tc_action_ops act_xt_ops = {
 	.kind		=	"xt",
 	.type		=	TCA_ACT_XT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_ipt,
+	.act		=	tcf_ipt_act,
 	.dump		=	tcf_ipt_dump,
 	.cleanup	=	tcf_ipt_release,
 	.init		=	tcf_xt_init,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 06/13] net: sched: act_nat method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (4 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 05/13] net: sched: act_ipt " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 07/13] net: sched: act_pedit " Jamal Hadi Salim
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_nat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 4dd9188a72fd..822e903bfc25 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -93,8 +93,8 @@ static int tcf_nat_init(struct net *net, struct nlattr *nla, struct nlattr *est,
 	return ret;
 }
 
-static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
-		   struct tcf_result *res)
+static int tcf_nat_act(struct sk_buff *skb, const struct tc_action *a,
+		       struct tcf_result *res)
 {
 	struct tcf_nat *p = to_tcf_nat(a);
 	struct iphdr *iph;
@@ -311,7 +311,7 @@ static struct tc_action_ops act_nat_ops = {
 	.kind		=	"nat",
 	.type		=	TCA_ACT_NAT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_nat,
+	.act		=	tcf_nat_act,
 	.dump		=	tcf_nat_dump,
 	.init		=	tcf_nat_init,
 	.walk		=	tcf_nat_walker,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 07/13] net: sched: act_pedit method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (5 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 06/13] net: sched: act_nat " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 08/13] net: sched: act_police " Jamal Hadi Salim
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_pedit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 3f62da72ab6a..8a7a7cb94e83 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -288,8 +288,8 @@ static int pedit_skb_hdr_offset(struct sk_buff *skb,
 	return ret;
 }
 
-static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
-		     struct tcf_result *res)
+static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a,
+			 struct tcf_result *res)
 {
 	struct tcf_pedit *p = to_pedit(a);
 	int i;
@@ -471,7 +471,7 @@ static struct tc_action_ops act_pedit_ops = {
 	.kind		=	"pedit",
 	.type		=	TCA_ACT_PEDIT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_pedit,
+	.act		=	tcf_pedit_act,
 	.dump		=	tcf_pedit_dump,
 	.cleanup	=	tcf_pedit_cleanup,
 	.init		=	tcf_pedit_init,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 08/13] net: sched: act_police method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (6 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 07/13] net: sched: act_pedit " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 09/13] net: sched: act_simple " Jamal Hadi Salim
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_police.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 88c16d80c1cf..06f0742db593 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -56,7 +56,7 @@ struct tc_police_compat {
 static unsigned int police_net_id;
 static struct tc_action_ops act_police_ops;
 
-static int tcf_act_police_walker(struct net *net, struct sk_buff *skb,
+static int tcf_police_walker(struct net *net, struct sk_buff *skb,
 				 struct netlink_callback *cb, int type,
 				 const struct tc_action_ops *ops,
 				 struct netlink_ext_ack *extack)
@@ -73,7 +73,7 @@ static const struct nla_policy police_policy[TCA_POLICE_MAX + 1] = {
 	[TCA_POLICE_RESULT]	= { .type = NLA_U32 },
 };
 
-static int tcf_act_police_init(struct net *net, struct nlattr *nla,
+static int tcf_police_init(struct net *net, struct nlattr *nla,
 			       struct nlattr *est, struct tc_action **a,
 			       int ovr, int bind, bool rtnl_held,
 			       struct netlink_ext_ack *extack)
@@ -203,7 +203,7 @@ static int tcf_act_police_init(struct net *net, struct nlattr *nla,
 	return err;
 }
 
-static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a,
+static int tcf_police_act(struct sk_buff *skb, const struct tc_action *a,
 			  struct tcf_result *res)
 {
 	struct tcf_police *police = to_police(a);
@@ -267,7 +267,7 @@ static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a,
 	return police->tcf_action;
 }
 
-static int tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a,
+static int tcf_police_dump(struct sk_buff *skb, struct tc_action *a,
 			       int bind, int ref)
 {
 	unsigned char *b = skb_tail_pointer(skb);
@@ -335,10 +335,10 @@ static struct tc_action_ops act_police_ops = {
 	.kind		=	"police",
 	.type		=	TCA_ID_POLICE,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_act_police,
-	.dump		=	tcf_act_police_dump,
-	.init		=	tcf_act_police_init,
-	.walk		=	tcf_act_police_walker,
+	.act		=	tcf_police_act,
+	.dump		=	tcf_police_dump,
+	.init		=	tcf_police_init,
+	.walk		=	tcf_police_walker,
 	.lookup		=	tcf_police_search,
 	.delete		=	tcf_police_delete,
 	.size		=	sizeof(struct tcf_police),
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 09/13] net: sched: act_simple method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (7 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 08/13] net: sched: act_police " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 10/13] net: sched: act_skbedit " Jamal Hadi Salim
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_simple.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 18e4452574cd..e616523ba3c1 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -28,8 +28,8 @@ static unsigned int simp_net_id;
 static struct tc_action_ops act_simp_ops;
 
 #define SIMP_MAX_DATA	32
-static int tcf_simp(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_simp_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_defact *d = to_defact(a);
 
@@ -207,7 +207,7 @@ static struct tc_action_ops act_simp_ops = {
 	.kind		=	"simple",
 	.type		=	TCA_ACT_SIMP,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_simp,
+	.act		=	tcf_simp_act,
 	.dump		=	tcf_simp_dump,
 	.cleanup	=	tcf_simp_release,
 	.init		=	tcf_simp_init,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 10/13] net: sched: act_skbedit method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (8 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 09/13] net: sched: act_simple " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:34 ` [PATCH net-next 11/13] net: sched: act_skbmod " Jamal Hadi Salim
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_skbedit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c
index a6db47ebec11..926d7bc4a89d 100644
--- a/net/sched/act_skbedit.c
+++ b/net/sched/act_skbedit.c
@@ -33,8 +33,8 @@
 static unsigned int skbedit_net_id;
 static struct tc_action_ops act_skbedit_ops;
 
-static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a,
-		       struct tcf_result *res)
+static int tcf_skbedit_act(struct sk_buff *skb, const struct tc_action *a,
+			   struct tcf_result *res)
 {
 	struct tcf_skbedit *d = to_skbedit(a);
 	struct tcf_skbedit_params *params;
@@ -310,7 +310,7 @@ static struct tc_action_ops act_skbedit_ops = {
 	.kind		=	"skbedit",
 	.type		=	TCA_ACT_SKBEDIT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_skbedit,
+	.act		=	tcf_skbedit_act,
 	.dump		=	tcf_skbedit_dump,
 	.init		=	tcf_skbedit_init,
 	.cleanup	=	tcf_skbedit_cleanup,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 11/13] net: sched: act_skbmod method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (9 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 10/13] net: sched: act_skbedit " Jamal Hadi Salim
@ 2018-08-12 13:34 ` Jamal Hadi Salim
  2018-08-12 13:35 ` [PATCH net-next 12/13] net: sched: act_vlan " Jamal Hadi Salim
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_skbmod.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index e9c86ade3b40..d6a1af0c4171 100644
--- a/net/sched/act_skbmod.c
+++ b/net/sched/act_skbmod.c
@@ -24,7 +24,7 @@ static unsigned int skbmod_net_id;
 static struct tc_action_ops act_skbmod_ops;
 
 #define MAX_EDIT_LEN ETH_HLEN
-static int tcf_skbmod_run(struct sk_buff *skb, const struct tc_action *a,
+static int tcf_skbmod_act(struct sk_buff *skb, const struct tc_action *a,
 			  struct tcf_result *res)
 {
 	struct tcf_skbmod *d = to_skbmod(a);
@@ -270,7 +270,7 @@ static struct tc_action_ops act_skbmod_ops = {
 	.kind		=	"skbmod",
 	.type		=	TCA_ACT_SKBMOD,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_skbmod_run,
+	.act		=	tcf_skbmod_act,
 	.dump		=	tcf_skbmod_dump,
 	.init		=	tcf_skbmod_init,
 	.cleanup	=	tcf_skbmod_cleanup,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 12/13] net: sched: act_vlan method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (10 preceding siblings ...)
  2018-08-12 13:34 ` [PATCH net-next 11/13] net: sched: act_skbmod " Jamal Hadi Salim
@ 2018-08-12 13:35 ` Jamal Hadi Salim
  2018-08-12 13:35 ` [PATCH net-next 13/13] net: sched: act_mirred " Jamal Hadi Salim
  2018-08-13 16:00 ` [PATCH net-next 00/13] net: sched: actions " David Miller
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:35 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_vlan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 5bde17fe3608..d1f5028384c9 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
@@ -22,8 +22,8 @@
 static unsigned int vlan_net_id;
 static struct tc_action_ops act_vlan_ops;
 
-static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_vlan_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_vlan *v = to_vlan(a);
 	struct tcf_vlan_params *p;
@@ -307,7 +307,7 @@ static struct tc_action_ops act_vlan_ops = {
 	.kind		=	"vlan",
 	.type		=	TCA_ACT_VLAN,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_vlan,
+	.act		=	tcf_vlan_act,
 	.dump		=	tcf_vlan_dump,
 	.init		=	tcf_vlan_init,
 	.cleanup	=	tcf_vlan_cleanup,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next 13/13] net: sched: act_mirred method rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (11 preceding siblings ...)
  2018-08-12 13:35 ` [PATCH net-next 12/13] net: sched: act_vlan " Jamal Hadi Salim
@ 2018-08-12 13:35 ` Jamal Hadi Salim
  2018-08-13 16:00 ` [PATCH net-next 00/13] net: sched: actions " David Miller
  13 siblings, 0 replies; 15+ messages in thread
From: Jamal Hadi Salim @ 2018-08-12 13:35 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_mirred.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 327be257033d..8ec216001077 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -190,8 +190,8 @@ static int tcf_mirred_init(struct net *net, struct nlattr *nla,
 	return ret;
 }
 
-static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
-		      struct tcf_result *res)
+static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
+			  struct tcf_result *res)
 {
 	struct tcf_mirred *m = to_mirred(a);
 	struct sk_buff *skb2 = skb;
@@ -406,7 +406,7 @@ static struct tc_action_ops act_mirred_ops = {
 	.kind		=	"mirred",
 	.type		=	TCA_ACT_MIRRED,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_mirred,
+	.act		=	tcf_mirred_act,
 	.stats_update	=	tcf_stats_update,
 	.dump		=	tcf_mirred_dump,
 	.cleanup	=	tcf_mirred_release,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency
  2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
                   ` (12 preceding siblings ...)
  2018-08-12 13:35 ` [PATCH net-next 13/13] net: sched: act_mirred " Jamal Hadi Salim
@ 2018-08-13 16:00 ` David Miller
  13 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2018-08-13 16:00 UTC (permalink / raw)
  To: jhs; +Cc: xiyou.wangcong, jiri, netdev, kernel

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: Sun, 12 Aug 2018 09:34:48 -0400

> Having a structure (example tcf_mirred) and a function with the same name is
> not good for readability or grepability.
> 
> This long overdue patchset improves it and make sure there is consistency
> across all actions

Series applied.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-08-13 18:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-12 13:34 [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 01/13] net: sched: act_connmark method " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 02/13] net: sched: act_bpf " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 03/13] net: sched: act_sum " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 04/13] net: sched: act_gact " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 05/13] net: sched: act_ipt " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 06/13] net: sched: act_nat " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 07/13] net: sched: act_pedit " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 08/13] net: sched: act_police " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 09/13] net: sched: act_simple " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 10/13] net: sched: act_skbedit " Jamal Hadi Salim
2018-08-12 13:34 ` [PATCH net-next 11/13] net: sched: act_skbmod " Jamal Hadi Salim
2018-08-12 13:35 ` [PATCH net-next 12/13] net: sched: act_vlan " Jamal Hadi Salim
2018-08-12 13:35 ` [PATCH net-next 13/13] net: sched: act_mirred " Jamal Hadi Salim
2018-08-13 16:00 ` [PATCH net-next 00/13] net: sched: actions " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).