Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1673558

Re: [PATCH net-next v3 1/6] vxlan: refactor verification and application of configuration

From Johannes Berg <johannes@sipsolutions.net>
Newsgroups linux.kernel
Subject Re: [PATCH net-next v3 1/6] vxlan: refactor verification and application of configuration
Date 2017-06-23 15:40 +0200
Message-ID <tVwYy-2KP-13@gated-at.bofh.it> (permalink)
References (1 earlier) <tTZUZ-8vX-11@gated-at.bofh.it> <tVsBA-8nM-23@gated-at.bofh.it> <tVtQZ-Rn-9@gated-at.bofh.it> <tVu0G-Vv-15@gated-at.bofh.it> <tVvzs-1Yc-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2017-06-23 at 14:02 +0200, Matthias Schiffer wrote:
> 
> It seems though that rtnl_link_ops.newlink/changelink don't allow
> passing the extack yet... how do we proceed here? Treewide change
> (maybe by someone who knows their Coccinelle-fu?), or would the
> introduction of new versions of the newlink and changelink fields be
> more acceptable, so drivers can be moved to the new API one by one?

I think treewide change is easy enough, this seems to work:

@ops1@
identifier newfn, ops;
@@
static struct rtnl_link_ops ops = {
	.newlink = newfn,
...
};

@@
identifier ops1.newfn;
identifier src_net, dev, tb, data;
@@
-int newfn(struct net *src_net, struct net_device *dev,
-	   struct nlattr *tb[], struct nlattr *data[])
+int newfn(struct net *src_net, struct net_device *dev,
+	   struct nlattr *tb[], struct nlattr *data[],
+	   struct netlink_ext_ack *extack)
{...}

@ops2@
identifier chfn, ops;
@@
static struct rtnl_link_ops ops = {
	.changelink = chfn,
...
};

@@
identifier ops2.chfn;
identifier dev, tb, data;
@@
-int chfn(struct net_device *dev,
-	  struct nlattr *tb[], struct nlattr *data[])
+int chfn(struct net_device *dev,
+	  struct nlattr *tb[], struct nlattr *data[],
+	  struct netlink_ext_ack *extack)
{...}

I guess if there are any stragglers you'd find them by compile-testing
:)

johannes

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH net-next v3 1/6] vxlan: refactor verification and  application of configuration Jiri Benc <jbenc@redhat.com> - 2017-06-23 11:00 +0200
  Re: [PATCH net-next v3 1/6] vxlan: refactor verification and  application of configuration Matthias Schiffer <mschiffer@universe-factory.net> - 2017-06-23 12:20 +0200
    Re: [PATCH net-next v3 1/6] vxlan: refactor verification and  application of configuration Johannes Berg <johannes@sipsolutions.net> - 2017-06-23 12:30 +0200
      Re: [PATCH net-next v3 1/6] vxlan: refactor verification and  application of configuration Matthias Schiffer <mschiffer@universe-factory.net> - 2017-06-23 14:10 +0200
        Re: [PATCH net-next v3 1/6] vxlan: refactor verification and  application of configuration Johannes Berg <johannes@sipsolutions.net> - 2017-06-23 15:40 +0200

csiph-web