netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, pshelar@nicira.com,
	cwang@twopensource.com, ebiederm@xmission.com,
	david@gibson.dropbear.id.au, sfeldma@cumulusnetworks.com,
	sucheta.chakraborty@qlogic.com, stephen@networkplumber.org
Subject: Re: [patch net-next] openvswitch: introduce rtnl ops stub
Date: Thu, 12 Jun 2014 17:03:26 +0200	[thread overview]
Message-ID: <20140612150326.GD2974@minipsycho.orion> (raw)
In-Reply-To: <5399BD2D.6050609@6wind.com>

Thu, Jun 12, 2014 at 04:46:05PM CEST, nicolas.dichtel@6wind.com wrote:
>Le 12/06/2014 16:20, Jiri Pirko a écrit :
>>This stub now allows userspace to see IFLA_INFO_KIND for ovs master and
>>IFLA_INFO_SLAVE_KIND for slave.
>>
>>Note that I added ops->setup check into newlink and dellink in order to
>>prevent creating and deleting openvswitch instances using rtnl for now.
>>
>>Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>net-next is closed ;-)
>
>>---
>>  net/core/rtnetlink.c                 |  5 ++++-
>>  net/openvswitch/datapath.c           |  9 ++++++++-
>>  net/openvswitch/vport-internal_dev.c | 16 ++++++++++++++++
>>  net/openvswitch/vport-internal_dev.h |  2 ++
>>  4 files changed, 30 insertions(+), 2 deletions(-)
>>
>>diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>>index 233b5ae..b874139 100644
>>--- a/net/core/rtnetlink.c
>>+++ b/net/core/rtnetlink.c
>>@@ -1767,7 +1767,7 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
>>  		return -ENODEV;
>>
>>  	ops = dev->rtnl_link_ops;
>>-	if (!ops)
>>+	if (!ops || !ops->setup)
>>  		return -EOPNOTSUPP;
>>
>>  	ops->dellink(dev, &list_kill);
>>@@ -2028,6 +2028,9 @@ replay:
>>  			return -EOPNOTSUPP;
>>  		}
>>
>>+		if (!ops->setup)
>>+			return -EOPNOTSUPP;
>>+
>For this one, you could just add a ops->validate in openvswitch which returns
>always -EOPNOTSUPP.

yeah, I wanted the check in newlink and dellink to be the same

  reply	other threads:[~2014-06-12 15:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 14:20 [patch net-next] openvswitch: introduce rtnl ops stub Jiri Pirko
2014-06-12 14:46 ` Nicolas Dichtel
2014-06-12 15:03   ` Jiri Pirko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-25  8:27 Jiri Pirko
2014-06-25  8:34 ` Eric W. Biederman
2014-06-25  8:40   ` Jiri Pirko

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=20140612150326.GD2974@minipsycho.orion \
    --to=jiri@resnulli.us \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=david@gibson.dropbear.id.au \
    --cc=ebiederm@xmission.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=pshelar@nicira.com \
    --cc=sfeldma@cumulusnetworks.com \
    --cc=stephen@networkplumber.org \
    --cc=sucheta.chakraborty@qlogic.com \
    /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).