Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601AbXFUKJo (ORCPT ); Thu, 21 Jun 2007 06:09:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751476AbXFUKJe (ORCPT ); Thu, 21 Jun 2007 06:09:34 -0400 Received: from wr-out-0506.google.com ([64.233.184.227]:33125 "EHLO wr-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbXFUKJd (ORCPT ); Thu, 21 Jun 2007 06:09:33 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LkLYZRljMRZ2PgcWXjLMBVWmMnSf1us4eeUc0H71YLhMr6H9kMPToW0dSzY52Ih3TxVpbbOH80k1BoYuGLBaBYo0/e01aPm+qv8T4HHKH3+/sOM2QnR7HSWq5UximP3A+rr7aDr/vUgGJgNQuMAF2yVKWPGHKKRcdqLbpkRsiRw= Message-ID: Date: Thu, 21 Jun 2007 15:39:32 +0530 From: "Satyam Sharma" To: "Keiichi KII" Subject: Re: [RFC][PATCH -mm take5 6/7] add ioctls for adding/removing target Cc: "Matt Mackall" , "Andrew Morton" , "David Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org In-Reply-To: <467A43B1.3010308@bx.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <466FC455.5060001@bx.jp.nec.com> <466FC76A.6050006@bx.jp.nec.com> <4677AA3D.7010604@bx.jp.nec.com> <467A43B1.3010308@bx.jp.nec.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2263 Lines: 49 Hi Keiichi, > > Please do consider configfs. Note that we'll have to lose the sysfs > > symlink from your target's kobject to the kobject of the ethernet > > device if we switch to configfs, but was that symlink needed for > > some essential functionality or was it simply for informational > > purpose? IMHO, this patchset only needs to bring in functionality > > to be able to create, destroy, and modify netconsole targets at > > run-time, and all these reconfiguration tasks would be handled > > quite well by configfs, AFAICT. > > It was for informational pupose. But, if we used symlink to the net_device > kobject in sysfs, we could easily keep up with changing network device name by > changing symbolic link. In that case (because it is non-essential) we can drop that link entirely. (This means the associated code for the temporary modify_list, the extra mutex and the kasprintf() stuff can also be dropped too!) I guess the netconsole_event() notifier could now become simply: if (event == NETDEV_CHANGENAME) { spin_lock_irqsave(&target_list_lock, ...); list_for_each_entry(nt, ..., &target_list, ...) if (nt->np.dev == dev) strcpy(nt->np.dev_name, dev->name); spin_unlock_irqrestore(&target_list_lock, ...); } > In the case of configfs, Do we use config_item related to the network interface > because the configfs doesn't have symlink that refers to net_device kobject > (e.g. "network_interface" in configfs, "network_interface" value is "eth0")? Yes, that's a good idea, this way we continue to give the information we were giving previously. We could do this by defining another configfs attribute of the target's config_item which could then be a proxy for the char dev_name[IFNAMSIZ] member of the target's underlying netpoll structure. (this attribute would naturally be read-only from userspace; sort of similar to what you're doing for the local_mac attribute currently). Please feel free to discuss anything else regarding this with me off-list, if you want. Thanks, Satyam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/