summaryrefslogtreecommitdiffstats
path: root/include/linux/if_team.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2012-06-19 05:54:10 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-19 15:00:23 -0700
commit85d59a87248de90e3266e10dce99477b60f524c0 (patch)
tree1642b59a05a69acdf8e9f754bce19864f3f66cbe /include/linux/if_team.h
parent0d572e45f7f8ae3a27c82c5f0e352abf1dcb67f4 (diff)
downloadop-kernel-dev-85d59a87248de90e3266e10dce99477b60f524c0.zip
op-kernel-dev-85d59a87248de90e3266e10dce99477b60f524c0.tar.gz
team: push array_index and port into separate structure
Introduce struct team_option_inst_info and push option instance info there. It can be then easily passed to gsetter context and used for feature async option changes. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_team.h')
-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 b1719e2..30854cb 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -83,6 +83,11 @@ enum team_option_type {
TEAM_OPTION_TYPE_BOOL,
};
+struct team_option_inst_info {
+ u32 array_index;
+ struct team_port *port; /* != NULL if per-port */
+};
+
struct team_gsetter_ctx {
union {
u32 u32_val;
@@ -93,8 +98,7 @@ struct team_gsetter_ctx {
} bin_val;
bool bool_val;
} data;
- u32 array_index;
- struct team_port *port;
+ struct team_option_inst_info *info;
};
struct team_option {
@@ -103,6 +107,7 @@ struct team_option {
bool per_port;
unsigned int array_size; /* != 0 means the option is array */
enum team_option_type type;
+ int (*init)(struct team *team, struct team_option_inst_info *info);
int (*getter)(struct team *team, struct team_gsetter_ctx *ctx);
int (*setter)(struct team *team, struct team_gsetter_ctx *ctx);
};
OpenPOWER on IntegriCloud