team: add user_linkup and user_linkup_enabled per-port option

Allows userspace to setup linkup for ports. Default is to take linkup
directly from ethtool state.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2012-04-10 05:15:44 +00:00 committed by David S. Miller
parent 14f066bab1
commit 71472ec12c
2 changed files with 81 additions and 17 deletions

View file

@ -33,6 +33,24 @@ struct team_port {
struct team *team;
int index;
bool linkup; /* either state.linkup or user.linkup */
struct {
bool linkup;
u32 speed;
u8 duplex;
} state;
/* Values set by userspace */
struct {
bool linkup;
bool linkup_enabled;
} user;
/* Custom gennetlink interface related flags */
bool changed;
bool removed;
/*
* A place for storing original values of the device before it
* become a port.
@ -42,14 +60,6 @@ struct team_port {
unsigned int mtu;
} orig;
bool linkup;
u32 speed;
u8 duplex;
/* Custom gennetlink interface related flags */
bool changed;
bool removed;
struct rcu_head rcu;
};