* [RFC PATCH net-next] net: rename group sysfs entry to netdev_group
@ 2011-02-09 10:52 Xiaotian feng
2011-02-09 22:03 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Xiaotian feng @ 2011-02-09 10:52 UTC (permalink / raw)
To: netdev
Cc: Xiaotian Feng, David S. Miller, Eric Dumazet, Tom Herbert,
Eric W. Biederman, Stephen Hemminger, Vlad Dogaru
From: Xiaotian Feng <dfeng@redhat.com>
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 <dfeng@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Vlad Dogaru <ddvlad@rosedu.org>
---
net/core/net-sysfs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 2e4a393..eb4b5e0 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -295,7 +295,7 @@ static ssize_t show_ifalias(struct device *dev,
return ret;
}
-NETDEVICE_SHOW(group, fmt_dec);
+NETDEVICE_SHOW(netdev_group, fmt_dec);
static int change_group(struct net_device *net, unsigned long new_group)
{
@@ -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),
{}
};
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC PATCH net-next] net: rename group sysfs entry to netdev_group
2011-02-09 10:52 [RFC PATCH net-next] net: rename group sysfs entry to netdev_group Xiaotian feng
@ 2011-02-09 22:03 ` David Miller
2011-02-09 22:05 ` David Miller
2011-02-10 9:11 ` Vlad Dogaru
0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2011-02-09 22:03 UTC (permalink / raw)
To: dfeng; +Cc: netdev, eric.dumazet, therbert, ebiederm, shemminger, ddvlad
From: Xiaotian feng <dfeng@redhat.com>
Date: Wed, 9 Feb 2011 18:52:49 +0800
> From: Xiaotian Feng <dfeng@redhat.com>
>
> 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 <dfeng@redhat.com>
I don't think we have much choice in this matter, so I have applied
this patch, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH net-next] net: rename group sysfs entry to netdev_group
2011-02-09 22:03 ` David Miller
@ 2011-02-09 22:05 ` David Miller
2011-02-10 2:54 ` Xiaotian Feng
2011-02-10 9:11 ` Vlad Dogaru
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2011-02-09 22:05 UTC (permalink / raw)
To: dfeng; +Cc: netdev, eric.dumazet, therbert, ebiederm, shemminger, ddvlad
From: David Miller <davem@davemloft.net>
Date: Wed, 09 Feb 2011 14:03:23 -0800 (PST)
> From: Xiaotian feng <dfeng@redhat.com>
> Date: Wed, 9 Feb 2011 18:52:49 +0800
>
>> From: Xiaotian Feng <dfeng@redhat.com>
>>
>> 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 <dfeng@redhat.com>
>
> 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...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH net-next] net: rename group sysfs entry to netdev_group
2011-02-09 22:05 ` David Miller
@ 2011-02-10 2:54 ` Xiaotian Feng
2011-02-10 3:16 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Xiaotian Feng @ 2011-02-10 2:54 UTC (permalink / raw)
To: David Miller; +Cc: netdev, eric.dumazet, therbert, ebiederm, shemminger, ddvlad
[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]
On 02/10/2011 06:05 AM, David Miller wrote:
> From: David Miller<davem@davemloft.net>
> Date: Wed, 09 Feb 2011 14:03:23 -0800 (PST)
>
>> From: Xiaotian feng<dfeng@redhat.com>
>> Date: Wed, 9 Feb 2011 18:52:49 +0800
>>
>>> From: Xiaotian Feng<dfeng@redhat.com>
>>>
>>> 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<dfeng@redhat.com>
>>
>> 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
>
>
[-- Attachment #2: 0001-net-rename-group-sysfs-entry-to-netdev_group.patch --]
[-- Type: text/plain, Size: 1535 bytes --]
>From 35388da8821a72a71f54cb955146a881f916eb25 Mon Sep 17 00:00:00 2001
From: Xiaotian Feng <dfeng@redhat.com>
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 <dfeng@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Vlad Dogaru <ddvlad@rosedu.org>
---
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),
{}
};
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC PATCH net-next] net: rename group sysfs entry to netdev_group
2011-02-10 2:54 ` Xiaotian Feng
@ 2011-02-10 3:16 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-02-10 3:16 UTC (permalink / raw)
To: dfeng; +Cc: netdev, eric.dumazet, therbert, ebiederm, shemminger, ddvlad
From: Xiaotian Feng <dfeng@redhat.com>
Date: Thu, 10 Feb 2011 10:54:35 +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 <dfeng@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH net-next] net: rename group sysfs entry to netdev_group
2011-02-09 22:03 ` David Miller
2011-02-09 22:05 ` David Miller
@ 2011-02-10 9:11 ` Vlad Dogaru
1 sibling, 0 replies; 6+ messages in thread
From: Vlad Dogaru @ 2011-02-10 9:11 UTC (permalink / raw)
To: David Miller; +Cc: dfeng, netdev, eric.dumazet, therbert, ebiederm, shemminger
On Wed, Feb 09, 2011 at 02:03:23PM -0800, David Miller wrote:
> From: Xiaotian feng <dfeng@redhat.com>
> Date: Wed, 9 Feb 2011 18:52:49 +0800
>
> > From: Xiaotian Feng <dfeng@redhat.com>
> >
> > 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.
I was not aware of that, sorry for breaking things :)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-02-10 9:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-09 10:52 [RFC PATCH net-next] net: rename group sysfs entry to netdev_group Xiaotian feng
2011-02-09 22:03 ` David Miller
2011-02-09 22:05 ` David Miller
2011-02-10 2:54 ` Xiaotian Feng
2011-02-10 3:16 ` David Miller
2011-02-10 9:11 ` Vlad Dogaru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).