From patchwork Thu Feb 10 02:54:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xiaotian Feng X-Patchwork-Id: 82558 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 90C95B7118 for ; Thu, 10 Feb 2011 13:54:55 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037Ab1BJCyv (ORCPT ); Wed, 9 Feb 2011 21:54:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59439 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753495Ab1BJCyu (ORCPT ); Wed, 9 Feb 2011 21:54:50 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1A2sfEp029486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Feb 2011 21:54:41 -0500 Received: from danny.redhat (dhcp-65-176.nay.redhat.com [10.66.65.176]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1A2sa74031414; Wed, 9 Feb 2011 21:54:37 -0500 Message-ID: <4D53536B.2010505@redhat.com> Date: Thu, 10 Feb 2011 10:54:35 +0800 From: Xiaotian Feng User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: David Miller CC: netdev@vger.kernel.org, eric.dumazet@gmail.com, therbert@google.com, ebiederm@xmission.com, shemminger@vyatta.com, ddvlad@rosedu.org Subject: Re: [RFC PATCH net-next] net: rename group sysfs entry to netdev_group References: <1297248769-28530-1-git-send-email-dfeng@redhat.com> <20110209.140323.39178091.davem@davemloft.net> <20110209.140558.59676278.davem@davemloft.net> In-Reply-To: <20110209.140558.59676278.davem@davemloft.net> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 02/10/2011 06:05 AM, David Miller wrote: > From: David Miller > Date: Wed, 09 Feb 2011 14:03:23 -0800 (PST) > >> From: Xiaotian feng >> Date: Wed, 9 Feb 2011 18:52:49 +0800 >> >>> From: Xiaotian Feng >>> >>> commit a512b92 adds sysfs entry for net device group, but >>> before this commit, tun also uses group sysfs, so after this >>> commit checkin, kernel warns like this: >>> sysfs: cannot create duplicate filename '/devices/virtual/net/vnet0/group' >>> >>> Since tun has used this for years, rename sysfs under tun might >>> break existing userspace, so rename group sysfs entry for net device >>> group is a better choice. >>> >>> Signed-off-by: Xiaotian Feng >> >> I don't think we have much choice in this matter, so I have applied >> this patch, thanks! > > Wait, you didn't even build test this patch?!?!?!?! > > net/core/net-sysfs.c: In function ‘format_netdev_group’: > net/core/net-sysfs.c:298: error: ‘const struct net_device’ has no member named ‘netdev_group’ > net/core/net-sysfs.c: At top level: > net/core/net-sysfs.c:333: error: ‘show_group’ undeclared here (not in a function) > > "RFC" doesn't preclude you from at least build testing patches you > post. > > Sigh... > Sorry, my bad ... v2 patch is attatched, I've built and r/w this renamed sysfs, all work fine now. Sorry again about my carelessness ... Regards Xiaotian > > From 35388da8821a72a71f54cb955146a881f916eb25 Mon Sep 17 00:00:00 2001 From: Xiaotian Feng Date: Thu, 10 Feb 2011 10:48:53 +0800 Subject: [PATCH net-next v2] net: rename group sysfs entry to netdev_group commit a512b92 adds sysfs entry for net device group, but before this commit, tun also uses group sysfs, so after this commit checkin, kernel warns like this: sysfs: cannot create duplicate filename '/devices/virtual/net/vnet0/group' Since tun has used this for years, rename sysfs under tun might break existing userspace, so rename group sysfs entry for net device group is a better choice. Signed-off-by: Xiaotian Feng Cc: "David S. Miller" Cc: Eric Dumazet Cc: Tom Herbert Cc: "Eric W. Biederman" Cc: Stephen Hemminger Cc: Vlad Dogaru --- net/core/net-sysfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 2e4a393..5ceb257 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -330,7 +330,7 @@ static struct device_attribute net_class_attributes[] = { __ATTR(flags, S_IRUGO | S_IWUSR, show_flags, store_flags), __ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len, store_tx_queue_len), - __ATTR(group, S_IRUGO | S_IWUSR, show_group, store_group), + __ATTR(netdev_group, S_IRUGO | S_IWUSR, show_group, store_group), {} };