netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Gundersen <teg-B22kvLQNl6c@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Tom Gundersen <teg-B22kvLQNl6c@public.gmane.org>,
	dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
	David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH v8] net: openvswitch - set name assign type
Date: Thu, 17 Jul 2014 00:43:10 +0200	[thread overview]
Message-ID: <1405550594-11786-3-git-send-email-teg@jklm.no> (raw)
In-Reply-To: <1405550594-11786-1-git-send-email-teg-B22kvLQNl6c@public.gmane.org>

Signed-off-by: Tom Gundersen <teg-B22kvLQNl6c@public.gmane.org>
Cc: Pravin Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org
---

This patch goes on top of net-next.

 net/openvswitch/datapath.c           | 1 +
 net/openvswitch/vport-internal_dev.c | 2 +-
 net/openvswitch/vport.h              | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index fe95b6c..c1400c0 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1370,6 +1370,7 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info)
 
 	/* Set up our datapath device. */
 	parms.name = nla_data(a[OVS_DP_ATTR_NAME]);
+	parms.name_assign_type = NET_NAME_USER;
 	parms.type = OVS_VPORT_TYPE_INTERNAL;
 	parms.options = NULL;
 	parms.dp = dp;
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index bd65855..df185a7 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -165,7 +165,7 @@ static struct vport *internal_dev_create(const struct vport_parms *parms)
 	netdev_vport = netdev_vport_priv(vport);
 
 	netdev_vport->dev = alloc_netdev(sizeof(struct internal_dev),
-					 parms->name, NET_NAME_UNKNOWN,
+					 parms->name, parms->name_assign_type,
 					 do_setup);
 	if (!netdev_vport->dev) {
 		err = -ENOMEM;
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
index 8d721e6..a9d7480 100644
--- a/net/openvswitch/vport.h
+++ b/net/openvswitch/vport.h
@@ -97,6 +97,7 @@ struct vport {
  * struct vport_parms - parameters for creating a new vport
  *
  * @name: New vport's name.
+ * @name_assign_type: New vport's name's origin.
  * @type: New vport's type.
  * @options: %OVS_VPORT_ATTR_OPTIONS attribute from Netlink message, %NULL if
  * none was supplied.
@@ -105,6 +106,7 @@ struct vport {
  */
 struct vport_parms {
 	const char *name;
+	unsigned char name_assign_type;
 	enum ovs_vport_type type;
 	struct nlattr *options;
 
-- 
1.9.3

  parent reply	other threads:[~2014-07-16 22:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 22:43 [PATCH v8] net: set name assign type for names assigned using a static string Tom Gundersen
2014-07-16 22:43 ` [PATCH v8] net: isdn - set name assign type Tom Gundersen
     [not found] ` <1405550594-11786-1-git-send-email-teg-B22kvLQNl6c@public.gmane.org>
2014-07-16 22:43   ` Tom Gundersen [this message]
     [not found]     ` <1405550594-11786-3-git-send-email-teg-B22kvLQNl6c@public.gmane.org>
2014-07-16 23:00       ` [PATCH v8] net: openvswitch " Pravin Shelar
2014-07-16 23:16         ` Tom Gundersen
     [not found]           ` <CAG-2HqUY_mUDRjT6XrwX68FZvgvTVSzkbAOs-m9g3--ZhYQ5Kw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-16 23:24             ` Pravin Shelar
2014-07-16 22:43 ` [PATCH v8] net: vlan " Tom Gundersen
2014-07-16 22:43 ` [PATCH v8] net: nl80211 - make rdev_add_virtual_intf take name_assign_type Tom Gundersen
2014-07-16 22:43 ` [PATCH v8] net: nl802154 - make add_iface take name assign type Tom Gundersen
2014-07-16 22:43 ` [PATCH v8] net: ppp - set " Tom Gundersen
2014-07-17  6:56 ` [PATCH v8] net: set name assign type for names assigned using a static string David Miller
2014-07-17  7:17   ` Tom Gundersen
2014-07-17  7:26     ` Veaceslav Falico
2014-07-17  7:36       ` Tom Gundersen

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=1405550594-11786-3-git-send-email-teg@jklm.no \
    --to=teg-b22kvlqnl6c@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).