From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org
Cc: 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 16:46:05 +0200 [thread overview]
Message-ID: <5399BD2D.6050609@6wind.com> (raw)
In-Reply-To: <1402582808-10443-1-git-send-email-jiri@resnulli.us>
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.
next prev parent reply other threads:[~2014-06-12 14:46 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 [this message]
2014-06-12 15:03 ` Jiri Pirko
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=5399BD2D.6050609@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=david@gibson.dropbear.id.au \
--cc=ebiederm@xmission.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.