Netdev List
 help / color / mirror / Atom feed
* ask help for analysising oprofile result (higher mwait_idle_with_hints)
From: zhou rui @ 2011-05-01 14:08 UTC (permalink / raw)
  To: linux-kernel, linux-smp, netdev; +Cc: jon.zhou

hi

A network application (with its kernel network driver),
it uses 5-8% cpu(I have tested it on kernel 2.6.34, seen from 'top'),
but I got 40% cpu usage on kernel 2.6.36
so that I tried oprofile to see what happen:

opcontrol --vmlinux=/home/kho56208/linux-2.6.36.4/vmlinux
...


compared with profile result on kernel 2.6.34, the
"mwait_idle_with_hints" got a higher "CPU_CLK_UNHALTED " event sample,

what does it mean? any clue?

CPU: Intel Architectural Perfmon, speed 2666.01 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
unit mask of 0x00 (No unit mask) count 100000
samples  %        symbol name
115595   17.5906  mwait_idle_with_hints
27098     4.1236  __alloc_skb
25992     3.9553  __slab_free
25707     3.9120  __netif_receive_skb
18784     2.8584  __kmalloc_node_track_caller
18223     2.7731  get_partial_node
17860     2.7178  add_partial
17662     2.6877  kfree
17655     2.6866  kmem_cache_alloc_node
...

(kernel 2.6.34):

CPU: Intel Architectural Perfmon, speed 1600 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
unit mask of 0x00 (No unit mask) count 100000
samples  %        symbol name
389859    7.9392  mwait_idle_with_hints
306288    6.2374  kfree
273832    5.5764  kmem_cache_alloc_node
268486    5.4675  netif_receive_skb
219047    4.4607  __alloc_skb
192371    3.9175  kmem_cache_free
138046    2.8112  memcpy
133959    2.7280  dev_gro_receive



system wide profile (2.6.36)

"MY_APPLICATION" got 40%  cpu usage,why it is  only 0.8799% seen from oprofile?
(the machine has 12 cores, and the oprofile is to measure all cores

CPU: Intel Architectural Perfmon, speed 2666.01 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
unit mask of 0x00 (No unit mask) count 100000
CPU_CLK_UNHALT...|
  samples|      %|
------------------
   656980 40.1202 vmlinux
   473114 28.8919 vmlinux
   298978 18.2579 MY_KERNEL_DRIVER
   165838 10.1273 ixgbe
    14408  0.8799 MY_APPLICATION
    10443  0.6377 libc-2.11.1.so
     8251  0.5039 processor
     4658  0.2845 oprofiled
     3103  0.1895 libpthread-2.11.1.so
     1209  0.0738 oprofile

^ permalink raw reply

* [PATCH] ipv4: don't spam dmesg with "Using LC-trie" messages
From: Alexey Dobriyan @ 2011-05-01 12:04 UTC (permalink / raw)
  To: davem; +Cc: netdev

fib_trie_table() is called during netns creation and
Chromium uses clone(CLONE_NEWNET) to sandbox renderer process.

Don't print anything.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 net/ipv4/fib_trie.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1978,9 +1978,6 @@ struct fib_table *fib_trie_table(u32 id)
 	t = (struct trie *) tb->tb_data;
 	memset(t, 0, sizeof(*t));
 
-	if (id == RT_TABLE_LOCAL)
-		pr_info("IPv4 FIB: Using LC-trie version %s\n", VERSION);
-
 	return tb;
 }
 

^ permalink raw reply

* Re: [PATCH] sysctl: net: call unregister_net_sysctl_table where needed
From: Lucian Adrian Grijincu @ 2011-05-01 11:48 UTC (permalink / raw)
  To: netdev, davem; +Cc: Lucian Adrian Grijincu
In-Reply-To: <1304250241-26138-1-git-send-email-lucian.grijincu@gmail.com>

On Sun, May 1, 2011 at 1:44 PM, Lucian Adrian Grijincu
<lucian.grijincu@gmail.com> wrote:
> ctl_table_headers registered with register_net_sysctl_table should
> have been unregistered with the equivalent unregister_net_sysctl_table
>
> Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>


David: I sent you this patch a while back but it was mixed with other
unrelated patches that were mostly ignored.

Again, to clarify: it does not matter at the moment if
register_net_sysctl_table or unregister_sysctl_table is called because
both to the same thing:


void unregister_net_sysctl_table(struct ctl_table_header *header)
{
        unregister_sysctl_table(header);
}
EXPORT_SYMBOL_GPL(unregister_net_sysctl_table);


We should either get rid of unregister_net_sysctl_table or use it consistently.

-- 
 .
..: Lucian

^ permalink raw reply

* [PATCH] sysctl: net: call unregister_net_sysctl_table where needed
From: Lucian Adrian Grijincu @ 2011-05-01 11:44 UTC (permalink / raw)
  To: netdev, davem; +Cc: Lucian Adrian Grijincu

ctl_table_headers registered with register_net_sysctl_table should
have been unregistered with the equivalent unregister_net_sysctl_table

Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
---
 net/ipv4/devinet.c  |    2 +-
 net/ipv6/addrconf.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 5345b0b..cd9ca08 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1680,7 +1680,7 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)
 		return;
 
 	cnf->sysctl = NULL;
-	unregister_sysctl_table(t->sysctl_header);
+	unregister_net_sysctl_table(t->sysctl_header);
 	kfree(t->dev_name);
 	kfree(t);
 }
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1493534..a7bda07 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4537,7 +4537,7 @@ static void __addrconf_sysctl_unregister(struct ipv6_devconf *p)
 
 	t = p->sysctl;
 	p->sysctl = NULL;
-	unregister_sysctl_table(t->sysctl_header);
+	unregister_net_sysctl_table(t->sysctl_header);
 	kfree(t->dev_name);
 	kfree(t);
 }
-- 
1.7.5.134.g1c08b


^ permalink raw reply related

* [PATCH] ipheth.c: Enable IP header alignment
From: L. Alberto Giménez @ 2011-05-01 11:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: dgiagio, dborca, davem, pmcenery, david.hill,
	open list:USB SUBSYSTEM, open list:NETWORKING DRIVERS

From: David Hill <david.hill@ubisoft.com>

Since commit ea812ca1b06113597adcd8e70c0f84a413d97544, NET_IP_ALIGN changed from
2 to 0. Some people have reported that tethering stopped working and David Hill
submited a patch that seems to fix the problem.

I have no more an iPhone device to test it, so it is only compile-tested.

Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es>
---
 drivers/net/usb/ipheth.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index 7d42f9a..711346b 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -54,6 +54,9 @@
 #include <linux/usb.h>
 #include <linux/workqueue.h>
 
+#undef  NET_IP_ALIGN
+#define NET_IP_ALIGN 2
+
 #define USB_VENDOR_APPLE        0x05ac
 #define USB_PRODUCT_IPHONE      0x1290
 #define USB_PRODUCT_IPHONE_3G   0x1292
-- 
1.7.5

^ permalink raw reply related

* Re: [PATCH] ipv6: fix incorrect unregistration of sysctl when last ip deleted
From: Eric W. Biederman @ 2011-05-01  9:59 UTC (permalink / raw)
  To: Alexey Kuznetsov
  Cc: John Gardiner Myers, David Miller, pekkas, jmorris, yoshfuji,
	kaber, netdev, linux-kernel
In-Reply-To: <20110430000710.GA26995@ms2.inr.ac.ru>

Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> writes:

> On Fri, Apr 29, 2011 at 02:58:24PM -0700, John Gardiner Myers wrote:
>> If the device isn't going away, then the ip6_ptr shouldn't be zeroed, 
>> the /proc/net/dev_snmp6 entry shouldn't be deregistered,
>
> Actually, you are right. Tuned interface parameters and disabling/enabling IPv6
> (or IP, or whatever) should be different things. We just did not have an interface
> to disable protocol, but leave in*_dev, so that they were merged.
>
> When doing this just keep in mind that addrconf_ifdown(how = 0) did _not_ mean
> disabling IPv6. (Probably, it does now in fact, I do not know. But it definitely
> did not mean this in the past).
>
> Look, addrconf_ifdown(how = 0) was executed only when the physical device is down, so that we could
> neither receive nor send over this interface. If the device is UP, addrconf_ifdown(how = 0)
> did not prohibit sending/receiving IPv6. Actually, logically, addrconf_ifdown(how = 0)
> on UP interface must be followed by immediate restart of autoconfiguration,
> because interface is still actually UP. See?
>
> So, to implement this you should verify that IPv6 packets are not sent/received over
> disabled interface (at least over interface with illegal mtu :-)). And add some flag in in6_dev
> meaning that IPv6 is actually disabled. So that f.e. after occasional
> ifconfig eth0 down; ifconfig eth0 up autoconfiguration would not resume IPv6
> (the thing which we could not even implement with destroying in6_dev,
> but definitely wanted).

I played with this a while ago with on 2.6.37 and I cooked up the patch
below.  I don't know if it still applies, but I think something like
this is what we want, as it makes the no ipv6 address case and the
ipv6 mtu too small case match the disable_ipv6 case.

Eric


>From e97b017fe210db4e0a1d5553449da140a0794bb0 Mon Sep 17 00:00:00 2001
From: Eric W. Biederman <ebiederm@xmission.com>
Date: Wed, 8 Dec 2010 11:59:36 -0800
Subject: [PATCH] addrconf:  Force logical down for bad MTU or no ipv6 addresses as well.

Don't loose our ipv6 state (like disable_ipv6) when we delete the last
address from an ipv6 interface or when we set an mtu on the interface
that is smaller than we support.

As well as making things more comprehensible to userspace this
makes the code simpler.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/ipv6/addrconf.c |   79 ++++++++++++++++++++------------------------------
 1 files changed, 32 insertions(+), 47 deletions(-)

Index: linux-2.6.37-rc5.x86_64/net/ipv6/addrconf.c
===================================================================
--- linux-2.6.37-rc5.x86_64.orig/net/ipv6/addrconf.c
+++ linux-2.6.37-rc5.x86_64/net/ipv6/addrconf.c
@@ -147,6 +147,7 @@ static void addrconf_leave_anycast(struc
 static void addrconf_type_change(struct net_device *dev,
 				 unsigned long event);
 static int addrconf_ifdown(struct net_device *dev, int how);
+static void dev_disable_change(struct inet6_dev *idev);
 
 static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags);
 static void addrconf_dad_timer(unsigned long data);
