Skip to contentSkip to conversation

Virtual device lo asks to queue packet! since -git15

DISCUSSION Andi Kleen 3 participants 5 messages Jul 21, 2007

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

FYI

Since -git15 (probably David's merge) I see a lot of

Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet!

during a LTP run on a nfsroot system

-Andi

author
#1 lore raw

Re: Virtual device lo asks to queue packet! since -git15 II

Quoted 5 lines · On Saturday 21 July 2007 09:49:22 Andi Kleen wrote:

FYI

Since -git15 (probably David's merge) I see a lot of

Quoted 8 lines

Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet!

during a LTP run on a nfsroot system

... and my firefox just hung itself up trying to connect to localhost:111 (in -git16 now)

Network definitely seems to have issues

-Andi

#2 lore raw

Re: Virtual device lo asks to queue packet! since -git15 II

Quoted 13 lines · Andi Kleen
Quoted 12 lines · On Saturday 21 July 2007 09:49:22 Andi Kleen wrote:

FYI

Since -git15 (probably David's merge) I see a lot of

Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet!

Quoted 7 lines
Quoted 1 line

during a LTP run on a nfsroot system

... and my firefox just hung itself up trying to connect to localhost:111 (in -git16 now)

Network definitely seems to have issues

It should be in David's tree already.
Patrick fixed this with folowing patch:

[NET]: Fix loopback multiqueue bug

The loopback device is not allocated through netdev_alloc_mq and thus has no room for the subqueue states reserved. Change the net_device subqueue array to always include at least one element.

include/linux/netdevice.h +1 -1
index da7a13c..bf9399c 100644
@@ -575,7 +575,7 @@ struct net_device
 
 	/* The TX queue control structures */
 	unsigned int			egress_subqueue_count;
-	struct net_device_subqueue	egress_subqueue[0];
+	struct net_device_subqueue	egress_subqueue[1];
 };
 #define to_net_dev(d) container_of(d, struct net_device, dev)
 
net/core/dev.c +2 -2
index 13a0d9f..4af0207 100644
@@ -3619,7 +3619,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
 
 	/* ensure 32-byte alignment of both the device and private area */
 	alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST +
-		     (sizeof(struct net_device_subqueue) * queue_count)) &
+		     (sizeof(struct net_device_subqueue) * (queue_count - 1))) &
 		     ~NETDEV_ALIGN_CONST;
 	alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
 
@@ -3637,7 +3637,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
 		dev->priv = ((char *)dev +
 			     ((sizeof(struct net_device) +
 			       (sizeof(struct net_device_subqueue) *
-				queue_count) + NETDEV_ALIGN_CONST)
+				(queue_count - 1)) + NETDEV_ALIGN_CONST)
 			      & ~NETDEV_ALIGN_CONST));
 	}
 
Quoted 1 line

-Andi

Signature · 1 line
	Evgeniy Polyakov
maintainer
#3 lore raw
In reply to Andi Kleen

From: Andi Kleen <[email protected]>
Date: Sat, 21 Jul 2007 09:49:22 +0200

Quoted 10 lines

Since -git15 (probably David's merge) I see a lot of

Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet!

during a LTP run on a nfsroot system

Yes I have a fix pending in my tree for this.

commit 31ce72a6b1c7635259cf522459539c0611f2c50c

Author: Patrick McHardy <[email protected]>
Date:   Fri Jul 20 19:45:45 2007 -0700

[NET]: Fix loopback crashes when multiqueue is enabled.

From: Patrick McHardy <[email protected]>

include/linux/netdevice.h +1 -1
index 9820ca1..4a616d7 100644
@@ -575,7 +575,7 @@ struct net_device
 
 	/* The TX queue control structures */
 	unsigned int			egress_subqueue_count;
-	struct net_device_subqueue	egress_subqueue[0];
+	struct net_device_subqueue	egress_subqueue[1];
 };
 #define to_net_dev(d) container_of(d, struct net_device, dev)
 
net/core/dev.c +2 -2
index 38212c3..ee40355 100644
@@ -3624,7 +3624,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
 
 	/* ensure 32-byte alignment of both the device and private area */
 	alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST +
-		     (sizeof(struct net_device_subqueue) * queue_count)) &
+		     (sizeof(struct net_device_subqueue) * (queue_count - 1))) &
 		     ~NETDEV_ALIGN_CONST;
 	alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
 
@@ -3642,7 +3642,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
 		dev->priv = ((char *)dev +
 			     ((sizeof(struct net_device) +
 			       (sizeof(struct net_device_subqueue) *
-				queue_count) + NETDEV_ALIGN_CONST)
+				(queue_count - 1)) + NETDEV_ALIGN_CONST)
 			      & ~NETDEV_ALIGN_CONST));
 	}
 
author
#4 lore raw
Quoted 12 lines · On Saturday 21 July 2007 20:53:04 David Miller wrote:

From: Andi Kleen <[email protected]>
Date: Sat, 21 Jul 2007 09:49:22 +0200

Quoted 9 lines

Since -git15 (probably David's merge) I see a lot of

Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet! Virtual device lo asks to queue packet!

Quoted 3 lines
Quoted 1 line

during a LTP run on a nfsroot system

Yes I have a fix pending in my tree for this.

Thanks. Could this explain the firefox hangs too?

-Andi