net_sched: fold tcf_block_cb_call() into tc_setup_cb_call()
Subsystems (5)
PATCH 1/1 net_sched: fold tcf_block_cb_call() into tc_setup_cb_call()
After commit 69bd48404f25 ("net/sched: Remove egdev mechanism"), tc_setup_cb_call() is nearly identical to tcf_block_cb_call(), so we can just fold tcf_block_cb_call() into tc_setup_cb_call() and remove its unused parameter 'exts'.
--- include/net/pkt_cls.h | 4 ++-- net/sched/cls_api.c | 46 +++++++++++++++++----------------------- net/sched/cls_bpf.c | 4 ++-- net/sched/cls_flower.c | 15 +++++-------- net/sched/cls_matchall.c | 5 ++--- net/sched/cls_u32.c | 8 +++---- 6 files changed, 35 insertions(+), 47 deletions(-)
include/net/pkt_cls.h +2 -2
@@ -619,8 +619,8 @@ tcf_match_indev(struct sk_buff *skb, int ifindex) }#endif /* CONFIG_NET_CLS_IND */ -int tc_setup_cb_call (struct tcf_block *block,struct tcf_exts *exts, -enum tc_setup_type type,void *type_data,bool err_stop); +int tc_setup_cb_call (struct tcf_block *block,enum tc_setup_type type, +void *type_data,bool err_stop);enum tc_block_command {TC_BLOCK_BIND ,
net/sched/cls_api.c +20 -26
59 lines not on this page · raw message
net/sched/cls_bpf.c +2 -2
@@ -169,7 +169,7 @@ static int cls_bpf_offload_cmd(struct tcf_proto *tp, struct cls_bpf_prog *prog,if (oldprog)tcf_block_offload_dec (block, &oldprog->gen_flags); - err =tc_setup_cb_call (block,NULL ,TC_SETUP_CLSBPF , &cls_bpf, skip_sw); + err =tc_setup_cb_call (block,TC_SETUP_CLSBPF , &cls_bpf, skip_sw);if (prog) {if (err <0 ) {cls_bpf_offload_cmd (tp, oldprog, prog, extack);
@@ -234,7 +234,7 @@ static void cls_bpf_offload_update_stats(struct tcf_proto *tp, cls_bpf.name = prog->bpf_name; cls_bpf.exts_integrated = prog->exts_integrated; -tc_setup_cb_call (block,NULL ,TC_SETUP_CLSBPF , &cls_bpf, false); +tc_setup_cb_call (block,TC_SETUP_CLSBPF , &cls_bpf, false); }static int cls_bpf_init (struct tcf_proto *tp)
net/sched/cls_flower.c +5 -10
@@ -368,8 +368,7 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f, cls_flower.command =TC_CLSFLOWER_DESTROY ; cls_flower.cookie = (unsigned long ) f; -tc_setup_cb_call (block, &f->exts,TC_SETUP_CLSFLOWER , - &cls_flower, false); +tc_setup_cb_call (block,TC_SETUP_CLSFLOWER , &cls_flower, false);tcf_block_offload_dec (block, &f->flags); }
@@ -391,8 +390,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp, cls_flower.exts = &f->exts; cls_flower.classid = f->res.classid; - err =tc_setup_cb_call (block, &f->exts,TC_SETUP_CLSFLOWER , - &cls_flower, skip_sw); + err =tc_setup_cb_call (block,TC_SETUP_CLSFLOWER , &cls_flower, skip_sw);if (err <0 ) {fl_hw_destroy_filter (tp, f,NULL );return err;
@@ -418,8 +416,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f) cls_flower.exts = &f->exts; cls_flower.classid = f->res.classid; -tc_setup_cb_call (block, &f->exts,TC_SETUP_CLSFLOWER , - &cls_flower, false); +tc_setup_cb_call (block,TC_SETUP_CLSFLOWER , &cls_flower, false); } static bool __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f,
@@ -1502,8 +1499,7 @@ static void fl_hw_create_tmplt(struct tcf_chain *chain,/* We don't care if driver (any of them) fails to handle this * call. It serves just as a hint for it. */ -tc_setup_cb_call (block,NULL ,TC_SETUP_CLSFLOWER , - &cls_flower, false); +tc_setup_cb_call (block,TC_SETUP_CLSFLOWER , &cls_flower, false); } static void fl_hw_destroy_tmplt(struct tcf_chain *chain,
@@ -1516,8 +1512,7 @@ static void fl_hw_destroy_tmplt(struct tcf_chain *chain, cls_flower.command =TC_CLSFLOWER_TMPLT_DESTROY ; cls_flower.cookie = (unsigned long ) tmplt; -tc_setup_cb_call (block,NULL ,TC_SETUP_CLSFLOWER , - &cls_flower, false); +tc_setup_cb_call (block,TC_SETUP_CLSFLOWER , &cls_flower, false); } static void *fl_tmplt_create(struct net *net, struct tcf_chain *chain,
net/sched/cls_matchall.c +2 -3
@@ -71,7 +71,7 @@ static void mall_destroy_hw_filter(struct tcf_proto *tp, cls_mall.command =TC_CLSMATCHALL_DESTROY ; cls_mall.cookie = cookie; -tc_setup_cb_call (block,NULL ,TC_SETUP_CLSMATCHALL , &cls_mall, false); +tc_setup_cb_call (block,TC_SETUP_CLSMATCHALL , &cls_mall, false);tcf_block_offload_dec (block, &head->flags); }
@@ -90,8 +90,7 @@ static int mall_replace_hw_filter(struct tcf_proto *tp, cls_mall.exts = &head->exts; cls_mall.cookie = cookie; - err =tc_setup_cb_call (block,NULL ,TC_SETUP_CLSMATCHALL , - &cls_mall, skip_sw); + err =tc_setup_cb_call (block,TC_SETUP_CLSMATCHALL , &cls_mall, skip_sw);if (err <0 ) {mall_destroy_hw_filter (tp, head, cookie,NULL );return err;
net/sched/cls_u32.c +4 -4
@@ -491,7 +491,7 @@ static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, cls_u32.hnode.handle = h->handle; cls_u32.hnode.prio = h->prio; -tc_setup_cb_call (block,NULL ,TC_SETUP_CLSU32 , &cls_u32, false); +tc_setup_cb_call (block,TC_SETUP_CLSU32 , &cls_u32, false); } static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h,
@@ -509,7 +509,7 @@ static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, cls_u32.hnode.handle = h->handle; cls_u32.hnode.prio = h->prio; - err =tc_setup_cb_call (block,NULL ,TC_SETUP_CLSU32 , &cls_u32, skip_sw); + err =tc_setup_cb_call (block,TC_SETUP_CLSU32 , &cls_u32, skip_sw);if (err <0 ) {u32_clear_hw_hnode (tp, h,NULL );return err;
@@ -533,7 +533,7 @@ static void u32_remove_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n, cls_u32.command =TC_CLSU32_DELETE_KNODE ; cls_u32.knode.handle = n->handle; -tc_setup_cb_call (block,NULL ,TC_SETUP_CLSU32 , &cls_u32, false); +tc_setup_cb_call (block,TC_SETUP_CLSU32 , &cls_u32, false);tcf_block_offload_dec (block, &n->flags); }
@@ -563,7 +563,7 @@ static int u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n,if (n->ht_down) cls_u32.knode.link_handle = ht->handle; - err =tc_setup_cb_call (block,NULL ,TC_SETUP_CLSU32 , &cls_u32, skip_sw); + err =tc_setup_cb_call (block,TC_SETUP_CLSU32 , &cls_u32, skip_sw);if (err <0 ) {u32_remove_hw_knode (tp, n,NULL );return err;
Signature · 1 line
2.19.2
Quoted 9 lines · Cong Wang
After commit
69bd48404f25("net/sched: Remove egdev mechanism"),tc_setup_cb_call()is nearly identical totcf_block_cb_call(), so we can just foldtcf_block_cb_call()intotc_setup_cb_call()and remove its unused parameter 'exts'.Fixes 69bd48404f25 ("net/sched: Remove egdev mechanism")Cc Oz Shlomo <[email protected]>Cc Jiri Pirko <[email protected]>Signed-off-by Cong Wang <[email protected]>
Thanks, I didn't want to nit pick too much on Oz's patch :)
The Fixes tag is superfluous, this is far from a bug, unnecessary noise for backporters.
Cong Wang
Acked-by Jakub KicinskiQuoted 12 lines · Jakub Kicinski
Quoted 9 lines · Cong Wang
After commit
69bd48404f25("net/sched: Remove egdev mechanism"),tc_setup_cb_call()is nearly identical totcf_block_cb_call(), so we can just foldtcf_block_cb_call()intotc_setup_cb_call()and remove its unused parameter 'exts'.Fixes 69bd48404f25 ("net/sched: Remove egdev mechanism")Cc Oz Shlomo <[email protected]>Cc Jiri Pirko <[email protected]>Signed-off-by Cong Wang <[email protected]>
Quoted 4 lines
Thanks, I didn't want to nit pick too much on Oz's patch :)
The Fixes tag is superfluous, this is far from a bug, unnecessary noise for backporters.
Odd, you just Acked a patch which uses Fixes tag for a newline change:
commit 10a5ce98539948affbdc28dc0f39a1b6b2307f9d
Author: Martin KaFai Lau <[email protected]> Date: Mon Dec 10 10:53:24 2018 -0800
bpf: bpftool: Fix newline and p_err issue
This patch fixes a few newline issues and also replaces p_err with p_info in prog.c
during prog dump")
Jakub, please guide me which Jakub I should trust. :)
Or you believe a newline change is more close to a bug fix than this?
Please help!
Thanks a lot!
Quoted 36 lines · Cong Wang
Quoted 11 lines · Jakub Kicinski
Quoted 9 lines · Cong Wang
After commit
69bd48404f25("net/sched: Remove egdev mechanism"),tc_setup_cb_call()is nearly identical totcf_block_cb_call(), so we can just foldtcf_block_cb_call()intotc_setup_cb_call()and remove its unused parameter 'exts'.Fixes 69bd48404f25 ("net/sched: Remove egdev mechanism")Cc Oz Shlomo <[email protected]>Cc Jiri Pirko <[email protected]>Signed-off-by Cong Wang <[email protected]>Quoted 4 lines
Thanks, I didn't want to nit pick too much on Oz's patch :)
The Fixes tag is superfluous, this is far from a bug, unnecessary noise for backporters.
Odd, you just Acked a patch which uses Fixes tag for a newline change:
commit
10a5ce98539948affbdc28dc0f39a1b6b2307f9dAuthor: Martin KaFai Lau <[email protected]> Date: Mon Dec 10 10:53:24 2018 -0800bpf: bpftool: Fix newline and
p_errissueThis patch fixes a few newline issues and also replaces
p_errwithp_infoinprog.cFixes b053b439b72a ("bpf: libbpf: bpftool: Print bpf_line_infoduring prog dump")
Cc Jakub Kicinski <[email protected]>Signed-off-by Martin KaFai Lau <[email protected]>Acked-by Jakub Kicinski <[email protected]>Signed-off-by Alexei Starovoitov <[email protected]>
Quoted 6 lines
Jakub, please guide me which Jakub I should trust. :)
Or you believe a newline change is more close to a bug fix than this?
Please help!
p_err() breaks JSON so it's an actual bug.
Cong Wang
Reviewed-by David AhernQuoted 2 lines · Jakub Kicinski
p_err()breaks JSON so it's an actual bug.
Fair enough. Mind to explain the following one to me? I know you were not involved but you didn't object it either.
commit 74be39ebba36e98a973ddb914fb41dc9e5129e36
Author: Nicolas Dichtel <[email protected]> Date: Mon Nov 26 15:42:02 2018 +0100
netns: remove net arg from rtnl_net_fill()
This argument is not used anymore.
If you want, I can show you more...
Where do you want to draw the line? :)
Thanks!
Quoted 9 lines · Tue, Dec 11, 2018 at 08:15:46PM CET, [email protected] wrote:
After commit
69bd48404f25("net/sched: Remove egdev mechanism"),tc_setup_cb_call()is nearly identical totcf_block_cb_call(), so we can just foldtcf_block_cb_call()intotc_setup_cb_call()and remove its unused parameter 'exts'.Fixes 69bd48404f25 ("net/sched: Remove egdev mechanism")Cc Oz Shlomo <[email protected]>Cc Jiri Pirko <[email protected]>Signed-off-by Cong Wang <[email protected]>
Quoted 9 lines · Cong Wang
After commit
69bd48404f25("net/sched: Remove egdev mechanism"),tc_setup_cb_call()is nearly identical totcf_block_cb_call(), so we can just foldtcf_block_cb_call()intotc_setup_cb_call()and remove its unused parameter 'exts'.Fixes 69bd48404f25 ("net/sched: Remove egdev mechanism")Cc Oz Shlomo <[email protected]>Cc Jiri Pirko <[email protected]>Signed-off-by Cong Wang <[email protected]>
From: Cong Wang <[email protected]>
Date: Tue, 11 Dec 2018 11:15:46 -0800
Quoted 9 lines
After commit
69bd48404f25("net/sched: Remove egdev mechanism"),tc_setup_cb_call()is nearly identical totcf_block_cb_call(), so we can just foldtcf_block_cb_call()intotc_setup_cb_call()and remove its unused parameter 'exts'.Fixes 69bd48404f25 ("net/sched: Remove egdev mechanism")Cc Oz Shlomo <[email protected]>Cc Jiri Pirko <[email protected]>Signed-off-by Cong Wang <[email protected]>
Applied.