team: add mode priv to port
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d299cd5116
commit
5149ee5838
@@ -793,7 +793,8 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
|
|||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
port = kzalloc(sizeof(struct team_port), GFP_KERNEL);
|
port = kzalloc(sizeof(struct team_port) + team->mode->port_priv_size,
|
||||||
|
GFP_KERNEL);
|
||||||
if (!port)
|
if (!port)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ struct team_port {
|
|||||||
} orig;
|
} orig;
|
||||||
|
|
||||||
struct rcu_head rcu;
|
struct rcu_head rcu;
|
||||||
|
long mode_priv[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct team_mode_ops {
|
struct team_mode_ops {
|
||||||
@@ -108,6 +109,7 @@ struct team_mode {
|
|||||||
const char *kind;
|
const char *kind;
|
||||||
struct module *owner;
|
struct module *owner;
|
||||||
size_t priv_size;
|
size_t priv_size;
|
||||||
|
size_t port_priv_size;
|
||||||
const struct team_mode_ops *ops;
|
const struct team_mode_ops *ops;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user