Skip to content

Commit

Permalink
team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias
Browse files Browse the repository at this point in the history
Add a new macro MODULE_ALIAS_TEAM_MODE to unify and simplify the
declaration of team mode alias.

Signed-off-by: Zhang Shengju <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Zhang Shengju authored and davem330 committed Jun 2, 2017
1 parent 0c34ca4 commit 3a5f899
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/net/team/team_mode_activebackup.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ module_exit(ab_cleanup_module);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Jiri Pirko <[email protected]>");
MODULE_DESCRIPTION("Active-backup mode for team");
MODULE_ALIAS("team-mode-activebackup");
MODULE_ALIAS_TEAM_MODE("activebackup");
2 changes: 1 addition & 1 deletion drivers/net/team/team_mode_broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ module_exit(bc_cleanup_module);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Jiri Pirko <[email protected]>");
MODULE_DESCRIPTION("Broadcast mode for team");
MODULE_ALIAS("team-mode-broadcast");
MODULE_ALIAS_TEAM_MODE("broadcast");
2 changes: 1 addition & 1 deletion drivers/net/team/team_mode_loadbalance.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,4 +695,4 @@ module_exit(lb_cleanup_module);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Jiri Pirko <[email protected]>");
MODULE_DESCRIPTION("Load-balancing mode for team");
MODULE_ALIAS("team-mode-loadbalance");
MODULE_ALIAS_TEAM_MODE("loadbalance");
2 changes: 1 addition & 1 deletion drivers/net/team/team_mode_random.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ module_exit(rnd_cleanup_module);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Jiri Pirko <[email protected]>");
MODULE_DESCRIPTION("Random mode for team");
MODULE_ALIAS("team-mode-random");
MODULE_ALIAS_TEAM_MODE("random");
2 changes: 1 addition & 1 deletion drivers/net/team/team_mode_roundrobin.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ module_exit(rr_cleanup_module);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Jiri Pirko <[email protected]>");
MODULE_DESCRIPTION("Round-robin mode for team");
MODULE_ALIAS("team-mode-roundrobin");
MODULE_ALIAS_TEAM_MODE("roundrobin");
2 changes: 2 additions & 0 deletions include/linux/if_team.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */

0 comments on commit 3a5f899

Please sign in to comment.