提交 5149ee58 编写于 作者: J Jiri Pirko 提交者: David S. Miller

team: add mode priv to port

Signed-off-by: NJiri Pirko <jpirko@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d299cd51
......@@ -793,7 +793,8 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
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)
return -ENOMEM;
......
......@@ -61,6 +61,7 @@ struct team_port {
} orig;
struct rcu_head rcu;
long mode_priv[0];
};
struct team_mode_ops {
......@@ -108,6 +109,7 @@ struct team_mode {
const char *kind;
struct module *owner;
size_t priv_size;
size_t port_priv_size;
const struct team_mode_ops *ops;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册