linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Schiffer <mschiffer@universe-factory.net>
To: dledford@redhat.com, sean.hefty@intel.com,
	hal.rosenstock@gmail.com, j.vosburgh@gmail.com,
	vfalico@gmail.com, andy@greyhouse.net, wg@grandegger.com,
	mkl@pengutronix.de, pablo@netfilter.org, laforge@gnumonks.org,
	paulus@samba.org, jiri@resnulli.us, dsa@cumulusnetworks.com,
	shm@cumulusnetworks.com, davem@davemloft.net,
	stephen@networkplumber.org, arvid.brodin@alten.se,
	alex.aring@gmail.com, stefan@osg.samsung.com,
	kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
	kaber@trash.net, steffen.klassert@secunet.com,
	herbert@gondor.apana.org.au, johannes@sipsolutions.net
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-can@vger.kernel.org,
	linux-ppp@vger.kernel.org, linux-wpan@vger.kernel.org
Subject: [PATCH net-next v2 5/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_validate
Date: Sun, 25 Jun 2017 21:56:03 +0000	[thread overview]
Message-ID: <ae78184571760c3430159ea5a654e3d08ba2479d.1498425679.git.mschiffer@universe-factory.net> (raw)
In-Reply-To: <cover.1498425679.git.mschiffer@universe-factory.net>

Add support for extended error reporting.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
---
 include/net/rtnetlink.h | 3 ++-
 net/core/rtnetlink.c    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index baf99e173dca..abe6b733d473 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -91,7 +91,8 @@ struct rtnl_link_ops {
 	int			slave_maxtype;
 	const struct nla_policy	*slave_policy;
 	int			(*slave_validate)(struct nlattr *tb[],
-						  struct nlattr *data[]);
+						  struct nlattr *data[],
+						  struct netlink_ext_ack *extack);
 	int			(*slave_changelink)(struct net_device *dev,
 						    struct net_device *slave_dev,
 						    struct nlattr *tb[],
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 658a48959fc4..ed51de525a88 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2601,7 +2601,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
 				slave_data = slave_attr;
 			}
 			if (m_ops->slave_validate) {
-				err = m_ops->slave_validate(tb, slave_data);
+				err = m_ops->slave_validate(tb, slave_data,
+							    extack);
 				if (err < 0)
 					return err;
 			}
-- 
2.13.1


  parent reply	other threads:[~2017-06-25 21:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25 21:55 [PATCH net-next v2 0/5] net: add netlink_ext_ack support to rtnl_link_ops Matthias Schiffer
2017-06-25 21:55 ` [PATCH net-next v2 1/5] net: add netlink_ext_ack argument to rtnl_link_ops.newlink Matthias Schiffer
2017-06-26  4:02   ` David Ahern
2017-06-25 21:56 ` [PATCH net-next v2 2/5] net: add netlink_ext_ack argument to rtnl_link_ops.changelink Matthias Schiffer
2017-06-26  4:03   ` David Ahern
2017-06-25 21:56 ` [PATCH net-next v2 3/5] net: add netlink_ext_ack argument to rtnl_link_ops.validate Matthias Schiffer
     [not found]   ` <51f1b1e0b81216ce08a2c846c7eac6fb58e9d667.1498425679.git.mschiffer-Nyw9WiXk/RKXhJHkyCwd5uTW4wlIGRCZ@public.gmane.org>
2017-06-26  4:04     ` David Ahern
2017-06-25 21:56 ` [PATCH net-next v2 4/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink Matthias Schiffer
2017-06-26  4:04   ` David Ahern
     [not found]     ` <b097a69e-4449-b124-c39e-4dbdbae7c218-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-26  4:08       ` David Ahern
2017-06-26  8:43         ` Matthias Schiffer
2017-06-26 13:33           ` David Ahern
2017-06-26 13:45             ` Matthias Schiffer
2017-06-26 13:47               ` David Ahern
2017-06-25 21:56 ` Matthias Schiffer [this message]
2017-06-26  4:05   ` [PATCH net-next v2 5/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_validate David Ahern
2017-06-26  4:08     ` David Ahern
2017-06-27  3:13 ` [PATCH net-next v2 0/5] net: add netlink_ext_ack support to rtnl_link_ops David Miller

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=ae78184571760c3430159ea5a654e3d08ba2479d.1498425679.git.mschiffer@universe-factory.net \
    --to=mschiffer@universe-factory.net \
    --cc=alex.aring@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=arvid.brodin@alten.se \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=dsa@cumulusnetworks.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=j.vosburgh@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=jmorris@namei.org \
    --cc=johannes@sipsolutions.net \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=laforge@gnumonks.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=paulus@samba.org \
    --cc=sean.hefty@intel.com \
    --cc=shm@cumulusnetworks.com \
    --cc=stefan@osg.samsung.com \
    --cc=steffen.klassert@secunet.com \
    --cc=stephen@networkplumber.org \
    --cc=vfalico@gmail.com \
    --cc=wg@grandegger.com \
    --cc=yoshfuji@linux-ipv6.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).