net: rename group sysfs entry to netdev_group
Subsystems (2)
RFC PATCH 1/1 net: rename group sysfs entry to netdev_group
From: Xiaotian Feng <[email protected]>
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.
--- net/core/net-sysfs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
net/core/net-sysfs.c +2 -2
@@ -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), {} };
Signature · 1 line
1.7.1
David Miller
maintainerFrom: Xiaotian feng <[email protected]>
Date: Wed, 9 Feb 2011 18:52:49 +0800
Quoted 7 lines
From: Xiaotian Feng <[email protected]>
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'
Quoted 5 lines
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 <[email protected]>
I don't think we have much choice in this matter, so I have applied this patch, thanks!
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Wed, 09 Feb 2011 14:03:23 -0800 (PST)
Quoted 10 lines
From: Xiaotian feng <[email protected]>
Date: Wed, 9 Feb 2011 18:52:49 +0800Quoted 7 lines
From: Xiaotian Feng <[email protected]>
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'
Quoted 8 lines
Quoted 5 lines
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 <[email protected]>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...
Quoted 29 lines · David Miller
From: David Miller<[email protected]>
Date: Wed, 09 Feb 2011 14:03:23 -0800 (PST)Quoted 10 lines
From: Xiaotian feng<[email protected]>
Date: Wed, 9 Feb 2011 18:52:49 +0800Quoted 7 lines
From: Xiaotian Feng<[email protected]>
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'Quoted 8 lines
Quoted 5 lines
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<[email protected]>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)
Quoted 5 lines
"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
Quoted 4 lines
From
35388da8821a72a71f54cb955146a881f916eb25Mon Sep 17 00:00:00 2001
From: Xiaotian Feng <[email protected]>
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.
--- net/core/net-sysfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/net-sysfs.c +1 -1
@@ -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), {} };
Signature · 1 line
1.7.1
From: Xiaotian Feng <[email protected]>
Date: Thu, 10 Feb 2011 10:54:35 +0800
Quoted 7 lines
Subject: [PATCH net-next v2] net: rename group sysfs entry to
netdev_groupcommit 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'
Quoted 5 lines
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 <[email protected]>
Applied.
Quoted 13 lines · David Miller
From: Xiaotian feng <[email protected]>
Date: Wed, 9 Feb 2011 18:52:49 +0800Quoted 10 lines
From: Xiaotian Feng <[email protected]>
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 :)