netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jpirko@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, eric.dumazet@gmail.com, jbrouer@redhat.com
Subject: [patch net-next 03/19] team: add mode priv to port
Date: Tue, 19 Jun 2012 17:54:05 +0200	[thread overview]
Message-ID: <1340121261-2966-4-git-send-email-jpirko@redhat.com> (raw)
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/team/team.c |    3 ++-
 include/linux/if_team.h |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 343f4ff..dea2d8a 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -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;
 
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index d45fcd5..54af95f 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -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;
 };
 
-- 
1.7.10.2

  parent reply	other threads:[~2012-06-19 15:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19 15:54 [patch net-next 00/19] team: couple of patches Jiri Pirko
2012-06-19 15:54 ` [patch net-next 01/19] team: make team_mode struct const Jiri Pirko
2012-06-19 15:54 ` [patch net-next 02/19] team: for nomode use dummy struct team_mode Jiri Pirko
2012-06-19 15:54 ` Jiri Pirko [this message]
2012-06-19 15:54 ` [patch net-next 04/19] team: lb: push hash counting into separate function Jiri Pirko
2012-06-19 15:54 ` [patch net-next 05/19] team: allow read/write-only options Jiri Pirko
2012-06-19 15:54 ` [patch net-next 06/19] team: introduce array options Jiri Pirko
2012-06-19 15:54 ` [patch net-next 07/19] team: comments: s/net\/drivers\/team/drivers\/net\/team/ Jiri Pirko
2012-06-19 15:54 ` [patch net-next 08/19] team: push array_index and port into separate structure Jiri Pirko
2012-06-19 15:54 ` [patch net-next 09/19] team: allow async option changes Jiri Pirko
2012-06-19 15:54 ` [patch net-next 10/19] team: fix error path in team_nl_fill_options_get() Jiri Pirko
2012-06-19 15:54 ` [patch net-next 11/19] team: fix error path in team_nl_fill_port_list_get() Jiri Pirko
2012-06-19 15:54 ` [patch net-next 12/19] team: allow to specify one option instance to be send to userspace Jiri Pirko
2012-06-19 15:54 ` [patch net-next 13/19] team: pass NULL to __team_option_inst_add() instead of 0 Jiri Pirko
2012-06-19 15:54 ` [patch net-next 14/19] team: add port_[enabled/disabled] mode callbacks Jiri Pirko
2012-06-19 15:54 ` [patch net-next 15/19] team: lb: introduce infrastructure for userspace driven tx loadbalancing Jiri Pirko
2012-06-19 15:54 ` [patch net-next 16/19] team: implement multipart netlink messages for options transfers Jiri Pirko
2012-06-19 15:54 ` [patch net-next 17/19] team: ensure correct order of netlink messages delivery Jiri Pirko
2012-06-19 15:54 ` [patch net-next 18/19] team: allow to send multiple set events in one message Jiri Pirko
2012-06-19 15:54 ` [patch net-next 19/19] team: use rcu_dereference_bh() in tx path Jiri Pirko
2012-06-19 22:01 ` [patch net-next 00/19] team: couple of patches David Miller
2012-06-20  6:40   ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340121261-2966-4-git-send-email-jpirko@redhat.com \
    --to=jpirko@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jbrouer@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).