Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753482AbdFWNbS (ORCPT ); Fri, 23 Jun 2017 09:31:18 -0400 Received: from s3.sipsolutions.net ([5.9.151.49]:49174 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbdFWNbR (ORCPT ); Fri, 23 Jun 2017 09:31:17 -0400 Message-ID: <1498224668.2595.5.camel@sipsolutions.net> Subject: Re: [PATCH net-next v3 1/6] vxlan: refactor verification and application of configuration From: Johannes Berg To: Matthias Schiffer , Jiri Benc Cc: davem@davemloft.net, hannes@stressinduktion.org, pshelar@ovn.org, aduyck@mirantis.com, roopa@cumulusnetworks.com, netdev@vger.kernel.org, dev@openvswitch.org, linux-kernel@vger.kernel.org Date: Fri, 23 Jun 2017 15:31:08 +0200 In-Reply-To: References: <6e2c8bb77be42834f1da5a3ca79f5e455574a136.1497825555.git.mschiffer@universe-factory.net> <20170623105220.18561f34@griffin> <113c3fe1-f490-d92d-2b4a-69b7115d8115@universe-factory.net> <1498213402.2595.3.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1339 Lines: 52 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