@@ -2221,7 +2222,7 @@ static int inet6_addr_del(struct net *ne
 			   disable IPv6 on this interface.
 			 */
 			if (list_empty(&idev->addr_list))
-				addrconf_ifdown(idev->dev, 1);
+				dev_disable_change(idev);
 			return 0;
 		}
 	}
@@ -2499,7 +2500,7 @@ static int addrconf_notify(struct notifi
 
 	switch (event) {
 	case NETDEV_REGISTER:
-		if (!idev && dev->mtu >= IPV6_MIN_MTU) {
+		if (!idev) {
 			idev = ipv6_add_dev(dev);
 			if (!idev)
 				return notifier_from_errno(-ENOMEM);
@@ -2520,26 +2521,18 @@ static int addrconf_notify(struct notifi
 					dev->name);
 				break;
 			}
-
-			if (!idev && dev->mtu >= IPV6_MIN_MTU)
-				idev = ipv6_add_dev(dev);
-
-			if (idev) {
-				idev->if_flags |= IF_READY;
-				run_pending = 1;
-			}
+			idev->if_flags |= IF_READY;
+			run_pending = 1;
 		} else {
 			if (!addrconf_qdisc_ok(dev)) {
 				/* device is still not ready. */
 				break;
 			}
 
-			if (idev) {
-				if (idev->if_flags & IF_READY)
-					/* device is already configured. */
-					break;
-				idev->if_flags |= IF_READY;
-			}
+			if (idev->if_flags & IF_READY)
+				/* device is already configured. */
+				break;
+			idev->if_flags |= IF_READY;
 
 			printk(KERN_INFO
 					"ADDRCONF(NETDEV_CHANGE): %s: "
@@ -2567,45 +2560,37 @@ static int addrconf_notify(struct notifi
 			break;
 		}
 
-		if (idev) {
-			if (run_pending)
-				addrconf_dad_run(idev);
-
-			/*
-			 * If the MTU changed during the interface down,
-			 * when the interface up, the changed MTU must be
-			 * reflected in the idev as well as routers.
-			 */
-			if (idev->cnf.mtu6 != dev->mtu &&
-			    dev->mtu >= IPV6_MIN_MTU) {
-				rt6_mtu_change(dev, dev->mtu);
-				idev->cnf.mtu6 = dev->mtu;
-			}
-			idev->tstamp = jiffies;
-			inet6_ifinfo_notify(RTM_NEWLINK, idev);
+		if (run_pending)
+			addrconf_dad_run(idev);
 
-			/*
-			 * If the changed mtu during down is lower than
-			 * IPV6_MIN_MTU stop IPv6 on this interface.
-			 */
-			if (dev->mtu < IPV6_MIN_MTU)
-				addrconf_ifdown(dev, 1);
+		/*
+		 * If the MTU changed during the interface down,
+		 * when the interface up, the changed MTU must be
+		 * reflected in the idev as well as routers.
+		 */
+		if (idev->cnf.mtu6 != dev->mtu &&
+		    dev->mtu >= IPV6_MIN_MTU) {
+			rt6_mtu_change(dev, dev->mtu);
+			idev->cnf.mtu6 = dev->mtu;
 		}
+		idev->tstamp = jiffies;
+		inet6_ifinfo_notify(RTM_NEWLINK, idev);
+
+		/*
+		 * If the changed mtu during down is lower than
+		 * IPV6_MIN_MTU stop IPv6 on this interface.
+		 */
+		if (dev->mtu < IPV6_MIN_MTU)
+			dev_disable_change(idev);
 		break;
 
 	case NETDEV_CHANGEMTU:
-		if (idev && dev->mtu >= IPV6_MIN_MTU) {
+		if (dev->mtu >= IPV6_MIN_MTU) {
 			rt6_mtu_change(dev, dev->mtu);
 			idev->cnf.mtu6 = dev->mtu;
 			break;
 		}
 
-		if (!idev && dev->mtu >= IPV6_MIN_MTU) {
-			idev = ipv6_add_dev(dev);
-			if (idev)
-				break;
-		}
-
 		/*
 		 * MTU falled under IPV6_MIN_MTU.
 		 * Stop IPv6 on this interface.
@@ -2616,7 +2601,7 @@ static int addrconf_notify(struct notifi
 		/*
 		 *	Remove all addresses from this interface.
 		 */
-		addrconf_ifdown(dev, event != NETDEV_DOWN);
+		addrconf_ifdown(dev, event == NETDEV_UNREGISTER);
 		break;
 
 	case NETDEV_CHANGENAME:
@@ -4137,6 +4122,18 @@ static void ipv6_ifa_notify(int event, s
 	rcu_read_unlock_bh();
 }
 
+static void dev_disable_change(struct inet6_dev *idev)
+{
+	if (!idev || !idev->dev)
+		return;
+
+	if (idev->cnf.disable_ipv6 || (list_empty(&idev->addr_list)) ||
+	    (idev->dev->mtu < IPV6_MIN_MTU))
+		addrconf_notify(NULL, NETDEV_DOWN, idev->dev);
+	else
+		addrconf_notify(NULL, NETDEV_UP, idev->dev);
+}
+
 #ifdef CONFIG_SYSCTL
 
 static
@@ -4157,17 +4154,6 @@ int addrconf_sysctl_forward(ctl_table *c
 	return ret;
 }
 
-static void dev_disable_change(struct inet6_dev *idev)
-{
-	if (!idev || !idev->dev)
-		return;
-
-	if (idev->cnf.disable_ipv6)
-		addrconf_notify(NULL, NETDEV_DOWN, idev->dev);
-	else
-		addrconf_notify(NULL, NETDEV_UP, idev->dev);
-}
-
 static void addrconf_disable_change(struct net *net, __s32 newf)
 {
 	struct net_device *dev;

^ permalink raw reply

* Re: [patch net-next-2.6] net: call dev_alloc_name from register_netdevice
From: Jiri Pirko @ 2011-05-01  6:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, davem, eric.dumazet, mirqus, xemul
In-Reply-To: <20110430214735.73036260@nehalam>

Sun, May 01, 2011 at 06:47:35AM CEST, shemminger@vyatta.com wrote:
>On Sat, 30 Apr 2011 22:57:52 +0200
>Jiri Pirko <jpirko@redhat.com> wrote:
>
>> Sat, Apr 30, 2011 at 07:34:44PM CEST, shemminger@vyatta.com wrote:
>> >On Sat, 30 Apr 2011 13:21:32 +0200
>> >Jiri Pirko <jpirko@redhat.com> wrote:
>> >
>> >> Force dev_alloc_name() to be called from register_netdevice() by
>> >> dev_get_valid_name(). That allows to remove multiple explicit
>> >> dev_alloc_name() calls.
>> >> 
>> >> The possibility to call dev_alloc_name in advance remains.
>> >> 
>> >> This also fixes veth creation regresion caused by
>> >> 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
>> >> 
>> >> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>> >
>> >The problem with this then you have to audit all the calls
>> >to register_netdevice to make sure that user can't provide a bad
>> >value which then is passed a format string. Why not just fix
>> >just veth which would be safer.
>> 
>> Well it looks convenient to do name allocations inside
>> register_netdevice generically. For special cases dev_get_valid_name()
>> can be still used as before (this I think should be also prohibited in
>> future).
>> 
>> Also I think that drivers should be responsible for what they are
>> passing from user to core. Btw could you please give me an example of
>> "a bad value" causing any harm in particular situation?
>> 
>> Thanks
>> 
>> Jirka
>
>I am concerned that code like that before a driver could be passed
>a string with format characters; and make a device with % in the name
>and some configuration might depend on that.
>
>dev_alloc_name tries to be as safe as possible about the processing
>of format string so it should be safe from names like 'eth%s'

That is correct. For example:
[root@f14 ~]# ip link add name "test%d" type dummy
[root@f14 ~]# ip link add name "te%dst" type dummy
[root@f14 ~]# ip link add name "test%s" type dummy
RTNETLINK answers: Invalid argument
[root@f14 ~]# ip link add name "te%sst" type dummy
RTNETLINK answers: Invalid argument
[root@f14 ~]# ip link add name "test%p" type dummy
RTNETLINK answers: Invalid argument
[root@f14 ~]# ip link add name "test%f" type dummy
RTNETLINK answers: Invalid argument
[root@f14 ~]# 

Looks safe to me.

>

^ permalink raw reply

* Re: [patch net-next-2.6] net: call dev_alloc_name from register_netdevice
From: Stephen Hemminger @ 2011-05-01  4:47 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, davem, eric.dumazet, mirqus, xemul
In-Reply-To: <20110430205752.GE2658@psychotron.orion>

On Sat, 30 Apr 2011 22:57:52 +0200
Jiri Pirko <jpirko@redhat.com> wrote:

> Sat, Apr 30, 2011 at 07:34:44PM CEST, shemminger@vyatta.com wrote:
> >On Sat, 30 Apr 2011 13:21:32 +0200
> >Jiri Pirko <jpirko@redhat.com> wrote:
> >
> >> Force dev_alloc_name() to be called from register_netdevice() by
> >> dev_get_valid_name(). That allows to remove multiple explicit
> >> dev_alloc_name() calls.
> >> 
> >> The possibility to call dev_alloc_name in advance remains.
> >> 
> >> This also fixes veth creation regresion caused by
> >> 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
> >> 
> >> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> >
> >The problem with this then you have to audit all the calls
> >to register_netdevice to make sure that user can't provide a bad
> >value which then is passed a format string. Why not just fix
> >just veth which would be safer.
> 
> Well it looks convenient to do name allocations inside
> register_netdevice generically. For special cases dev_get_valid_name()
> can be still used as before (this I think should be also prohibited in
> future).
> 
> Also I think that drivers should be responsible for what they are
> passing from user to core. Btw could you please give me an example of
> "a bad value" causing any harm in particular situation?
> 
> Thanks
> 
> Jirka

I am concerned that code like that before a driver could be passed
a string with format characters; and make a device with % in the name
and some configuration might depend on that.

dev_alloc_name tries to be as safe as possible about the processing
of format string so it should be safe from names like 'eth%s'


^ permalink raw reply

* Re: [patch net-next-2.6] net: call dev_alloc_name from register_netdevice
From: Jiri Pirko @ 2011-04-30 20:57 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, davem, eric.dumazet, mirqus, xemul
In-Reply-To: <20110430103444.60c08b13@nehalam>

Sat, Apr 30, 2011 at 07:34:44PM CEST, shemminger@vyatta.com wrote:
>On Sat, 30 Apr 2011 13:21:32 +0200
>Jiri Pirko <jpirko@redhat.com> wrote:
>
>> Force dev_alloc_name() to be called from register_netdevice() by
>> dev_get_valid_name(). That allows to remove multiple explicit
>> dev_alloc_name() calls.
>> 
>> The possibility to call dev_alloc_name in advance remains.
>> 
>> This also fixes veth creation regresion caused by
>> 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
>> 
>> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>
>The problem with this then you have to audit all the calls
>to register_netdevice to make sure that user can't provide a bad
>value which then is passed a format string. Why not just fix
>just veth which would be safer.

Well it looks convenient to do name allocations inside
register_netdevice generically. For special cases dev_get_valid_name()
can be still used as before (this I think should be also prohibited in
future).

Also I think that drivers should be responsible for what they are
passing from user to core. Btw could you please give me an example of
"a bad value" causing any harm in particular situation?

Thanks

Jirka

^ permalink raw reply

* Re: 2.6.39-rc5-git4: Reported regressions from 2.6.38
From: Linus Torvalds @ 2011-04-30 20:50 UTC (permalink / raw)
  To: Rafael J. Wysocki, Alex Elder, xfs-VZNHf3L845pBDgjK7y7TUQ
  Cc: Linux Kernel Mailing List, Maciej Rutecki, Florian Mickler,
	Andrew Morton, Kernel Testers List, Network Development,
	Linux ACPI, Linux PM List, Linux SCSI List, Linux Wireless List,
	DRI
In-Reply-To: <Xp4OiTz83N.A.O0D.JVGvNB@chimera>

On Sat, Apr 30, 2011 at 12:42 PM, Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org> wrote:
>
> Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=34012
> Subject         : 2.6.39-rc4+: oom-killer busy killing tasks
> Submitter       : Christian Kujau <lists-AanptEQQ3TL9uQeqpI+JUg@public.gmane.org>
> Date            : 2011-04-22 1:57 (9 days old)
> Message-ID      : <alpine.DEB.2.01.1104211841510.18728-yMVncJ7Z0T8@public.gmane.orgfs.org>
> References      : http://marc.info/?l=linux-kernel&m=130343744622331&w=2

Judging by the extended debug info in:

   http://nerdbynature.de/bits/2.6.39-rc4/oom/
   (The -9 files are the current ones)

that thing shows a _lot_ of xfs inodes:

  xfs_inode         479187 479187   1120   14    4 : tunables    0
0    0 : slabdata  34329  34329      0

even though there aren't that many dentries (each inode should have at
least one dentry associated with it under normal circumstances):

  dentry             97896  97900    160   25    1 : tunables    0
0    0 : slabdata   3916   3916      0

and then later when the system gets low on memory, the dentries shrink:

  dentry              1017   3525    160   25    1 : tunables    0
0    0 : slabdata    141    141      0

but the XFS inodes do not:

  xfs_inode         557579 557579   1120   14    4 : tunables    0
0    0 : slabdata  41492  41492      0

so I suspect it's some kind of XFS inode leak.

                      Linus

^ permalink raw reply

* 2.6.39-rc5-git4: Reported regressions 2.6.37 -> 2.6.38
From: Rafael J. Wysocki @ 2011-04-30 20:13 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Maciej Rutecki, Florian Mickler, Andrew Morton, Linus Torvalds,
	Kernel Testers List, Network Development, Linux ACPI,
	Linux PM List, Linux SCSI List, Linux Wireless List, DRI

This message contains a list of some post-2.6.37 regressions introduced before
2.6.38, for which there are no fixes in the mainline known to the tracking team.
If any of them have been fixed already, please let us know.

If you know of any other unresolved post-2.6.37 regressions, please let us know
either and we'll add them to the list.  Also, please let us know if any
of the entries below are invalid.

Each entry from the list will be sent additionally in an automatic reply to
this message with CCs to the people involved in reporting and handling the
issue.


Listed regressions statistics:

  Date          Total  Pending  Unresolved
  ----------------------------------------
  2011-04-30      105       29          28
  2011-04-17       98       28          28
  2011-03-27       88       26          26
  2011-03-06       70       27          26
  2011-02-21       51       18          17
  2011-02-12       39       20          18
  2011-02-03       19       11           7


Unresolved regressions
----------------------

Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=34022
Subject		: Kernel OOPS turning on Radeon on vgaswitcheroo enabled system
Submitter	:  <blazej.bucko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-27 19:39 (4 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33982
Subject		: ath9k: regulatory: strange tx power limits
Submitter	: Richard Schütz <r.schtz-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
Date		: 2011-04-26 18:37 (5 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33892
Subject		: Kernel sometimes fails to find major/minor number of root device
Submitter	: Aaron Barany <akb825-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-23 20:13 (8 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33882
Subject		: rt2800pci bad performance in 2.6.38
Submitter	: Ricardo Graça <r.jpg-8MI2nhFGehw@public.gmane.org>
Date		: 2011-04-23 14:35 (8 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33852
Subject		: Regression of AR2413 802.11bg in 2.6.38.4
Submitter	: Boris Popov <popov.b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-23 12:12 (8 days old)
First-Bad-Commit: http://git.kernel.org/linus/42c025f3de9042d9c9abd9a6f6205d1a0f4bcadf


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33662
Subject		: System hangs during X startup (kwin compositing?)
Submitter	: Luke-Jr <luke-jr+linuxbugs-LLS2WxOx/a1AfugRpC6u6w@public.gmane.org>
Date		: 2011-04-19 04:26 (12 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=32762
Subject		: Booting with external monitor attached results in red flickering screen on the external monitor
Submitter	: Anton <anton.bugs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-06 04:50 (25 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=32522
Subject		: drm:i915_hangcheck_ring_idle after suspend/resume cycle
Submitter	:  <fhimpe-CNXmb7IdZIWZIoH1IeqzKA@public.gmane.org>
Date		: 2011-04-02 18:40 (29 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=32202
Subject		: 2.6.38 hangs on boot until key is pressed
Submitter	: Tvrtko Ursulin <tvrtko-9sj9WOxYP5jR7s880joybQ@public.gmane.org>
Date		: 2011-03-27 19:18 (35 days old)
Message-ID	: <1301253485.2500.2.camel@deuteros>
References	: http://marc.info/?l=linux-kernel&m=130125411116558&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=32112
Subject		: Writes to USB flash drives are extremely slow in 2.6.38
Submitter	: Delan Azabani <delan-Boohn7ZbvbpBDgjK7y7TUQ@public.gmane.org>
Date		: 2011-03-29 08:10 (33 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=32072
Subject		: 2.6.38 Regression: Nvidia GeForce8400 + i915 = Crash on Boot
Submitter	: simon-wM4F9T/ekXmXDw4h08c5KA@public.gmane.org
Date		: 2011-03-24 15:20 (38 days old)
Message-ID	: <fe471c05897776b7c26b9fd2603e3b76.squirrel-N82HvsEaY4kGLQ9C4TkFhg@public.gmane.orgcom>
References	: http://marc.info/?l=linux-kernel&m=130100955926434&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31982
Subject		: XFS memory allocation deadlock in 2.6.38
Submitter	: Sean Noonan <Sean.Noonan-dxgubf92oBlWk0Htik3J/w@public.gmane.org>
Date		: 2011-03-21 16:19 (41 days old)
Message-ID	: <081DDE43F61F3D43929A181B477DCA95639B52FD-W84Bic8V7yZ3GC5t/3agGQ@public.gmane.org.com>
References	: http://marc.info/?l=linux-kernel&m=130072585111310&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31922
Subject		: ath5k: Decreased throughput in IBSS or 802.11n mode
Submitter	: Jeff Cook <jeff-Lrzp875GHuWS7RsuTa25K+qUGfbH9hYC@public.gmane.org>
Date		: 2011-03-26 20:06 (36 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31782
Subject		: nouveau: lockdep spew
Submitter	: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Date		: 2011-03-24 09:51 (38 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31702
Subject		: ath5k phy2: failed to wakeup the MAC Chip
Submitter	: Justin P. Mattock <justinmattock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-03-22 19:15 (40 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31572
Subject		: BUG in vb_alloc() - firewire crash at boot
Submitter	: Pavel Kysilka <goldenfish-3RRv3fhkseTjAhjy0/KdDg@public.gmane.org>
Date		: 2011-03-21 12:40 (41 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31532
Subject		: 2.6.38: Quota over NFS4
Submitter	: Adam Lackorzynski <adam-IG//nw+yl+iQIjdd1DhZXWfrygkm6VTR@public.gmane.org>
Date		: 2011-03-17 13:32 (45 days old)
Message-ID	: <20110317133247.GB6424-IG//nw+yl+iQIjdd1DhZXWfrygkm6VTR@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130036878203485&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31522
Subject		: i915/kms regression after 2.6.38-rc8 (was: Re: Linux 2.6.38)
Submitter	: Melchior FRANZ <melchior.franz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-03-16 17:30 (46 days old)
Message-ID	: <201103161830.52231-s3vZadu4I7qzZXS1Dc/lvw@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130029706416659&w=2
		  http://marc.info/?l=linux-kernel&m=130409270332174&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31402
Subject		: Diminished brightness at startup
Submitter	: Guilherme Salazar <guilhermesalazar-DaQTI0RpDDMAvxtiuMwx3w@public.gmane.org>
Date		: 2011-03-18 16:29 (44 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31322
Subject		: 2.6.38-rc echo 3 > /proc/sys/vm/drop_caches repairs mplayer distortions
Submitter	: Hans de Bruin <jmdebruin-agH9qYG3oEhmR6Xm/wNWPw@public.gmane.org>
Date		: 2011-03-14 21:34 (48 days old)
Message-ID	: <4D7E89E7.3080505-agH9qYG3oEhmR6Xm/wNWPw@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130014181919827&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=31012
Subject		: WARNING: Perf: bad frame pointer = (null), 2.6.38-rc8
Submitter	: Chuck Ebbert <cebbert-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date		: 2011-03-12 19:08 (50 days old)
Message-ID	: <20110312140851.52420149@katamari>
References	: http://marc.info/?l=linux-kernel&m=129995721014931&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=30992
Subject		: 2.6.38-rc7: Some strange soft-lockup
Submitter	: Dmitry Nezhevenko <dion-Riw6fTKU00peoWH0uzbU5w@public.gmane.org>
Date		: 2011-03-06 14:01 (56 days old)
Message-ID	: <20110306140104.GA7700-Kfeq/R7O60eE+EvaaNYduQ@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=129942161205739&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=30582
Subject		: WARNING: at drivers/net/wireless/ath/ath9k/recv.c:536 ath_stoprecv+0xc8/0xda [ath9k]()
Submitter	: Justin Mattock <justinmattock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-03-03 5:47 (59 days old)
Message-ID	: <AANLkTik9To0Rkq2FRqQFB2wNu0kyJ7CzyBek2jBp36Cb-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References	: http://marc.info/?l=linux-kernel&m=129913127722786&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=29992
Subject		: boot hang 2.6.37.1 regression w/ intel_idle and CONFIG_NO_HZ=n - asus p7p55d le
Submitter	: De Ganseman Amaury <amaury.deganseman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-02-27 10:38 (63 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=29672
Subject		: [regression][ALSA][hda-conexant][2.6.38-rcX] external microphone sound too quiet
Submitter	: Shawn Starr <shawn.starr-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org>
Date		: 2011-02-19 6:02 (71 days old)
Message-ID	: <474630.25335.qm-LGyaPT5kzbjzJNTqFNLFoaJ1FwRQo79cG6kzb5Gsg2M@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=129809536502092&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=28522
Subject		: Unable to mount FAT-formatted floppy on /dev/fd0, plus WARN_ON when using /dev/fd0u1440
Submitter	: Alex Villacis Lasso <avillaci-x0m+Mc+nT7uljOmnV8AmnkElSqmLX1BE@public.gmane.org>
Date		: 2011-02-07 17:21 (83 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=28452
Subject		: 2.6.38-rc3 regression on parisc: segfaults
Submitter	: Meelis Roos <mroos-Y27EyoLml9s@public.gmane.org>
Date		: 2011-02-01 22:00 (89 days old)
Message-ID	: <alpine.SOC.1.00.1102012342200.25944-ptEonEWSGqKptlylMvRsHA@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=129659763426600&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=28422
Subject		: kref and apparmor panic in 2.6.38-rc2.
Submitter	: Tao Ma <tm-d1IQDZat3X0@public.gmane.org>
Date		: 2011-01-31 10:06 (90 days old)
Message-ID	: <4D46899B.80302-d1IQDZat3X0@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=129646840303149&w=2


Regressions with patches
------------------------

Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=32862
Subject		: acer_wmi partially crashes ACPI/EC (Aspire 8930G)
Submitter	: Hector Martin <hector-eIot3r3D0w+Wd6l5hS35sQ@public.gmane.org>
Date		: 2011-04-07 17:44 (24 days old)
Handled-By	: Lee, Chun-Yi <jlee-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
Patch		: https://bugzilla.kernel.org/attachment.cgi?id=54492


For details, please visit the bug entries and follow the links given in
references.

As you can see, there is a Bugzilla entry for each of the listed regressions.
There also is a Bugzilla entry used for tracking the regressions introduced
between 2.6.37 and 2.6.38, unresolved as well as resolved, at:

http://bugzilla.kernel.org/show_bug.cgi?id=27352

Please let the tracking team know if there are any Bugzilla entries that
should be added to the list in there.

Thanks!

^ permalink raw reply

* Email Quota Exceeded
From: Mail Administrator @ 2011-04-30 20:09 UTC (permalink / raw)
  To: admin

Isto é para informar que você excedeu seu E-mail limite de 
cota e
  você precisa aumentar seu E-mail limite de cota, porque 
em menos de 96 horas
  sua conta de e-mail será disabled.Increase seu E-mail 
limite de cota e
  continuar a usar sua conta de webmail.

  Para aumentar seu E-mail limite de cota de 2.7GB, 
preencha os seus dados como
  abaixo e envie para o e-mail cota Webmaster CLICANDO 
RESPOSTA:

  E-MAIL:
  USERNAME:
  PALAVRA-CHAVE:
  Confirme sua senha:
  DATA DE NASCIMENTO:

  Obrigado pela sua compreensão e corperation para nos 
ajudar a dar-lhe
  Os Melhores do serviço de email.

^ permalink raw reply

* 2.6.39-rc5-git4: Reported regressions from 2.6.38
From: Rafael J. Wysocki @ 2011-04-30 19:42 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Maciej Rutecki, Florian Mickler, Andrew Morton, Linus Torvalds,
	Kernel Testers List, Network Development, Linux ACPI,
	Linux PM List, Linux SCSI List, Linux Wireless List, DRI

[NOTE:
 I have one request for whoever works on fixing the listed regressions.  While
 your work is highly appreciated anyway, if you have a patch fixing a listed
 regression or you know of a commit fixing a listed regression, please drop
 a notice into the corresponding Bugzilla entry.  This will help us a lot.]  

This message contains a list of some regressions from 2.6.38,
for which there are no fixes in the mainline known to the tracking team.
If any of them have been fixed already, please let us know.

If you know of any other unresolved regressions from 2.6.38, please let us
know either and we'll add them to the list.  Also, please let us know
if any of the entries below are invalid.

Each entry from the list will be sent additionally in an automatic reply
to this message with CCs to the people involved in reporting and handling
the issue.


Listed regressions statistics:

  Date          Total  Pending  Unresolved
  ----------------------------------------
  2011-04-30       38       17          16
  2011-04-17       17       11          10


Unresolved regressions
----------------------

Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=34012
Subject		: 2.6.39-rc4+: oom-killer busy killing tasks
Submitter	: Christian Kujau <lists-AanptEQQ3TL9uQeqpI+JUg@public.gmane.org>
Date		: 2011-04-22 1:57 (9 days old)
Message-ID	: <alpine.DEB.2.01.1104211841510.18728-yMVncJ7Z0T9hhup4ARC/jw@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130343744622331&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=34002
Subject		: [REGRESSION] [2.6.39-rc3] Wrong resolution in framebuffer and X Window
Submitter	: Maciej Rutecki <maciej.rutecki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-17 16:04 (14 days old)
Message-ID	: <201104171804.04664.maciej.rutecki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
References	: http://marc.info/?l=linux-fbdev&m=130305625114863&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33842
Subject		: NULL pointer dereference in ip_fragment
Submitter	: Tomas Carnecky <tom-ix/z9KG6G0Jl57MIdRCFDg@public.gmane.org>
Date		: 2011-04-23 07:51 (8 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33812
Subject		: radeon with modeset option causes oops as secondary adapter (vgaswitcheroo)
Submitter	: Johannes Engel <jcnengel-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Date		: 2011-04-21 23:14 (10 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33792
Subject		: lockdep trace when unplugging usb audio (.39rc4)
Submitter	: Dave Jones <davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date		: 2011-04-19 18:07 (12 days old)
Message-ID	: <20110419180745.GA438-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130323648920431&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33492
Subject		: [bug] 2.6.39-rc3 fails to boot on Alpha
Submitter	: Mikael Pettersson <mikpe-1zs4UD6AkMk@public.gmane.org>
Date		: 2011-04-17 15:13 (14 days old)
Message-ID	: <19883.912.266127.538215-tgku4HJDRZih8lFjZTKsyTAV6s6igYVG@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130305321212360&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33482
Subject		: [Regression] Bluetooth pairing does not work anymore in 2.6.39-rc3 (works in 2.6.38.3)
Submitter	: Gottfried Haider <gottfried.haider-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-16 16:38 (15 days old)
Message-ID	: <BANLkTi=LvyZ+7BHfVL849pztfvsYaVM4SQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130297197128328&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33432
Subject		: WARNING at libata-core.c:5015 in 2.6.39-rc3-wl+, then lockup.
Submitter	: Ben Greear <greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>
Date		: 2011-04-13 16:29 (18 days old)
Message-ID	: <4DA5CF81.4070908-my8/4N5VtI7c+919tysfdA@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130271220809443&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33422
Subject		: oops in radeon_ddc_get_modes on first boot of rc3
Submitter	: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-12 17:54 (19 days old)
Message-ID	: <BANLkTikTVuV9eH4GiLDs0DewGJXo_3daeg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130263086322702&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33402
Subject		: [regression] 2.6.39-rc[1-3] fail to boot on G5 PowerMac
Submitter	: Mikael Pettersson <mikpe-1zs4UD6AkMk@public.gmane.org>
Date		: 2011-04-12 17:30 (19 days old)
Message-ID	: <19876.35918.322649.256455-tgku4HJDRZih8lFjZTKsyTAV6s6igYVG@public.gmane.org>
References	: http://marc.info/?l=linuxppc-embedded&m=130263128523237&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33302
Subject		: ACPI reboot broken on HP Compaq nx7300.
Submitter	: Alexey Zaytsev <alexey.zaytsev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-15 14:44 (16 days old)
First-Bad-Commit: http://git.kernel.org/linus/3d35ac346e981162eeba391e496faceed4753e7b


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33272
Subject		: drm related hard-hang
Submitter	: Peter Teoh <htmldeveloper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-14 01:29 (17 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33242
Subject		: Lockdep splat in autofs with 2.6.39-rc2
Submitter	: Nick Bowler <nbowler-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
Date		: 2011-04-07 19:44 (24 days old)
Message-ID	: <20110407194403.GA29404-7BP4RkwGw0uXmMXjJBpWqg@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130220545614682&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33142
Subject		: 2.6.39-rc2 regression: X201s fails to resume b77dcf8460ae57d4eb9fd3633eb4f97b8fb20716
Submitter	: Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
Date		: 2011-04-06 7:44 (25 days old)
Message-ID	: <yun1v1fj024.fsf-XEHByDMaNQOz9DMzp4kqnw@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130207593728273&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33092
Subject		: [regression] 2.6.39-rc1 - Beagleboard usbnet broken
Submitter	: Mark Jackson <mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw@public.gmane.org>
Date		: 2011-04-04 9:22 (27 days old)
First-Bad-Commit: http://git.kernel.org/linus/087809fce28f50098d9c3ef1a6865c722f23afd2
Message-ID	: <4D998DC9.3040109-kZtEnBLzDKq1Qrn1Bg8BZw@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=130191386508831&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=32982
Subject		: Kernel locks up a few minutes after boot
Submitter	: Bart Van Assche <bart.vanassche-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2011-04-10 19:55 (21 days old)


Regressions with patches
------------------------

Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=33802
Subject		: list_del corruption in sd driver since 2.6.39-rc4
Submitter	: Christian Casteyde <casteyde.christian-GANU6spQydw@public.gmane.org>
Date		: 2011-04-21 21:10 (10 days old)
Handled-By	: James Bottomley <James.Bottomley-l3A5Bk7waGM@public.gmane.org>
Patch		: http://marc.info/?l=linux-kernel&m=130271409412095


For details, please visit the bug entries and follow the links given in
references.

As you can see, there is a Bugzilla entry for each of the listed regressions.
There also is a Bugzilla entry used for tracking the regressions from 2.6.38,
unresolved as well as resolved, at:

http://bugzilla.kernel.org/show_bug.cgi?id=32012

Please let the tracking team know if there are any Bugzilla entries that
should be added to the list in there.

Thanks!

^ permalink raw reply

* [PATCH] smsc95xx: fix reset check
From: Rabin Vincent @ 2011-04-30 18:29 UTC (permalink / raw)
  To: steve.glendinning; +Cc: netdev, Rabin Vincent

The reset loop check should check the MII_BMCR register value for
BMCR_RESET rather than for MII_BMCR (the register address, which also
happens to be zero).

Signed-off-by: Rabin Vincent <rabin@rab.in>
---
 drivers/net/usb/smsc95xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 24f4b37..2b16d54 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -689,7 +689,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev)
 		msleep(10);
 		bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR);
 		timeout++;
-	} while ((bmcr & MII_BMCR) && (timeout < 100));
+	} while ((bmcr & BMCR_RESET) && (timeout < 100));
 
 	if (timeout >= 100) {
 		netdev_warn(dev->net, "timeout on PHY Reset");
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH] Removed unnecessary assignments , gotos and goto labels
From: Sasikanth V @ 2011-04-30 18:23 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Sasikanth V


Signed-off-by: Sasikanth V <sasikanth.v19@gmail.com>
---
 net/packet/af_packet.c |   71 +++++++++++++++++++++---------------------------
 1 files changed, 31 insertions(+), 40 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index b5362e9..5f03ba5 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -182,10 +182,6 @@ struct packet_ring_buffer {
 	atomic_t		pending;
 };
 
-struct packet_sock;
-static int tpacket_snd(struct packet_sock *po, struct msghdr *msg);
-
-static void packet_flush_mclist(struct sock *sk);
 
 struct packet_sock {
 	/* struct sock has to be the first member of packet_sock */
@@ -220,6 +216,9 @@ struct packet_skb_cb {
 	} sa;
 };
 
+static int tpacket_snd(struct packet_sock *po, struct msghdr *msg);
+static void packet_flush_mclist(struct sock *sk);
+
 #define PACKET_SKB_CB(__skb)	((struct packet_skb_cb *)((__skb)->cb))
 
 static inline __pure struct page *pgv_to_page(void *addr)
@@ -1459,16 +1458,14 @@ static int packet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len
 		return -EINVAL;
 
 	if (sll->sll_ifindex) {
-		err = -ENODEV;
 		dev = dev_get_by_index(sock_net(sk), sll->sll_ifindex);
-		if (dev == NULL)
-			goto out;
+		if (!dev)
+			return -ENODEV;
 	}
 	err = packet_do_bind(sk, dev, sll->sll_protocol ? : pkt_sk(sk)->num);
 	if (dev)
 		dev_put(dev);
 
-out:
 	return err;
 }
 
@@ -1498,10 +1495,9 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
 
 	sock->state = SS_UNCONNECTED;
 
-	err = -ENOBUFS;
 	sk = sk_alloc(net, PF_PACKET, GFP_KERNEL, &packet_proto);
-	if (sk == NULL)
-		goto out;
+	if (!sk)
+		return -ENOBUFS;
 
 	sock->ops = &packet_ops;
 	if (sock->type == SOCK_PACKET)
@@ -1542,8 +1538,6 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
 	spin_unlock_bh(&net->packet.sklist_lock);
 
 	return 0;
-out:
-	return err;
 }
 
 static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len)
@@ -1552,10 +1546,9 @@ static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len)
 	struct sk_buff *skb, *skb2;
 	int copied, err;
 
-	err = -EAGAIN;
 	skb = skb_dequeue(&sk->sk_error_queue);
-	if (skb == NULL)
-		goto out;
+	if (!skb)
+		return -EAGAIN;
 
 	copied = skb->len;
 	if (copied > len) {
@@ -1563,31 +1556,29 @@ static int packet_recv_error(struct sock *sk, struct msghdr *msg, int len)
 		copied = len;
 	}
 	err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
-	if (err)
-		goto out_free_skb;
+	if (!err) {
 
-	sock_recv_timestamp(msg, sk, skb);
+		sock_recv_timestamp(msg, sk, skb);
 
-	serr = SKB_EXT_ERR(skb);
-	put_cmsg(msg, SOL_PACKET, PACKET_TX_TIMESTAMP,
-		 sizeof(serr->ee), &serr->ee);
+		serr = SKB_EXT_ERR(skb);
+		put_cmsg(msg, SOL_PACKET, PACKET_TX_TIMESTAMP,
+				sizeof(serr->ee), &serr->ee);
 
-	msg->msg_flags |= MSG_ERRQUEUE;
-	err = copied;
+		msg->msg_flags |= MSG_ERRQUEUE;
+		err = copied;
 
-	/* Reset and regenerate socket error */
-	spin_lock_bh(&sk->sk_error_queue.lock);
-	sk->sk_err = 0;
-	if ((skb2 = skb_peek(&sk->sk_error_queue)) != NULL) {
-		sk->sk_err = SKB_EXT_ERR(skb2)->ee.ee_errno;
-		spin_unlock_bh(&sk->sk_error_queue.lock);
-		sk->sk_error_report(sk);
-	} else
-		spin_unlock_bh(&sk->sk_error_queue.lock);
+		/* Reset and regenerate socket error */
+		spin_lock_bh(&sk->sk_error_queue.lock);
+		sk->sk_err = 0;
+		if ((skb2 = skb_peek(&sk->sk_error_queue)) != NULL) {
+			sk->sk_err = SKB_EXT_ERR(skb2)->ee.ee_errno;
+			spin_unlock_bh(&sk->sk_error_queue.lock);
+			sk->sk_error_report(sk);
+		} else
+			spin_unlock_bh(&sk->sk_error_queue.lock);
+	}
 
-out_free_skb:
 	kfree_skb(skb);
-out:
 	return err;
 }
 
@@ -1755,9 +1746,9 @@ static int packet_getname_spkt(struct socket *sock, struct sockaddr *uaddr,
 	rcu_read_lock();
 	dev = dev_get_by_index_rcu(sock_net(sk), pkt_sk(sk)->ifindex);
 	if (dev)
-		strncpy(uaddr->sa_data, dev->name, 14);
+		strncpy(uaddr->sa_data, dev->name, sizeof(uaddr->sa_data));
 	else
-		memset(uaddr->sa_data, 0, 14);
+		memset(uaddr->sa_data, 0, sizeof(uaddr->sa_data));
 	rcu_read_unlock();
 	*uaddr_len = sizeof(*uaddr);
 
@@ -1779,15 +1770,15 @@ static int packet_getname(struct socket *sock, struct sockaddr *uaddr,
 	sll->sll_ifindex = po->ifindex;
 	sll->sll_protocol = po->num;
 	sll->sll_pkttype = 0;
+	sll->sll_hatype = 0;	
+	sll->sll_halen = 0;
+
 	rcu_read_lock();
 	dev = dev_get_by_index_rcu(sock_net(sk), po->ifindex);
 	if (dev) {
 		sll->sll_hatype = dev->type;
 		sll->sll_halen = dev->addr_len;
 		memcpy(sll->sll_addr, dev->dev_addr, dev->addr_len);
-	} else {
-		sll->sll_hatype = 0;	/* Bad: we have no ARPHRD_UNSPEC */
-		sll->sll_halen = 0;
 	}
 	rcu_read_unlock();
 	*uaddr_len = offsetof(struct sockaddr_ll, sll_addr) + sll->sll_halen;
-- 
1.7.3.4


^ permalink raw reply related

* Re: [patch net-next-2.6] net: call dev_alloc_name from register_netdevice
From: Stephen Hemminger @ 2011-04-30 17:34 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, davem, eric.dumazet, mirqus, xemul
In-Reply-To: <1304162492-6606-1-git-send-email-jpirko@redhat.com>

On Sat, 30 Apr 2011 13:21:32 +0200
Jiri Pirko <jpirko@redhat.com> wrote:

> Force dev_alloc_name() to be called from register_netdevice() by
> dev_get_valid_name(). That allows to remove multiple explicit
> dev_alloc_name() calls.
> 
> The possibility to call dev_alloc_name in advance remains.
> 
> This also fixes veth creation regresion caused by
> 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

The problem with this then you have to audit all the calls
to register_netdevice to make sure that user can't provide a bad
value which then is passed a format string. Why not just fix
just veth which would be safer.

^ permalink raw reply

* Re: [RFC PATCH 1/2] net: Add multiqueue support
From: Jason Wang @ 2011-04-30 15:15 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: krkumar2, kvm, mst, netdev, Jason Wang, rusty, qemu-devel
In-Reply-To: <4DBB1A9F.2050803@codemonkey.ws>

Anthony Liguori writes:
 > On 04/20/2011 03:33 AM, Jason Wang wrote:
 > > This patch adds the multiqueues support for emulated nics. Each VLANClientState
 > > pairs are now abstract as a queue instead of a nic, and multiple VLANClientState
 > > pointers were stored in the NICState and treated as the multiple queues of a
 > > single nic. The netdev options of qdev were now expanded to accept more than one
 > > netdev ids. A queue_index were also introduced to let the emulated nics know
 > > which queue the packet were came from or sent out. Virtio-net would be the first
 > > user.
 > >
 > > The legacy single queue nics can still run happily without modification as the
 > > the compatibility were kept.
 > >
 > > Signed-off-by: Jason Wang<jasowang@redhat.com>
 > > ---
 > >   hw/qdev-properties.c |   37 ++++++++++++++++++++++++++++++-------
 > >   hw/qdev.h            |    3 ++-
 > >   net.c                |   34 ++++++++++++++++++++++++++--------
 > >   net.h                |   15 +++++++++++----
 > >   4 files changed, 69 insertions(+), 20 deletions(-)
 > >
 > > diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
 > > index 1088a26..dd371e1 100644
 > > --- a/hw/qdev-properties.c
 > > +++ b/hw/qdev-properties.c
 > > @@ -384,14 +384,37 @@ PropertyInfo qdev_prop_chr = {
 > >
 > >   static int parse_netdev(DeviceState *dev, Property *prop, const char *str)
 > >   {
 > > -    VLANClientState **ptr = qdev_get_prop_ptr(dev, prop);
 > > +    VLANClientState ***nc = qdev_get_prop_ptr(dev, prop);
 > > +    const char *ptr = str;
 > > +    int i = 0;
 > > +    size_t len = strlen(str);
 > > +    *nc = qemu_malloc(MAX_QUEUE_NUM * sizeof(VLANClientState *));
 > > +
 > > +    while (i<  MAX_QUEUE_NUM&&  ptr<  str + len) {
 > > +        char *name = NULL;
 > > +        char *this = strchr(ptr, '#');
 > 
 > However this is being used is not going to be right.  Is this taking 
 > netdev=a#b#c#d?
 > 

Yes, through this current netdev codes could be reused but it would bring extra
complexity of link status handling because it makes every queue visible from
monitor. Do you have any suggestions on this kind of cli? Another method is let
netdev accept multiple fd/vhostfd, but the tap fd handling codes need to be
refactored.

You can refer Krishna's patch http://www.spinics.net/lists/kvm/msg52098.html.
His patch make multiqueue only works for vhost while my patch also make the
multiqueue works for userspace and also let it could be used by other nic model.

 > I sort of agree with Michael about using multiple netdevs for this but I 
 > don't yet understand how this gets sets up from userspace.
 > 
 > Can you give an example of usage that involves the full tap device setup?
 > 
 > Ideally, a user/management tool would never need to know about any of this.
 > 

For macvtap, what user/management tool need is:
1 create a macvtap device by either netlink or ip command
2 open the device many times and pass the fd to the qemu

In fact, qemu can do all of this, but for the sake of management, keep the
current tap implementation and accpet a file descriptor from libvirt may be a
better choice.

 > In a perfect world, we could just dup() the tap fd a few times to create 
 > multiple queues.

But dup() can only create file descriptors pointed to the same file which is
hard to implement real multi queues.

 > 
 > Regards,
 > 
 > Anthony Liguori
 > --
 > To unsubscribe from this list: send the line "unsubscribe kvm" in
 > the body of a message to majordomo@vger.kernel.org
 > More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Jason Wang

^ permalink raw reply

* Re: [RFC PATCH 0/2] Multiqueue support for qemu(virtio-net)
From: Jason Wang @ 2011-04-30 14:55 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: Krishna Kumar2, kvm, mst, netdev, Jason Wang, rusty, qemu-devel
In-Reply-To: <4DBB1B25.1020300@codemonkey.ws>

Anthony Liguori writes:
 > On 04/20/2011 10:33 PM, Jason Wang wrote:
 > > Krishna Kumar2 writes:
 > >   >  Thanks Jason!
 > >   >
 > >   >  So I can use my virtio-net guest driver and test with this patch?
 > >   >  Please provide the script you use to start MQ guest.
 > >   >
 > >
 > > Yes and thanks. Following is a simple script may help you start macvtap mq
 > > guest.
 > >
 > > qemu_path=./qemu-system-x86_64
 > > img_path=/home/kvm_autotest_root/images/mq.qcow2
 > > vtap_dev=/dev/tap104
 > > mac=96:88:12:1C:27:83
 > > smp=2
 > > mq=4
 > >
 > > for i in `seq $mq`
 > > do
 > >      vtap+=" -netdev tap,id=hn$i,fd=$((i+100)) $((i+100))<>$vtap_dev"
 > 
 > So you are basically dup()'ing the tap device.
 > 
 > Does this actually improve performance at all?
 > 

The script maybe not clear. It works only for macvtap (tap does not have
multiqueue support and I plan to add it). A macvtap device needs to be created
first by ip command.

The multiqueue was achieved by opening the macvtap device many times. Each time
 the user open to macvtap device, a new queue (sock) was created. Then macvtap
 device then can forward the packets to different sock/fd based on their RX
 queue of physical nics. So the fd could be used to registered as a backend for
 vhost/qemu.

Performance improvement is expected when using smp guest with mq virtio-net and
mq nic.

 > Regards,
 > 
 > Anthony Liguori
 > 


-- 
Jason Wang

^ permalink raw reply

* Re: [PATCH net-next-2.6] veth: remove unneeded ifname code from veth_newlink()
From: Jiri Pirko @ 2011-04-30 11:28 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: netdev, davem, xemul
In-Reply-To: <BANLkTi=x8xi7-g3SZdva7Ndg0a4EY1NK8g@mail.gmail.com>

Fri, Apr 22, 2011 at 11:43:10AM CEST, mirqus@gmail.com wrote:
>2011/1/24 Jiri Pirko <jpirko@redhat.com>:
>> The code is not needed because tb[IFLA_IFNAME] is already
>> processed in rtnl_newlink(). Remove this redundancy.
>>
>> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>
>Hi. This patch broke creation of veth devices. Reverting it fixes the issue.

Sorry for troubles.

For net-next-2.6 this is fixed by:
http://patchwork.ozlabs.org/patch/93498/

For net-2.6 I suggest to revert this patch:

Subject: [PATCH net-2.6] Revert: veth: remove unneeded ifname code from veth_newlink()

84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743 caused regression on veth
creation. This patch reverts the original one.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/veth.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 2de9b90..3b99f64 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -403,6 +403,17 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
 	if (tb[IFLA_ADDRESS] == NULL)
 		random_ether_addr(dev->dev_addr);
 
+	if (tb[IFLA_IFNAME])
+		nla_strlcpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ);
+	else
+		snprintf(dev->name, IFNAMSIZ, DRV_NAME "%%d");
+
+	if (strchr(dev->name, '%')) {
+		err = dev_alloc_name(dev, dev->name);
+		if (err < 0)
+			goto err_alloc_name;
+	}
+
 	err = register_netdevice(dev);
 	if (err < 0)
 		goto err_register_dev;
@@ -422,6 +433,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
 
 err_register_dev:
 	/* nothing to do */
+err_alloc_name:
 err_configure_peer:
 	unregister_netdevice(peer);
 	return err;
-- 
1.7.4.2


^ permalink raw reply related

* [patch net-next-2.6] net: call dev_alloc_name from register_netdevice
From: Jiri Pirko @ 2011-04-30 11:21 UTC (permalink / raw)
  To: netdev; +Cc: davem, eric.dumazet, mirqus, xemul

Force dev_alloc_name() to be called from register_netdevice() by
dev_get_valid_name(). That allows to remove multiple explicit
dev_alloc_name() calls.

The possibility to call dev_alloc_name in advance remains.

This also fixes veth creation regresion caused by
84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/ieee802154/fakehard.c             |   10 ----------
 drivers/net/bonding/bond_main.c           |   21 +++------------------
 drivers/net/dummy.c                       |    4 ----
 drivers/net/hamradio/bpqether.c           |    4 ----
 drivers/net/ifb.c                         |    4 ----
 drivers/net/tun.c                         |    6 ------
 drivers/net/wan/dlci.c                    |    4 ----
 drivers/net/wan/hdlc_fr.c                 |    9 +--------
 drivers/net/wan/lapbether.c               |    4 ----
 drivers/net/wireless/hostap/hostap_main.c |    7 +------
 drivers/net/wireless/mac80211_hwsim.c     |   11 +----------
 drivers/net/wireless/mwifiex/main.c       |    4 ----
 drivers/s390/net/netiucv.c                |    2 --
 net/core/dev.c                            |   24 ++++++------------------
 net/core/rtnetlink.c                      |    8 --------
 net/ipv4/ip_gre.c                         |    5 -----
 net/ipv4/ipip.c                           |    5 -----
 net/ipv6/ip6_tunnel.c                     |    5 -----
 net/ipv6/sit.c                            |    5 -----
 net/mac80211/iface.c                      |    4 ----
 20 files changed, 12 insertions(+), 134 deletions(-)

diff --git a/drivers/ieee802154/fakehard.c b/drivers/ieee802154/fakehard.c
index d9d0e13..a5a49a1 100644
--- a/drivers/ieee802154/fakehard.c
+++ b/drivers/ieee802154/fakehard.c
@@ -393,16 +393,6 @@ static int __devinit ieee802154fake_probe(struct platform_device *pdev)
 	priv = netdev_priv(dev);
 	priv->phy = phy;
 
-	/*
-	 * If the name is a format string the caller wants us to do a
-	 * name allocation.
-	 */
-	if (strchr(dev->name, '%')) {
-		err = dev_alloc_name(dev, dev->name);
-		if (err < 0)
-			goto out;
-	}
-
 	wpan_phy_set_dev(phy, &pdev->dev);
 	SET_NETDEV_DEV(dev, &phy->dev);
 
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 66d9dc6..fa5382e0 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4858,8 +4858,9 @@ int bond_create(struct net *net, const char *name)
 
 	rtnl_lock();
 
-	bond_dev = alloc_netdev_mq(sizeof(struct bonding), name ? name : "",
-				bond_setup, tx_queues);
+	bond_dev = alloc_netdev_mq(sizeof(struct bonding),
+				   name ? name : "bond%d",
+				   bond_setup, tx_queues);
 	if (!bond_dev) {
 		pr_err("%s: eek! can't alloc netdev!\n", name);
 		rtnl_unlock();
@@ -4869,26 +4870,10 @@ int bond_create(struct net *net, const char *name)
 	dev_net_set(bond_dev, net);
 	bond_dev->rtnl_link_ops = &bond_link_ops;
 
-	if (!name) {
-		res = dev_alloc_name(bond_dev, "bond%d");
-		if (res < 0)
-			goto out;
-	} else {
-		/*
-		 * If we're given a name to register
-		 * we need to ensure that its not already
-		 * registered
-		 */
-		res = -EEXIST;
-		if (__dev_get_by_name(net, name) != NULL)
-			goto out;
-	}
-
 	res = register_netdevice(bond_dev);
 
 	netif_carrier_off(bond_dev);
 
-out:
 	rtnl_unlock();
 	if (res < 0)
 		bond_destructor(bond_dev);
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index ff2d29b..39cf9b9 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -168,10 +168,6 @@ static int __init dummy_init_one(void)
 	if (!dev_dummy)
 		return -ENOMEM;
 
-	err = dev_alloc_name(dev_dummy, dev_dummy->name);
-	if (err < 0)
-		goto err;
-
 	dev_dummy->rtnl_link_ops = &dummy_link_ops;
 	err = register_netdevice(dev_dummy);
 	if (err < 0)
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 8931168..18d8aff 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -516,10 +516,6 @@ static int bpq_new_device(struct net_device *edev)
 	memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr));
 	memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr));
 
-	err = dev_alloc_name(ndev, ndev->name);
-	if (err < 0) 
-		goto error;
-
 	err = register_netdevice(ndev);
 	if (err)
 		goto error;
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index e07d487..4fecaed 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -233,10 +233,6 @@ static int __init ifb_init_one(int index)
 	if (!dev_ifb)
 		return -ENOMEM;
 
-	err = dev_alloc_name(dev_ifb, dev_ifb->name);
-	if (err < 0)
-		goto err;
-
 	dev_ifb->rtnl_link_ops = &ifb_link_ops;
 	err = register_netdevice(dev_ifb);
 	if (err < 0)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index ade3cf9..334b5ad 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1099,12 +1099,6 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
 
 		tun_net_init(dev);
 
-		if (strchr(dev->name, '%')) {
-			err = dev_alloc_name(dev, dev->name);
-			if (err < 0)
-				goto err_free_sk;
-		}
-
 		dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST |
 			TUN_USER_FEATURES;
 		dev->features = dev->hw_features;
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 1481a44..21b104d 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -341,10 +341,6 @@ static int dlci_add(struct dlci_add *dlci)
 		}
 	}
 
-	err = dev_alloc_name(master, master->name);
-	if (err < 0)
-		goto err2;
-
 	*(short *)(master->dev_addr) = dlci->dlci;
 
 	dlp = netdev_priv(master);
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index 0edb535..fc433f2 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -1070,7 +1070,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
 	hdlc_device *hdlc = dev_to_hdlc(frad);
 	pvc_device *pvc;
 	struct net_device *dev;
-	int result, used;
+	int used;
 
 	if ((pvc = add_pvc(frad, dlci)) == NULL) {
 		printk(KERN_WARNING "%s: Memory squeeze on fr_add_pvc()\n",
@@ -1106,13 +1106,6 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
 	dev->tx_queue_len = 0;
 	dev->ml_priv = pvc;
 
-	result = dev_alloc_name(dev, dev->name);
-	if (result < 0) {
-		free_netdev(dev);
-		delete_unused_pvcs(hdlc);
-		return result;
-	}
-
 	if (register_netdevice(dev) != 0) {
 		free_netdev(dev);
 		delete_unused_pvcs(hdlc);
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 7f5bb91..eec463f 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -338,10 +338,6 @@ static int lapbeth_new_device(struct net_device *dev)
 	dev_hold(dev);
 	lapbeth->ethdev = dev;
 
-	rc = dev_alloc_name(ndev, ndev->name);
-	if (rc < 0) 
-		goto fail;
-
 	rc = -EIO;
 	if (register_netdevice(ndev))
 		goto fail;
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 1d9aed6..d508482 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -79,13 +79,8 @@ struct net_device * hostap_add_interface(struct local_info *local,
 	if (!rtnl_locked)
 		rtnl_lock();
 
-	ret = 0;
-	if (strchr(dev->name, '%'))
-		ret = dev_alloc_name(dev, dev->name);
-
 	SET_NETDEV_DEV(dev, mdev->dev.parent);
-	if (ret >= 0)
-		ret = register_netdevice(dev);
+	ret = register_netdevice(dev);
 
 	if (!rtnl_locked)
 		rtnl_unlock();
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index f4f4257..9d4a40e 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1515,19 +1515,10 @@ static int __init init_mac80211_hwsim(void)
 	if (hwsim_mon == NULL)
 		goto failed;
 
-	rtnl_lock();
-
-	err = dev_alloc_name(hwsim_mon, hwsim_mon->name);
+	err = register_netdev(hwsim_mon);
 	if (err < 0)
 		goto failed_mon;
 
-
-	err = register_netdevice(hwsim_mon);
-	if (err < 0)
-		goto failed_mon;
-
-	rtnl_unlock();
-
 	return 0;
 
 failed_mon:
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index c597188..d16cea7 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -706,10 +706,6 @@ static struct mwifiex_private *mwifiex_add_interface(
 		dev_err(adapter->dev, "no memory available for netdevice\n");
 		goto error;
 	}
-	if (dev_alloc_name(dev, dev->name)) {
-		dev_err(adapter->dev, "unable to alloc name for netdevice\n");
-		goto error;
-	}
 
 	if (mwifiex_register_cfg80211(dev, adapter->priv[bss_index]->curr_addr,
 				      adapter->priv[bss_index]) != 0) {
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index b6a6356..3251333 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -1994,8 +1994,6 @@ static struct net_device *netiucv_init_netdevice(char *username)
 			   netiucv_setup_netdevice);
 	if (!dev)
 		return NULL;
-	if (dev_alloc_name(dev, dev->name) < 0)
-		goto out_netdev;
 
 	privptr = netdev_priv(dev);
 	privptr->fsm = init_fsm("netiucvdev", dev_state_names,
diff --git a/net/core/dev.c b/net/core/dev.c
index 7db99b5..992574a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -948,7 +948,7 @@ int dev_alloc_name(struct net_device *dev, const char *name)
 }
 EXPORT_SYMBOL(dev_alloc_name);
 
-static int dev_get_valid_name(struct net_device *dev, const char *name, bool fmt)
+static int dev_get_valid_name(struct net_device *dev, const char *name)
 {
 	struct net *net;
 
@@ -958,7 +958,7 @@ static int dev_get_valid_name(struct net_device *dev, const char *name, bool fmt
 	if (!dev_valid_name(name))
 		return -EINVAL;
 
-	if (fmt && strchr(name, '%'))
+	if (strchr(name, '%'))
 		return dev_alloc_name(dev, name);
 	else if (__dev_get_by_name(net, name))
 		return -EEXIST;
@@ -995,7 +995,7 @@ int dev_change_name(struct net_device *dev, const char *newname)
 
 	memcpy(oldname, dev->name, IFNAMSIZ);
 
-	err = dev_get_valid_name(dev, newname, 1);
+	err = dev_get_valid_name(dev, newname);
 	if (err < 0)
 		return err;
 
@@ -5396,8 +5396,8 @@ int register_netdevice(struct net_device *dev)
 		}
 	}
 
-	ret = dev_get_valid_name(dev, dev->name, 0);
-	if (ret)
+	ret = dev_get_valid_name(dev, dev->name);
+	if (ret < 0)
 		goto err_uninit;
 
 	dev->ifindex = dev_new_index(net);
@@ -5538,19 +5538,7 @@ int register_netdev(struct net_device *dev)
 	int err;
 
 	rtnl_lock();
-
-	/*
-	 * If the name is a format string the caller wants us to do a
-	 * name allocation.
-	 */
-	if (strchr(dev->name, '%')) {
-		err = dev_alloc_name(dev, dev->name);
-		if (err < 0)
-			goto out;
-	}
-
 	err = register_netdevice(dev);
-out:
 	rtnl_unlock();
 	return err;
 }
@@ -6032,7 +6020,7 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
 		/* We get here if we can't use the current device name */
 		if (!pat)
 			goto out;
-		if (dev_get_valid_name(dev, pat, 1))
+		if (dev_get_valid_name(dev, pat) < 0)
 			goto out;
 	}
 
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index d7c4bb4..d4dec8c 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1570,12 +1570,6 @@ struct net_device *rtnl_create_link(struct net *src_net, struct net *net,
 	dev->rtnl_link_state = RTNL_LINK_INITIALIZING;
 	dev->real_num_tx_queues = real_num_queues;
 
-	if (strchr(dev->name, '%')) {
-		err = dev_alloc_name(dev, dev->name);
-		if (err < 0)
-			goto err_free;
-	}
-
 	if (tb[IFLA_MTU])
 		dev->mtu = nla_get_u32(tb[IFLA_MTU]);
 	if (tb[IFLA_ADDRESS])
@@ -1595,8 +1589,6 @@ struct net_device *rtnl_create_link(struct net *src_net, struct net *net,
 
 	return dev;
 
-err_free:
-	free_netdev(dev);
 err:
 	return ERR_PTR(err);
 }
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 24efd35..0d536f2 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -413,11 +413,6 @@ static struct ip_tunnel *ipgre_tunnel_locate(struct net *net,
 
 	dev_net_set(dev, net);
 
-	if (strchr(name, '%')) {
-		if (dev_alloc_name(dev, name) < 0)
-			goto failed_free;
-	}
-
 	nt = netdev_priv(dev);
 	nt->parms = *parms;
 	dev->rtnl_link_ops = &ipgre_link_ops;
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index ef16377..f0e0fb2 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -276,11 +276,6 @@ static struct ip_tunnel * ipip_tunnel_locate(struct net *net,
 
 	dev_net_set(dev, net);
 
-	if (strchr(name, '%')) {
-		if (dev_alloc_name(dev, name) < 0)
-			goto failed_free;
-	}
-
 	nt = netdev_priv(dev);
 	nt->parms = *parms;
 
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 9dd0e96..ae244d3 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -280,11 +280,6 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct ip6_tnl_parm *p)
 
 	dev_net_set(dev, net);
 
-	if (strchr(name, '%')) {
-		if (dev_alloc_name(dev, name) < 0)
-			goto failed_free;
-	}
-
 	t = netdev_priv(dev);
 	t->parms = *p;
 	err = ip6_tnl_dev_init(dev);
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 34d8964..87a547e 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -250,11 +250,6 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,
 
 	dev_net_set(dev, net);
 
-	if (strchr(name, '%')) {
-		if (dev_alloc_name(dev, name) < 0)
-			goto failed_free;
-	}
-
 	nt = netdev_priv(dev);
 
 	nt->parms = *parms;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 4054399..80c29d6 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1144,10 +1144,6 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
 				+ IEEE80211_ENCRYPT_HEADROOM;
 	ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
 
-	ret = dev_alloc_name(ndev, ndev->name);
-	if (ret < 0)
-		goto fail;
-
 	ieee80211_assign_perm_addr(local, ndev, type);
 	memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN);
 	SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
-- 
1.7.4.2


^ permalink raw reply related

* Re: [PATCH net-next-2.6] veth: remove unneeded ifname code from veth_newlink()
From: Jiri Pirko @ 2011-04-30 10:16 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: netdev, davem, xemul
In-Reply-To: <BANLkTikUAGWhNnCrebQpVttorqVxfD6KWw@mail.gmail.com>

Fri, Apr 22, 2011 at 11:49:40AM CEST, mirqus@gmail.com wrote:
>W dniu 22 kwietnia 2011 11:43 użytkownik Michał Mirosław
><mirqus@gmail.com> napisał:
>> 2011/1/24 Jiri Pirko <jpirko@redhat.com>:
>>> The code is not needed because tb[IFLA_IFNAME] is already
>>> processed in rtnl_newlink(). Remove this redundancy.
>> Hi. This patch broke creation of veth devices. Reverting it fixes the issue.
>>
>> Symptoms:
>>
>> icybox:~# ip link add type veth
>> RTNETLINK answers: File exists
>> icybox:~# ip link add type veth peer veth1
>> icybox:~# ip addr
>> [...]
>> 56: D: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
>>    link/ether e6:57:58:52:03:50 brd ff:ff:ff:ff:ff:ff
>> 57: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
>>    link/ether c2:c2:a2:d5:d5:3a brd ff:ff:ff:ff:ff:ff
>
>Hmm. I was too quick. Reverting it fixes only first problem - "ip link
>add type veth" adds new veth pair now, but "ip link add type veth peer
>veth1" gives the same result as above.

I gusee you should do:
ip link add type veth peer name veth1
>
>Best Regards,
>Michał Mirosław

^ permalink raw reply

* Re: [PATCH net-next-2.6] veth: remove unneeded ifname code from veth_newlink()
From: Jiri Pirko @ 2011-04-30  9:02 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: netdev, davem, xemul
In-Reply-To: <BANLkTi=x8xi7-g3SZdva7Ndg0a4EY1NK8g@mail.gmail.com>

Fri, Apr 22, 2011 at 11:43:10AM CEST, mirqus@gmail.com wrote:
>2011/1/24 Jiri Pirko <jpirko@redhat.com>:
>> The code is not needed because tb[IFLA_IFNAME] is already
>> processed in rtnl_newlink(). Remove this redundancy.
>>
>> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>
>Hi. This patch broke creation of veth devices. Reverting it fixes the issue.
>
>Symptoms:
>
>icybox:~# ip link add type veth
>RTNETLINK answers: File exists
>icybox:~# ip link add type veth peer veth1
>icybox:~# ip addr
>[...]
>56: D: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
>    link/ether e6:57:58:52:03:50 brd ff:ff:ff:ff:ff:ff
>57: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
>    link/ether c2:c2:a2:d5:d5:3a brd ff:ff:ff:ff:ff:ff

interesting, on net-next I get following with or without this patch
applied:

[root@f14 ~]# ip link add type veth peer veth1
Error: either "dev" is duplicate, or "veth1" is a garbage.

Trying original F14 ip and currect git one gives the same

>
>Best Regards,
>Michał Mirosław

^ permalink raw reply

* WoL stopped working after power off with 2.6.38 (e1000e specific?)
From: Kamil Iskra @ 2011-04-30  5:45 UTC (permalink / raw)
  To: netdev, e1000-devel

[ Note: I'm not on these mailing lists, so be sure to Cc: me if you want
more info from me ]

After upgrading from kernel 2.6.37 to 2.6.38, Wake on LAN after shutdown
stopped working for me on both of my Thinkpad laptops.  Both systems use
the e1000e driver.  One (a T61) has an 82566MM NIC, the other (an X201) an
82577LM.  I'm running 64-bit Gentoo Linux with a custom compiled kernel.
The network driver is built into the kernel.

Wake on LAN still works after suspend (S3), but not after a complete
shutdown (with power supply connected).

I figured the updated e1000e driver in 2.6.38 was probably to blame,
however, after I copied the whole drivers/net/e1000e directory from the
2.6.37 over to the 2.6.38 tree and recompiled, the problem persisted, so I
don't know anymore.

I modified the system shutdown sequence to invoke ifconfig and ethtool
right before the final halt.  According to ifconfig, eth0 is down at that
point.  According to ethtool, WoL is configured correctly ("Wake-on: g").
There is, however, a difference in the output of ethtool between the two
kernel versions.  "Link detected:" shows "yes" with 2.6.37, but "no" with
2.6.38.

A workaround that I found to work was to invoke "ifconfig eth0 up" right
before the halt.

Any suggestions?  Is this new behavior expected or is it a bug?

Kamil

-- 
Kamil Iskra  kamil@iskra.name

^ permalink raw reply

* Re: [PATCH] ipv6: fix incorrect unregistration of sysctl when last ip deleted
From: David Miller @ 2011-04-30  3:47 UTC (permalink / raw)
  To: jgmyers; +Cc: kuznet, pekkas, jmorris, yoshfuji, kaber, netdev, linux-kernel
In-Reply-To: <4DBB3480.9020708@proofpoint.com>

From: John Gardiner Myers <jgmyers@proofpoint.com>
Date: Fri, 29 Apr 2011 14:58:24 -0700

> The "how" parameter indicates the device is being deleted. In this
> case, the device is not being deleted.

It means that ipv6 is being disabled on the device.

Which is what happens when one of the following happens:

1) the MTU is too small to support ipv6 properly

2) no configured ipv6 addresses remain on the device

3) the device is being unregistered

^ permalink raw reply

* [PATCHv2 2/2] tg3: Add code to allow ethtool to enable/disable loopback.
From: Mahesh Bandewar @ 2011-04-30  1:03 UTC (permalink / raw)
  To: David Miller, Matt Carlson
  Cc: netdev, Michael Chan, Ben Hutchings, Michał Mirosław,
	Mahesh Bandewar
In-Reply-To: <1304033599-8395-3-git-send-email-maheshb@google.com>


Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
Changes since v1:
 Implemented Matt's suggestions.
   (a) Enable this capability on the devices which are capable of MAC-loopback
       mode.
   (b) check if the device is running before making changes.
   (c) check bits before making changes.

 drivers/net/tg3.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index fa57e3d..f6e4c10 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6319,6 +6319,51 @@ static u32 tg3_fix_features(struct net_device *dev, u32 features)
 	return features;
 }
 
+static int tg3_set_features(struct net_device *dev, u32 features)
+{
+	struct tg3 *tp = netdev_priv(dev);
+	u32 cur_mode = 0;
+	int err = 0;
+
+	if (!netif_running(dev)) {
+		err = -EAGAIN;
+		goto sfeatures_out;
+	}
+
+	spin_lock_bh(&tp->lock);
+	cur_mode = tr32(MAC_MODE);
+
+	if (features & NETIF_F_LOOPBACK) {
+		if (cur_mode & MAC_MODE_PORT_INT_LPBACK)
+			goto sfeatures_unlock;
+
+		/*
+		 * Clear MAC_MODE_HALF_DUPLEX or you won't get packets back in
+		 * loopback mode if Half-Duplex mode was negotiated earlier.
+		 */
+		cur_mode &= ~MAC_MODE_HALF_DUPLEX;
+
+		/* Enable internal MAC loopback mode */
+		tw32(MAC_MODE, cur_mode | MAC_MODE_PORT_INT_LPBACK);
+		netif_carrier_on(tp->dev);
+		netdev_info(dev, "Internal MAC loopback mode enabled.\n");
+	} else {
+		if (!(cur_mode & MAC_MODE_PORT_INT_LPBACK))
+			goto sfeatures_unlock;
+
+		/* Disable internal MAC loopback mode */
+		tw32(MAC_MODE, cur_mode & ~MAC_MODE_PORT_INT_LPBACK);
+		/* Force link status check */
+		tg3_setup_phy(tp, 1);
+		netdev_info(dev, "Internal MAC loopback mode disabled.\n");
+	}
+sfeatures_unlock:
+	spin_unlock_bh(&tp->lock);
+
+sfeatures_out:
+	return err;
+}
+
 static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp,
 			       int new_mtu)
 {
@@ -15028,6 +15073,7 @@ static const struct net_device_ops tg3_netdev_ops = {
 	.ndo_tx_timeout		= tg3_tx_timeout,
 	.ndo_change_mtu		= tg3_change_mtu,
 	.ndo_fix_features	= tg3_fix_features,
+	.ndo_set_features	= tg3_set_features,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= tg3_poll_controller,
 #endif
@@ -15044,6 +15090,7 @@ static const struct net_device_ops tg3_netdev_ops_dma_bug = {
 	.ndo_do_ioctl		= tg3_ioctl,
 	.ndo_tx_timeout		= tg3_tx_timeout,
 	.ndo_change_mtu		= tg3_change_mtu,
+	.ndo_set_features	= tg3_set_features,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= tg3_poll_controller,
 #endif
@@ -15241,6 +15288,16 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
 	dev->features |= hw_features;
 	dev->vlan_features |= hw_features;
 
+	/*
+	 * Add loopback capability only for a subset of devices that support
+	 * MAC-LOOPBACK. Eventually this need to be enhanced to allow INT-PHY
+	 * loopback for the remaining devices.
+	 */
+	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5780 ||
+			!tg3_flag(tp, CPMU_PRESENT))
+		/* Add the loopback capability */
+		dev->hw_features |= NETIF_F_LOOPBACK;
+
 	if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 &&
 	    !tg3_flag(tp, TSO_CAPABLE) &&
 	    !(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH)) {
-- 
1.7.3.1


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox