From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 7/8] net: core: dev: Attach extack to NETDEV_PRE_UP Date: Wed, 5 Dec 2018 09:44:37 -0700 Message-ID: <36cfdf99-3caf-dd8e-ac65-da791e88d7f3@cumulusnetworks.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "ioana.ciornei@nxp.com" , "heiko.carstens@de.ibm.com" , "_govind@gmx.com" <_govind@gmx.com>, "shrijeet@gmail.com" , "ecree@solarflare.com" , "shuah@kernel.org" , "andy@greyhouse.net" , "johan.hedberg@gmail.com" , "sthemmin@microsoft.com" , "jwi@linux.ibm.com" , "pshelar@ovn.org" , "jgg@ziepe.ca" , "dledford@redhat.com" , "joabreu@synopsys.com" , "vfalico@gmail.com" , "kuznet@ms2.inr.ac.ru" , "yisen.zhuang@huawei.com" , "marcel@holtmann.org" , "pkaustub@cisco.com" , "jiri@resnulli.us" , "linux-rdma@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "devel@linuxdriverproject.org" , "linux-wireless@vger.kernel.org" , "linux-s390@vger.kernel.org" , "devel@driverdev.osuosl.org" , "sparmaintainer@unisys.com" , "linux-bluetooth@vger.kernel.org" , "dev@openvswitch.org" , "linux-kselftest@vger.kernel.org" Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org On 12/5/18 3:52 AM, Petr Machata wrote: > Drivers may need to validate configuration of a device that's about to > be upped. Should the validation fail, there's currently no way to > communicate details of the failure to the user, beyond an error number. > > To mend that, change __dev_open() to take an extack argument and pass it > from __dev_change_flags() and dev_open(), where it was propagated in the > previous patches. > > Change __dev_open() to call call_netdevice_notifiers_extack() so that > the passed-in extack is attached to the NETDEV_PRE_UP notifier. > > Signed-off-by: Petr Machata > Acked-by: Jiri Pirko > Reviewed-by: Ido Schimmel > --- > net/core/dev.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: David Ahern