Skip to content

Commit 241a94a

Browse files
Werkovkuba-moo
authored andcommitted
net/sched: Add module aliases for cls_,sch_,act_ modules
No functional change intended, aliases will be used in followup commits. Note for backporters: you may need to add aliases also for modules that are already removed in mainline kernel but still in your version. Patches were generated with the help of Coccinelle scripts like: cat >scripts/coccinelle/misc/tcf_alias.cocci <<EOD virtual patch virtual report @ haskernel @ @@ @ tcf_has_kind depends on report && haskernel @ identifier ops; constant K; @@ static struct tcf_proto_ops ops = { .kind = K, ... }; +char module_alias = K; EOD /usr/bin/spatch -D report --cocci-file scripts/coccinelle/misc/tcf_alias.cocci \ --dir . \ -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include \ -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi \ -I ./include/uapi -I ./include/generated/uapi \ --include ./include/linux/compiler-version.h --include ./include/linux/kconfig.h \ --jobs 8 --chunksize 1 2>/dev/null | \ sed 's/char module_alias = "\([^"]*\)";/MODULE_ALIAS_NET_CLS("\1");/' And analogously for: static struct tc_action_ops ops = { .kind = K, static struct Qdisc_ops ops = { .id = K, (Someone familiar would be able to fit those into one .cocci file without sed post processing.) Signed-off-by: Michal Koutný <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b265770 commit 241a94a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+56
-0
lines changed

net/sched/act_bpf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ static struct tc_action_ops act_bpf_ops __read_mostly = {
401401
.init = tcf_bpf_init,
402402
.size = sizeof(struct tcf_bpf),
403403
};
404+
MODULE_ALIAS_NET_ACT("bpf");
404405

405406
static __net_init int bpf_init_net(struct net *net)
406407
{

net/sched/act_connmark.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ static struct tc_action_ops act_connmark_ops = {
242242
.cleanup = tcf_connmark_cleanup,
243243
.size = sizeof(struct tcf_connmark_info),
244244
};
245+
MODULE_ALIAS_NET_ACT("connmark");
245246

246247
static __net_init int connmark_init_net(struct net *net)
247248
{

net/sched/act_csum.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ static struct tc_action_ops act_csum_ops = {
709709
.offload_act_setup = tcf_csum_offload_act_setup,
710710
.size = sizeof(struct tcf_csum),
711711
};
712+
MODULE_ALIAS_NET_ACT("csum");
712713

713714
static __net_init int csum_init_net(struct net *net)
714715
{

net/sched/act_ct.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ static struct tc_action_ops act_ct_ops = {
16001600
.offload_act_setup = tcf_ct_offload_act_setup,
16011601
.size = sizeof(struct tcf_ct),
16021602
};
1603+
MODULE_ALIAS_NET_ACT("ct");
16031604

16041605
static __net_init int ct_init_net(struct net *net)
16051606
{

net/sched/act_ctinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ static struct tc_action_ops act_ctinfo_ops = {
363363
.cleanup= tcf_ctinfo_cleanup,
364364
.size = sizeof(struct tcf_ctinfo),
365365
};
366+
MODULE_ALIAS_NET_ACT("ctinfo");
366367

367368
static __net_init int ctinfo_init_net(struct net *net)
368369
{

net/sched/act_gact.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ static struct tc_action_ops act_gact_ops = {
296296
.offload_act_setup = tcf_gact_offload_act_setup,
297297
.size = sizeof(struct tcf_gact),
298298
};
299+
MODULE_ALIAS_NET_ACT("gact");
299300

300301
static __net_init int gact_init_net(struct net *net)
301302
{

net/sched/act_gate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ static struct tc_action_ops act_gate_ops = {
645645
.offload_act_setup = tcf_gate_offload_act_setup,
646646
.size = sizeof(struct tcf_gate),
647647
};
648+
MODULE_ALIAS_NET_ACT("gate");
648649

649650
static __net_init int gate_init_net(struct net *net)
650651
{

net/sched/act_ife.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,7 @@ static struct tc_action_ops act_ife_ops = {
889889
.init = tcf_ife_init,
890890
.size = sizeof(struct tcf_ife_info),
891891
};
892+
MODULE_ALIAS_NET_ACT("ife");
892893

893894
static __net_init int ife_init_net(struct net *net)
894895
{

net/sched/act_mirred.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ static struct tc_action_ops act_mirred_ops = {
643643
.size = sizeof(struct tcf_mirred),
644644
.get_dev = tcf_mirred_get_dev,
645645
};
646+
MODULE_ALIAS_NET_ACT("mirred");
646647

647648
static __net_init int mirred_init_net(struct net *net)
648649
{

net/sched/act_mpls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ static struct tc_action_ops act_mpls_ops = {
452452
.offload_act_setup = tcf_mpls_offload_act_setup,
453453
.size = sizeof(struct tcf_mpls),
454454
};
455+
MODULE_ALIAS_NET_ACT("mpls");
455456

456457
static __net_init int mpls_init_net(struct net *net)
457458
{

0 commit comments

Comments
 (0)