aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/if_team.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index b1719e239a0b..30854cb0c855 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -83,6 +83,11 @@ enum team_option_type {
83 TEAM_OPTION_TYPE_BOOL, 83 TEAM_OPTION_TYPE_BOOL,
84}; 84};
85 85
86struct team_option_inst_info {
87 u32 array_index;
88 struct team_port *port; /* != NULL if per-port */
89};
90
86struct team_gsetter_ctx { 91struct team_gsetter_ctx {
87 union { 92 union {
88 u32 u32_val; 93 u32 u32_val;
@@ -93,8 +98,7 @@ struct team_gsetter_ctx {
93 } bin_val; 98 } bin_val;
94 bool bool_val; 99 bool bool_val;
95 } data; 100 } data;
96 u32 array_index; 101 struct team_option_inst_info *info;
97 struct team_port *port;
98}; 102};
99 103
100struct team_option { 104struct team_option {
@@ -103,6 +107,7 @@ struct team_option {
103 bool per_port; 107 bool per_port;
104 unsigned int array_size; /* != 0 means the option is array */ 108 unsigned int array_size; /* != 0 means the option is array */
105 enum team_option_type type; 109 enum team_option_type type;
110 int (*init)(struct team *team, struct team_option_inst_info *info);
106 int (*getter)(struct team *team, struct team_gsetter_ctx *ctx); 111 int (*getter)(struct team *team, struct team_gsetter_ctx *ctx);
107 int (*setter)(struct team *team, struct team_gsetter_ctx *ctx); 112 int (*setter)(struct team *team, struct team_gsetter_ctx *ctx);
108}; 113};