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:
Zhang Shengju 2017-06-01 15:37:02 +08:00 committed by David S. Miller
parent 0c34ca478a
commit 3a5f8997dc
6 changed files with 7 additions and 5 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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_ */