diff options
author | Michal Koutný <mkoutny@suse.com> | 2024-02-01 16:09:40 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-02 21:57:55 +0300 |
commit | b26577001af49a20f09770fd6e6cfd10d5daac93 (patch) | |
tree | 5a01fb04203fd98a79b304315761377a52dcddab /include/net/pkt_sched.h | |
parent | d81c0792e640586c8639cf10ac6d0a0e79da6466 (diff) | |
download | linux-b26577001af49a20f09770fd6e6cfd10d5daac93.tar.xz |
net/sched: Add helper macros with module names
The macros are preparation for adding module aliases en mass in a
separate commit.
Although it would be tempting to create aliases like cls-foo for name
cls_foo, this could not be used because modprobe utilities treat '-' and
'_' interchangeably.
In the end, the naming follows pattern of proto modules in linux/net.h.
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240201130943.19536-2-mkoutny@suse.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 1e200d9a066d..d7b7b6cd4aa1 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -100,6 +100,8 @@ struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, int register_qdisc(struct Qdisc_ops *qops); void unregister_qdisc(struct Qdisc_ops *qops); +#define NET_SCH_ALIAS_PREFIX "net-sch-" +#define MODULE_ALIAS_NET_SCH(id) MODULE_ALIAS(NET_SCH_ALIAS_PREFIX id) void qdisc_get_default(char *id, size_t len); int qdisc_set_default(const char *id); |