team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias
Add a new macro MODULE_ALIAS_TEAM_MODE to unify and simplify the declaration of team mode alias. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0c34ca478a
commit
3a5f8997dc
6 changed files with 7 additions and 5 deletions
|
@ -146,4 +146,4 @@ module_exit(ab_cleanup_module);
|
|||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Jiri Pirko <jpirko@redhat.com>");
|
||||
MODULE_DESCRIPTION("Active-backup mode for team");
|
||||
MODULE_ALIAS("team-mode-activebackup");
|
||||
MODULE_ALIAS_TEAM_MODE("activebackup");
|
||||
|
|
|
@ -75,4 +75,4 @@ module_exit(bc_cleanup_module);
|
|||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Jiri Pirko <jpirko@redhat.com>");
|
||||
MODULE_DESCRIPTION("Broadcast mode for team");
|
||||
MODULE_ALIAS("team-mode-broadcast");
|
||||
MODULE_ALIAS_TEAM_MODE("broadcast");
|
||||
|
|
|
@ -695,4 +695,4 @@ module_exit(lb_cleanup_module);
|
|||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Jiri Pirko <jpirko@redhat.com>");
|
||||
MODULE_DESCRIPTION("Load-balancing mode for team");
|
||||
MODULE_ALIAS("team-mode-loadbalance");
|
||||
MODULE_ALIAS_TEAM_MODE("loadbalance");
|
||||
|
|
|
@ -65,4 +65,4 @@ module_exit(rnd_cleanup_module);
|
|||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Jiri Pirko <jiri@resnulli.us>");
|
||||
MODULE_DESCRIPTION("Random mode for team");
|
||||
MODULE_ALIAS("team-mode-random");
|
||||
MODULE_ALIAS_TEAM_MODE("random");
|
||||
|
|
|
@ -77,4 +77,4 @@ module_exit(rr_cleanup_module);
|
|||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Jiri Pirko <jpirko@redhat.com>");
|
||||
MODULE_DESCRIPTION("Round-robin mode for team");
|
||||
MODULE_ALIAS("team-mode-roundrobin");
|
||||
MODULE_ALIAS_TEAM_MODE("roundrobin");
|
||||
|
|
|
@ -298,4 +298,6 @@ extern void team_mode_unregister(const struct team_mode *mode);
|
|||
#define TEAM_DEFAULT_NUM_TX_QUEUES 16
|
||||
#define TEAM_DEFAULT_NUM_RX_QUEUES 16
|
||||
|
||||
#define MODULE_ALIAS_TEAM_MODE(kind) MODULE_ALIAS("team-mode-" kind)
|
||||
|
||||
#endif /* _LINUX_IF_TEAM_H_ */
|
||||
|
|
Loading…
Reference in a new issue