Commit 5149ee58 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

team: add mode priv to port

Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d299cd51
...@@ -793,7 +793,8 @@ static int team_port_add(struct team *team, struct net_device *port_dev) ...@@ -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 { ...@@ -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 { ...@@ -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;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment