* Re: [PATCH] bonding: reset queue mapping prior to transmission to physical device (v4)
From: Eric Dumazet @ 2011-06-03 20:05 UTC (permalink / raw)
To: Neil Horman; +Cc: netdev, Jay Vosburgh, Andy Gospodarek, David S. Miller
In-Reply-To: <20110603195700.GC16656@hmsreliant.think-freely.org>
Le vendredi 03 juin 2011 à 15:57 -0400, Neil Horman a écrit :
> On Fri, Jun 03, 2011 at 09:48:51PM +0200, Eric Dumazet wrote:
> > Le vendredi 03 juin 2011 à 15:24 -0400, Neil Horman a écrit :
> > > The bonding driver is multiqueue enabled, in which each queue represents a slave
> > > to enable optional steering of output frames to given slaves against the default
> > > output policy. However, it needs to reset the skb->queue_mapping prior to
> > > queuing to the physical device or the physical slave (if it is multiqueue) could
> > > wind up transmitting on an unintended tx queue
> > >
> > > Change Notes:
> > > v2) Based on first pass review, updated the patch to restore the origional queue
> > > mapping that was found in bond_select_queue, rather than simply resetting to
> > > zero. This preserves the value of queue_mapping when it was set on receive in
> > > the forwarding case which is desireable.
> > >
> > > v3) Fixed spelling an casting error in skb->cb
> > >
> > > v4) fixed to store raw queue_mapping to avoid double decrement
> > >
> > > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > > CC: Jay Vosburgh <fubar@us.ibm.com>
> > > CC: Andy Gospodarek <andy@greyhouse.net>
> > > CC: "David S. Miller" <davem@davemloft.net>
> > > ---
> > > drivers/net/bonding/bond_main.c | 8 ++++++++
> > > 1 files changed, 8 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> > > index 17b4dd9..76adf27 100644
> > > --- a/drivers/net/bonding/bond_main.c
> > > +++ b/drivers/net/bonding/bond_main.c
> > > @@ -400,6 +400,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
> > > {
> > > skb->dev = slave_dev;
> > > skb->priority = 1;
> > > +
> > > + skb->queue_mapping = ((u16 *)skb->cb)[0];
> >
> > Please dont do that. Use a helper.
> >
> Why? It seems to be reasonably common practice for drivers to access
> queue_mapping directly.
>
> Examples can be found in:
> ixgbe_xmit_frame
> mlx4_en_xmit
> qlge_send
> igb_xmit_frame_adv
> gfar_start_xmit
>
> among others.
>
> Not saying its correct to do so necessecarily, but it seems a helper doesn't buy
> us much here, particularly a per-driver helper. If a helper really should be
> used, why not just consistently use skb_get_queue_mapping?
> Neil
I was speaking of skb->cb access, of course, sorry if you missed my
point ;)
Please take a look at various files using helpers for this.
For example : net/ipv4/igmp.c
#define igmp_skb_size(skb) (*(unsigned int *)((skb)->cb))
^ permalink raw reply
* [PATCH 1/2] vlan: only create special VLAN 0 once
From: Jiri Bohac @ 2011-06-03 20:07 UTC (permalink / raw)
To: Patrick McHardy, David S. Miller, netdev; +Cc: Pedro Garcia
Commit ad1afb00 registers a VLAN with vid == 0 for every device to handle
802.1p frames. This is currently done on every NETDEV_UP event and the special
vlan is never unregistered. This may have strange effects on drivers
implementning ndo_vlan_rx_add_vid(). E.g. bonding will allocate a linked-list
element each time, causing a memory leak.
Only register the special VLAN once on NETDEV_REGISTER.
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index c7a581a..bf89565 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -371,7 +371,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
if (is_vlan_dev(dev))
__vlan_device_event(dev, event);
- if ((event == NETDEV_UP) &&
+ if ((event == NETDEV_REGISTER) &&
(dev->features & NETIF_F_HW_VLAN_FILTER) &&
dev->netdev_ops->ndo_vlan_rx_add_vid) {
pr_info("8021q: adding VLAN 0 to HW filter on device %s\n",
--
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ
^ permalink raw reply related
* [PATCH 2/2] bonding: restore NETIF_F_VLAN_CHALLENGED properly in bond_del_vlan()
From: Jiri Bohac @ 2011-06-03 20:14 UTC (permalink / raw)
To: Jay Vosburgh, Andy Gospodarek, David S. Miller, netdev
Cc: Pedro Garcia, Patrick McHardy
In-Reply-To: <20110603200738.GA24804@midget.suse.cz>
Since commit ad1afb00, bond_del_vlan() never restores
NETIF_F_VLAN_CHALLENGED as intended. bond->vlan_list is never
empty once the 8021q module is loaded, because the special VLAN 0
is always kept registered on the bond interface. Change the
condition to check if bond->vlan_list contains exactly one item
instead of checking for an empty list.
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 17b4dd9..4d317cd 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -329,9 +329,10 @@ static int bond_del_vlan(struct bonding *bond, unsigned short vlan_id)
kfree(vlan);
- if (list_empty(&bond->vlan_list) &&
+ if (bond->vlan_list.next->next == &bond->vlan_list &&
(bond->slave_cnt == 0)) {
- /* Last VLAN removed and no slaves, so
+ /* Last VLAN removed (the only member of vlan_list
+ * is the special vid == 0 vlan) and no slaves, so
* restore block on adding VLANs. This will
* be removed once new slaves that are not
* VLAN challenged will be added.
--
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ
^ permalink raw reply related
* [PATCH] bonding: reset queue mapping prior to transmission to physical device (v5)
From: Neil Horman @ 2011-06-03 20:35 UTC (permalink / raw)
To: netdev; +Cc: Neil Horman, Jay Vosburgh, Andy Gospodarek, David S. Miller
In-Reply-To: <1307129073-3769-1-git-send-email-nhorman@tuxdriver.com>
The bonding driver is multiqueue enabled, in which each queue represents a slave
to enable optional steering of output frames to given slaves against the default
output policy. However, it needs to reset the skb->queue_mapping prior to
queuing to the physical device or the physical slave (if it is multiqueue) could
wind up transmitting on an unintended tx queue
Change Notes:
v2) Based on first pass review, updated the patch to restore the origional queue
mapping that was found in bond_select_queue, rather than simply resetting to
zero. This preserves the value of queue_mapping when it was set on receive in
the forwarding case which is desireable.
v3) Fixed spelling an casting error in skb->cb
v4) fixed to store raw queue_mapping to avoid double decrement
v5) Eric D requested that ->cb access be wrapped in a macro.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: "David S. Miller" <davem@davemloft.net>
---
drivers/net/bonding/bond_main.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 17b4dd9..abf6e19 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -388,6 +388,8 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
return next;
}
+#define bond_queue_mapping(skb) (*(u16 *)((skb)->cb))
+
/**
* bond_dev_queue_xmit - Prepare skb for xmit.
*
@@ -400,6 +402,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
{
skb->dev = slave_dev;
skb->priority = 1;
+
+ skb->queue_mapping = bond_queue_mapping(skb);
+
if (unlikely(netpoll_tx_running(slave_dev)))
bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
else
@@ -4206,6 +4211,7 @@ static inline int bond_slave_override(struct bonding *bond,
return res;
}
+
static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
{
/*
@@ -4216,6 +4222,11 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
*/
u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
+ /*
+ * Save the original txq to restore before passing to the driver
+ */
+ bond_queue_mapping(skb) = skb->queue_mapping;
+
if (unlikely(txq >= dev->real_num_tx_queues)) {
do {
txq -= dev->real_num_tx_queues;
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH] iproute: Ignore all output fields of ip route get for route add
From: Andi Kleen @ 2011-06-03 20:52 UTC (permalink / raw)
To: David Miller; +Cc: andi, shemminger, netdev
In-Reply-To: <20110603.020759.797628983600553809.davem@davemloft.net>
> There are no guarentees that what the tool outputs for routes is
> suitable for creating routes.
>
> People have already put vpnc script fixes into Fedora and similar
> already.
>
> iproute2 is not where the hacks belong.
Hmmm, so you expect every user to maintain the sed line from hell?
Does not sound very user friendly to me.
An alternative would be to add a option to ip route get that disables
printing any options that cannot be used for input.
Would that be more acceptable?
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply
* Re: [BUG] netconsole broken by scheduler updates
From: Laurent Riffard @ 2011-06-03 21:15 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: netdev
In-Reply-To: <1306426675.2497.84.camel@laptop>
Le 26/05/2011 18:17, Peter Zijlstra a écrit :
> On Thu, 2011-05-26 at 18:12 +0200, Laurent Riffard wrote:
>> Le 26/05/2011 12:35, Laurent Riffard a écrit :
>>> On Thu, 26 May 2011, Peter Zijlstra wrote:
>>>> On Thu, 2011-05-26 at 11:21 +0200, Laurent Riffard wrote:
>>>>> Hi,
>>>>>
>>>>> Recently, netconsole was broken by some scheduler updates. Kernel hangs
>>>>> on boot near the network card initialization. I noticed that it does
>>>>> hang just where a "inconsistent lock state" message normally appears.
>>>>>
>>>>> I did a bisection : e4a52bcb9a18142d79e231b6733cabdbf2e67c1f is the
>>>>> first bad commit.
>>>>> commit e4a52bcb9a18142d79e231b6733cabdbf2e67c1f
>>>>> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
>>>>> Date: Tue Apr 5 17:23:54 2011 +0200
>>>>>
>>>>> sched: Remove rq->lock from the first half of ttwu()
>>>>>
>>>>>
>>>>> Before this commit, kernel was booting succesfully despite the
>>>>> "inconsistent lock state" message. After this commit, the kernel does
>>>>> hang on boot, I have to push the reset button.
>>>>
>>>> Do you have CONFIG_HARDLOCKUP_DETECTOR=y, and do you get an NMI splat
>>>> after some 10 seconds? It would be interesting to see where its stuck.
>>>
>>> CONFIG_HARDLOCKUP_DETECTOR is not set for now. I'll give it a try.
>>
>> I activated CONFIG_HARDLOCKUP_DETECTOR, but failed to obtain more
>> information. During the boot, the kernel hangs just after bringing up
>> the NIC. I waited 2 minutes, without getting any more messages.
>
> OK, thanks for trying, I shall try and reproduce locally.
>
Hello,
I tried some newer kernel. It boots successfully now, but
I've got interesting (?) logs :
====================================================
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.0.0-rc1-00049-g1fa7b6a (laurent@calimero) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) ) #148 SMP PREEMPT Thu Jun 2 18:56:41 CEST 2011
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.0.0-rc1-00049-g1fa7b6a root=/dev/mapper/vglinux1-lv_ubuntu_64bits ro debug netconsole=4444@192.168.0.9/eth0,6666@192.168.0.10/6C:62:6D:48:4B:C7 splash vt.handoff=7
[...]
[ 0.685768] Console: switching to colour frame buffer device 160x64
[ 0.707611] fb0: VESA VGA frame buffer device
[ 0.714029] Linux agpgart interface v0.103
[ 0.714206] forcedeth: Reverse Engineered nForce ethernet driver. Version 0.64.
[ 0.714837] ACPI: PCI Interrupt Link [APCH] enabled at IRQ 23
[ 0.715054] forcedeth 0000:00:0a.0: PCI INT A -> Link[APCH] -> GSI 23 (level, low) -> IRQ 23
[ 0.715283] forcedeth 0000:00:0a.0: setting latency timer to 64
[ 1.241552] forcedeth 0000:00:0a.0: ifname eth0, PHY OUI 0x732 @ 1, addr 00:1f:d0:53:49:ae
[ 1.241784] forcedeth 0000:00:0a.0: highdma pwrctl mgmt gbit lnktim msi desc-v3
[ 1.242101] netconsole: local port 4444
[ 1.242207] netconsole: local IP 192.168.0.9
[ 1.242320] netconsole: interface 'eth0'
[ 1.242426] netconsole: remote port 6666
[ 1.242531] netconsole: remote IP 192.168.0.10
[ 1.242650] netconsole: remote ethernet address 6c:62:6d:48:4b:c7
[ 1.242822] netconsole: device eth0 not up yet, forcing it
[ 1.244612] forcedeth 0000:00:0a.0: irq 40 for MSI/MSI-X
[ 1.245057] forcedeth 0000:00:0a.0: eth0: no link during initialization
[ 2.374451] forcedeth 0000:00:0a.0: eth0: link up
[ 2.381178]
[ 2.381179] =================================
[ 2.381182] [ INFO: inconsistent lock state ]
[ 2.381184] 3.0.0-rc1-00049-g1fa7b6a #148
[ 2.381186] ---------------------------------
[ 2.381188] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
[ 2.381191] swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 2.381193] (&(&napi->poll_lock)->rlock){+.?...}, at: [<ffffffff8123cd08>] netpoll_poll_dev+0x9d/0x4ed
[ 2.381202] {IN-SOFTIRQ-W} state was registered at:
[ 2.381204] [<ffffffff81068020>] __lock_acquire+0x319/0xdd8
[ 2.381208] [<ffffffff81068f9f>] lock_acquire+0xd8/0x103
[ 2.381211] [<ffffffff8129c019>] _raw_spin_lock+0x36/0x45
[ 2.381215] [<ffffffff8122b886>] net_rx_action+0x8d/0x1e7
[ 2.381219] [<ffffffff81040f73>] __do_softirq+0xe1/0x1c0
[ 2.381223] [<ffffffff8129e39c>] call_softirq+0x1c/0x30
[ 2.381226] [<ffffffff81004296>] do_softirq+0x46/0x9c
[ 2.381229] [<ffffffff810412c5>] irq_exit+0x4d/0xa2
[ 2.381232] [<ffffffff81003f3a>] do_IRQ+0x88/0x9f
[ 2.381235] [<ffffffff8129cb93>] ret_from_intr+0x0/0x1a
[ 2.381239] [<ffffffff8100972c>] default_idle+0x40/0x74
[ 2.381242] [<ffffffff81009844>] amd_e400_idle+0xe4/0xe6
[ 2.381246] [<ffffffff81001270>] cpu_idle+0x5e/0x94
[ 2.381249] [<ffffffff81296383>] start_secondary+0x18a/0x18f
[ 2.381252] irq event stamp: 1000341
[ 2.381254] hardirqs last enabled at (1000341): [<ffffffff8129cc58>] restore_args+0x0/0x30
[ 2.381257] hardirqs last disabled at (1000339): [<ffffffff8104100a>] __do_softirq+0x178/0x1c0
[ 2.381261] softirqs last enabled at (1000340): [<ffffffff8104103c>] __do_softirq+0x1aa/0x1c0
[ 2.381264] softirqs last disabled at (1000251): [<ffffffff8129e39c>] call_softirq+0x1c/0x30
[ 2.381267]
[ 2.381268] other info that might help us debug this:
[ 2.381269] Possible unsafe locking scenario:
[ 2.381270]
[ 2.381271] CPU0
[ 2.381272] ----
[ 2.381273] lock(&(&napi->poll_lock)->rlock);
[ 2.381275] <Interrupt>
[ 2.381276] lock(&(&napi->poll_lock)->rlock);
[ 2.381279]
[ 2.381279] *** DEADLOCK ***
[ 2.381280]
[ 2.381282] 1 lock held by swapper/1:
[ 2.381283] #0: (target_list_lock){+.+...}, at: [<ffffffff811e5877>] write_msg+0x34/0xcd
[ 2.381288]
[ 2.381289] stack backtrace:
[ 2.381291] Pid: 1, comm: swapper Not tainted 3.0.0-rc1-00049-g1fa7b6a #148
[ 2.381293] Call Trace:
[ 2.381297] [<ffffffff81067b1d>] valid_state+0x217/0x229
[ 2.381300] [<ffffffff81067396>] ? check_usage_forwards+0x85/0x85
[ 2.381303] [<ffffffff81067c11>] mark_lock+0xe2/0x1d8
[ 2.381306] [<ffffffff810693bb>] ? trace_hardirqs_on_caller+0x10b/0x12f
[ 2.381309] [<ffffffff8106809e>] __lock_acquire+0x397/0xdd8
[ 2.381314] [<ffffffff8106e882>] ? arch_local_irq_restore+0x6/0xd
[ 2.381317] [<ffffffff8123cd08>] ? netpoll_poll_dev+0x9d/0x4ed
[ 2.381320] [<ffffffff81068f9f>] lock_acquire+0xd8/0x103
[ 2.381324] [<ffffffff8123cd08>] ? netpoll_poll_dev+0x9d/0x4ed
[ 2.381327] [<ffffffff8129c557>] _raw_spin_trylock+0x4a/0x7f
[ 2.381331] [<ffffffff8123cd08>] ? netpoll_poll_dev+0x9d/0x4ed
[ 2.381334] [<ffffffff8123cd08>] netpoll_poll_dev+0x9d/0x4ed
[ 2.381338] [<ffffffff8123d2ee>] netpoll_send_skb_on_dev+0x10b/0x20f
[ 2.381342] [<ffffffff8123d5dd>] netpoll_send_udp+0x1eb/0x1fa
[ 2.381345] [<ffffffff811e5877>] ? write_msg+0x34/0xcd
[ 2.381348] [<ffffffff811e58cf>] write_msg+0x8c/0xcd
[ 2.381352] [<ffffffff8103b78d>] __call_console_drivers+0x72/0x84
[ 2.381355] [<ffffffff8103b7f8>] _call_console_drivers+0x59/0x5e
[ 2.381359] [<ffffffff8103c033>] console_unlock+0xf3/0x1ac
[ 2.381362] [<ffffffff8103c891>] register_console+0x228/0x2b3
[ 2.381366] [<ffffffff816a76b0>] init_netconsole+0x15d/0x1e4
[ 2.381371] [<ffffffff81166a64>] ? __pci_register_driver+0x9b/0xcd
[ 2.381374] [<ffffffff816a7553>] ? option_setup+0x1f/0x1f
[ 2.381377] [<ffffffff8100030f>] do_one_initcall+0x7a/0x137
[ 2.381381] [<ffffffff81685bcd>] kernel_init+0xb5/0x135
[ 2.381386] [<ffffffff81157d1e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 2.381389] [<ffffffff8129e2a4>] kernel_thread_helper+0x4/0x10
[ 2.381392] [<ffffffff8129cc58>] ? retint_restore_args+0x13/0x13
[ 2.381396] [<ffffffff81685b18>] ? start_kernel+0x360/0x360
[ 2.381399] [<ffffffff8129e2a0>] ? gs_change+0x13/0x13
[ 2.381464] ------------[ cut here ]------------
[ 2.381468] WARNING: at net/core/netpoll.c:346 netpoll_send_skb_on_dev+0x158/0x20f()
[ 2.381470] Hardware name: M68SM-S2L
[ 2.381473] netpoll_send_skb(): eth0 enabled interrupts in poll (nv_start_xmit_optimized+0x0/0x484)
[ 2.381474] Modules linked in:
[ 2.381477] Pid: 1, comm: swapper Not tainted 3.0.0-rc1-00049-g1fa7b6a #148
[ 2.381479] Call Trace:
[ 2.381482] [<ffffffff8103b381>] warn_slowpath_common+0x80/0x98
[ 2.381485] [<ffffffff8103b42d>] warn_slowpath_fmt+0x41/0x43
[ 2.381489] [<ffffffff811e526c>] ? nv_start_xmit+0x3df/0x3df
[ 2.381492] [<ffffffff8123d33b>] netpoll_send_skb_on_dev+0x158/0x20f
[ 2.381496] [<ffffffff8123d5dd>] netpoll_send_udp+0x1eb/0x1fa
[ 2.381499] [<ffffffff811e5877>] ? write_msg+0x34/0xcd
[ 2.381502] [<ffffffff811e58cf>] write_msg+0x8c/0xcd
[ 2.381505] [<ffffffff8103b78d>] __call_console_drivers+0x72/0x84
[ 2.381508] [<ffffffff8103b7f8>] _call_console_drivers+0x59/0x5e
[ 2.381512] [<ffffffff8103c033>] console_unlock+0xf3/0x1ac
[ 2.381515] [<ffffffff8103c891>] register_console+0x228/0x2b3
[ 2.381518] [<ffffffff816a76b0>] init_netconsole+0x15d/0x1e4
[ 2.381522] [<ffffffff81166a64>] ? __pci_register_driver+0x9b/0xcd
[ 2.381525] [<ffffffff816a7553>] ? option_setup+0x1f/0x1f
[ 2.381528] [<ffffffff8100030f>] do_one_initcall+0x7a/0x137
[ 2.381531] [<ffffffff81685bcd>] kernel_init+0xb5/0x135
[ 2.381535] [<ffffffff81157d1e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 2.381538] [<ffffffff8129e2a4>] kernel_thread_helper+0x4/0x10
[ 2.381541] [<ffffffff8129cc58>] ? retint_restore_args+0x13/0x13
[ 2.381545] [<ffffffff81685b18>] ? start_kernel+0x360/0x360
[ 2.381548] [<ffffffff8129e2a0>] ? gs_change+0x13/0x13
[ 2.381555] ---[ end trace f00f2127e552114f ]---
[ 2.383979] console [netcon0] enabled
[ 2.384117] netconsole: network logging started
[ 2.384492] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
[ 2.384679] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[ 2.385208] serio: i8042 KBD port at 0x60,0x64 irq 1
[...]
==================================================================
hope this help
~~
laurent
^ permalink raw reply
* [PATCH net-next 1/3] net: Remove unnecessary semicolons
From: Joe Perches @ 2011-06-03 21:51 UTC (permalink / raw)
To: netdev
In-Reply-To: <cover.1307137351.git.joe@perches.com>
Semicolons are not necessary after switch/while/for/if braces
so remove them.
Signed-off-by: Joe Perches <joe@perches.com>
---
net/batman-adv/hard-interface.c | 2 +-
net/bluetooth/hci_core.c | 4 ++--
net/sunrpc/auth.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index a3fbfb5..5719087 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -568,7 +568,7 @@ static int hard_if_event(struct notifier_block *this,
break;
default:
break;
- };
+ }
hardif_put:
hardif_free_ref(hard_iface);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 815269b..e937ada 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1519,7 +1519,7 @@ int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count)
data += (count - rem);
count = rem;
- };
+ }
return rem;
}
@@ -1554,7 +1554,7 @@ int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count)
data += (count - rem);
count = rem;
- };
+ }
return rem;
}
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index cd6e4aa..727e506 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -626,7 +626,7 @@ rpcauth_refreshcred(struct rpc_task *task)
if (err < 0)
goto out;
cred = task->tk_rqstp->rq_cred;
- };
+ }
dprintk("RPC: %5u refreshing %s cred %p\n",
task->tk_pid, cred->cr_auth->au_ops->au_name, cred);
--
1.7.5.rc3.dirty
^ permalink raw reply related
* [PATCH net-next 0/3] net: drivers/net: include/net: Remove unnecessary semicolons
From: Joe Perches @ 2011-06-03 21:51 UTC (permalink / raw)
To: netdev
Done via perl script:
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/;
foreach my $file (@ARGV) {
my $f;
my $text;
my $oldtext;
next if ((-d $file));
open($f, '<', $file)
or die "$P: Can't open $file for read\n";
$oldtext = do { local($/) ; <$f> };
close($f);
next if ($oldtext eq "");
$text = $oldtext;
my $count = 0;
do {
$count = 0;
$count += $text =~ s@\b(if\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
$count += $text =~ s@\b(while\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
$count += $text =~ s@\b(for\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
$count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
} while ($count > 0);
if ($text ne $oldtext) {
my $newfile = $file;
open($f, '>', $newfile)
or die "$P: Can't open $newfile for write\n";
print $f $text;
close($f);
}
}
Joe Perches (3):
net: Remove unnecessary semicolons
drivers/net: Remove unnecessary semicolons
include/net: Remove unnecessary semicolons
drivers/net/amd8111e.c | 2 +-
drivers/net/cxgb4/cxgb4_main.c | 2 +-
drivers/net/enic/enic_main.c | 2 +-
drivers/net/irda/via-ircc.h | 2 +-
drivers/net/iseries_veth.c | 4 ++--
drivers/net/ixgbe/ixgbe_82599.c | 4 ++--
drivers/net/ixgbe/ixgbe_common.c | 4 ++--
drivers/net/myri10ge/myri10ge.c | 2 +-
drivers/net/netxen/netxen_nic_init.c | 2 +-
drivers/net/ps3_gelic_net.c | 2 +-
drivers/net/slhc.c | 2 +-
drivers/net/sungem.c | 2 +-
drivers/net/tokenring/3c359.c | 6 ++++--
drivers/net/tokenring/ibmtr.c | 2 +-
drivers/net/tun.c | 2 +-
drivers/net/via-velocity.c | 2 +-
drivers/net/wireless/b43/main.c | 2 +-
drivers/net/wireless/b43legacy/main.c | 2 +-
drivers/net/wireless/iwmc3200wifi/fw.c | 2 +-
drivers/net/wireless/orinoco/main.c | 2 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 2 +-
drivers/net/znet.c | 2 +-
include/net/sctp/sctp.h | 4 ++--
net/batman-adv/hard-interface.c | 2 +-
net/bluetooth/hci_core.c | 4 ++--
net/sunrpc/auth.c | 2 +-
27 files changed, 35 insertions(+), 33 deletions(-)
--
1.7.5.rc3.dirty
^ permalink raw reply
* [PATCH net-next 2/3] drivers/net: Remove unnecessary semicolons
From: Joe Perches @ 2011-06-03 21:51 UTC (permalink / raw)
To: netdev
In-Reply-To: <cover.1307137351.git.joe@perches.com>
Semicolons are not necessary after switch/while/for/if braces
so remove them.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/amd8111e.c | 2 +-
drivers/net/cxgb4/cxgb4_main.c | 2 +-
drivers/net/enic/enic_main.c | 2 +-
drivers/net/irda/via-ircc.h | 2 +-
drivers/net/iseries_veth.c | 4 ++--
drivers/net/ixgbe/ixgbe_82599.c | 4 ++--
drivers/net/ixgbe/ixgbe_common.c | 4 ++--
drivers/net/myri10ge/myri10ge.c | 2 +-
drivers/net/netxen/netxen_nic_init.c | 2 +-
drivers/net/ps3_gelic_net.c | 2 +-
drivers/net/slhc.c | 2 +-
drivers/net/sungem.c | 2 +-
drivers/net/tokenring/3c359.c | 6 ++++--
drivers/net/tokenring/ibmtr.c | 2 +-
drivers/net/tun.c | 2 +-
drivers/net/via-velocity.c | 2 +-
drivers/net/wireless/b43/main.c | 2 +-
drivers/net/wireless/b43legacy/main.c | 2 +-
drivers/net/wireless/iwmc3200wifi/fw.c | 2 +-
drivers/net/wireless/orinoco/main.c | 2 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 2 +-
drivers/net/znet.c | 2 +-
23 files changed, 29 insertions(+), 27 deletions(-)
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index 241b185..81475ea 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -1958,7 +1958,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
IPG_CONVERGE_JIFFIES;
lp->ipg_data.ipg = DEFAULT_IPG;
lp->ipg_data.ipg_state = CSTATE;
- };
+ }
/* display driver and device information */
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index 7e3cfbe..c9957b7 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -3704,7 +3704,7 @@ static int __devinit init_one(struct pci_dev *pdev,
if (err) {
dev_warn(&pdev->dev, "only %d net devices registered\n", i);
err = 0;
- };
+ }
if (cxgb4_debugfs_root) {
adapter->debugfs_root = debugfs_create_dir(pci_name(pdev),
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 2f433fb..5b087eb 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1560,7 +1560,7 @@ static void enic_notify_timer_start(struct enic *enic)
default:
/* Using intr for notification for INTx/MSI-X */
break;
- };
+ }
}
/* rtnl lock is held, process context */
diff --git a/drivers/net/irda/via-ircc.h b/drivers/net/irda/via-ircc.h
index c6f5848..f903a6a 100644
--- a/drivers/net/irda/via-ircc.h
+++ b/drivers/net/irda/via-ircc.h
@@ -210,7 +210,7 @@ static void DisableDmaChannel(unsigned int channel)
break;
default:
break;
- }; //Switch
+ }
}
static unsigned char ReadLPCReg(int iRegNum)
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index 9ece1fd..b6c296f 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -538,7 +538,7 @@ static void veth_handle_ack(struct veth_lpevent *event)
default:
veth_error("Unknown ack type %d from LPAR %d.\n",
event->base_event.xSubtype, rlp);
- };
+ }
}
static void veth_handle_int(struct veth_lpevent *event)
@@ -584,7 +584,7 @@ static void veth_handle_int(struct veth_lpevent *event)
default:
veth_error("Unknown interrupt type %d from LPAR %d.\n",
event->base_event.xSubtype, rlp);
- };
+ }
}
static void veth_handle_event(struct HvLpEvent *event)
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index 8ee6612..0d7bc91 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -1157,7 +1157,7 @@ s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc)
default:
/* bad value */
return IXGBE_ERR_CONFIG;
- };
+ }
/* Move the flexible bytes to use the ethertype - shift 6 words */
fdirctrl |= (0x6 << IXGBE_FDIRCTRL_FLEX_SHIFT);
@@ -1245,7 +1245,7 @@ s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc)
default:
/* bad value */
return IXGBE_ERR_CONFIG;
- };
+ }
/* Turn perfect match filtering on */
fdirctrl |= IXGBE_FDIRCTRL_PERFECT_MATCH;
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index b894b42..de65643 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1292,7 +1292,7 @@ static s32 ixgbe_ready_eeprom(struct ixgbe_hw *hw)
udelay(5);
ixgbe_standby_eeprom(hw);
- };
+ }
/*
* On some parts, SPI write time could vary from 0-20mSec on 3.3V
@@ -1374,7 +1374,7 @@ static void ixgbe_shift_out_eeprom_bits(struct ixgbe_hw *hw, u16 data,
* EEPROM
*/
mask = mask >> 1;
- };
+ }
/* We leave the "DI" bit set to "0" when we leave this routine. */
eec &= ~IXGBE_EEC_DI;
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index bf84849..3f33870 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1013,7 +1013,7 @@ static int myri10ge_reset(struct myri10ge_priv *mgp)
cmd.data2 = i;
status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_INTRQ_DMA,
&cmd, 0);
- };
+ }
status |=
myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_IRQ_ACK_OFFSET, &cmd, 0);
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 7f99967..ca59b4f 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1279,7 +1279,7 @@ void netxen_free_dummy_dma(struct netxen_adapter *adapter)
if (--i == 0)
break;
- };
+ }
}
if (i) {
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index b1f251d..d47abb4 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -1009,7 +1009,7 @@ static int gelic_card_decode_one_descr(struct gelic_card *card)
netdev = card->netdev[i];
break;
}
- };
+ }
if (GELIC_PORT_MAX <= i) {
pr_info("%s: unknown packet vid=%x\n", __func__, vid);
goto refill;
diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c
index ab9e3b7..0a0a664 100644
--- a/drivers/net/slhc.c
+++ b/drivers/net/slhc.c
@@ -297,7 +297,7 @@ slhc_compress(struct slcompress *comp, unsigned char *icp, int isize,
lcs = cs;
cs = cs->next;
comp->sls_o_searches++;
- };
+ }
/*
* Didn't find it -- re-use oldest cstate. Send an
* uncompressed packet that tells the other side what
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index f0bcbe4..71d4a03 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2716,7 +2716,7 @@ static int gem_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
data->val_in);
rc = 0;
break;
- };
+ }
return rc;
}
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index ff32bef..b6162fe 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -304,7 +304,7 @@ static int __devinit xl_probe(struct pci_dev *pdev,
if ((i = pci_request_regions(pdev,"3c359"))) {
return i ;
- } ;
+ }
/*
* Allowing init_trdev to allocate the private data will align
@@ -1773,7 +1773,9 @@ static void xl_wait_misr_flags(struct net_device *dev)
if (readb(xl_mmio + MMIO_MACDATA) != 0) { /* Misr not clear */
for (i=0; i<6; i++) {
writel(MEM_BYTE_READ | 0xDFFE0 | i, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
- while (readb(xl_mmio + MMIO_MACDATA) != 0 ) {} ; /* Empty Loop */
+ while (readb(xl_mmio + MMIO_MACDATA) != 0) {
+ ; /* Empty Loop */
+ }
}
}
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index 4786497..e896ad0 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -177,7 +177,7 @@ static char __devinit *adapter_def(char type)
case 0xD: return "16/4 Adapter/A (short) | 16/4 ISA-16 Adapter";
case 0xC: return "Auto 16/4 Adapter";
default: return "adapter (unknown type)";
- };
+ }
};
#define TRC_INIT 0x01 /* Trace initialization & PROBEs */
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 74e9405..8a27cbf 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -666,7 +666,7 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun,
case TUN_TAP_DEV:
skb->protocol = eth_type_trans(skb, tun->dev);
break;
- };
+ }
if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) {
pr_debug("GSO!\n");
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 06daa9d..f929242 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1887,7 +1887,7 @@ static void velocity_error(struct velocity_info *vptr, int status)
else
netif_wake_queue(vptr->dev);
- };
+ }
if (status & ISR_MIBFI)
velocity_update_hw_mibs(vptr);
if (status & ISR_LSTEI)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index eb41596..d74bc5f 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4085,7 +4085,7 @@ static int b43_phy_versioning(struct b43_wldev *dev)
#endif
default:
unsupported = 1;
- };
+ }
if (unsupported) {
b43err(dev->wl, "FOUND UNSUPPORTED PHY "
"(Analog %u, Type %u, Revision %u)\n",
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 1ab8861..60107b8 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2974,7 +2974,7 @@ static int b43legacy_phy_versioning(struct b43legacy_wldev *dev)
break;
default:
unsupported = 1;
- };
+ }
if (unsupported) {
b43legacyerr(dev->wl, "FOUND UNSUPPORTED PHY "
"(Analog %u, Type %u, Revision %u)\n",
diff --git a/drivers/net/wireless/iwmc3200wifi/fw.c b/drivers/net/wireless/iwmc3200wifi/fw.c
index 4906709..6f1afe6 100644
--- a/drivers/net/wireless/iwmc3200wifi/fw.c
+++ b/drivers/net/wireless/iwmc3200wifi/fw.c
@@ -187,7 +187,7 @@ static int iwm_load_img(struct iwm_priv *iwm, const char *img_name)
if (ret < 0)
goto err_release_fw;
opcode_idx++;
- };
+ }
/* Read firmware version */
fw_offset = iwm_fw_op_offset(iwm, fw, IWM_HDR_REC_OP_SW_VER, 0);
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index 62c6b2b..b0f233f 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -1958,7 +1958,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
evstat = hermes_read_regn(hw, EVSTAT);
events = evstat & hw->inten;
- };
+ }
orinoco_unlock(priv, &flags);
return IRQ_HANDLED;
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 2a6aa85..8f92dfc 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1355,7 +1355,7 @@ static void rt2800_config_ht_opmode(struct rt2x00_dev *rt2x00dev,
gf20_rate = gf40_rate = 0x0003;
}
break;
- };
+ }
/* check for STAs not supporting greenfield mode */
if (any_sta_nongf)
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index cc4a54f..3ac0943 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -219,7 +219,7 @@ static void rt2800pci_start_queue(struct data_queue *queue)
break;
default:
break;
- };
+ }
}
static void rt2800pci_kick_queue(struct data_queue *queue)
diff --git a/drivers/net/znet.c b/drivers/net/znet.c
index ec2800f..8b88817 100644
--- a/drivers/net/znet.c
+++ b/drivers/net/znet.c
@@ -731,7 +731,7 @@ static void znet_rx(struct net_device *dev)
cur_frame_end_offset -= ((count + 1)>>1) + 3;
if (cur_frame_end_offset < 0)
cur_frame_end_offset += RX_BUF_SIZE/2;
- };
+ }
/* Now step forward through the list. */
do {
--
1.7.5.rc3.dirty
^ permalink raw reply related
* [PATCH net-next 3/3] include/net: Remove unnecessary semicolons
From: Joe Perches @ 2011-06-03 21:51 UTC (permalink / raw)
To: netdev
In-Reply-To: <cover.1307137351.git.joe@perches.com>
Semicolons are not necessary after switch/while/for/if braces
so remove them.
Signed-off-by: Joe Perches <joe@perches.com>
---
include/net/sctp/sctp.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index f9fe374..6a72a58 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -601,7 +601,7 @@ static inline int ipver2af(__u8 ipver)
return AF_INET6;
default:
return 0;
- };
+ }
}
/* Convert from an address parameter type to an address family. */
@@ -614,7 +614,7 @@ static inline int param_type2af(__be16 type)
return AF_INET6;
default:
return 0;
- };
+ }
}
/* Perform some sanity checks. */
--
1.7.5.rc3.dirty
^ permalink raw reply related
* Re: bridge/netfilter: regression in 2.6.39.1
From: Ben Hutchings @ 2011-06-03 22:31 UTC (permalink / raw)
To: Eric Dumazet
Cc: Alexander Holler, linux-kernel, David Miller, Herbert Xu, netdev
In-Reply-To: <1307129642.2600.2.camel@edumazet-laptop>
On Fri, 2011-06-03 at 21:34 +0200, Eric Dumazet wrote:
> Le vendredi 03 juin 2011 à 21:21 +0200, Alexander Holler a écrit :
> > Hello,
> >
> > I'm getting a oops in the bridge code in br_change_mtu() with 2.6.39.1.
> > The patch below seems to fix that.
> >
> > I'm not sure about the usage of dst_cow_metrics_generic() in
> > fake_dst_ops, but after having a quick look at it seems to be ok to use
> > that here.
> >
> > Regards,
> >
> > Alexander
> >
> > -----
> > From 3c1d5951af73389798afeea672ec224e195b8e8d Mon Sep 17 00:00:00 2001
> > From: Alexander Holler <holler@ahsoftware.de>
> > Date: Fri, 3 Jun 2011 20:43:06 +0200
> > Subject: [PATCH] bridge: add dst_cow_metrics_generic to fake_dst_ops
> >
> > Commit 42923465fb8d025a2b5153f2e7ab1e6e1058bf00 does here what it
> > should prevent, it introduces NULL a dereference.
> >
>
> I cant find this commit in known trees. Could you give the real commit
> id and its title ?
[...]
It's your commit 33eb9873a283a2076f2b5628813d5365ca420ea9, applied to
2.6.39.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Are we allowed to add a new column to /proc/net/tcp?
From: Ben Greear @ 2011-06-03 22:34 UTC (permalink / raw)
To: netdev
I'd like to add mss so that we can calculate the window
size (which is cwnd * mss if I understand properly).
If there is another way to get at this information for
arbritrary TCP sockets, I'm interested in that as well.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [Bugme-new] [Bug 36602] New: Bridge fails to work normally without net.ipv4.ip_forward=1
From: Ben Hutchings @ 2011-06-03 22:37 UTC (permalink / raw)
To: igor
Cc: netdev, bugzilla-daemon, bugme-daemon, Stephen Hemminger,
Neil Horman, Andrew Morton
In-Reply-To: <20110603123632.139f83ca.akpm@linux-foundation.org>
On Fri, 2011-06-03 at 12:36 -0700, Andrew Morton wrote:
[...]
> > At the bridge, on each interface i've created a vlan, and then bridged them:
> > # vconfig add eth0 102
> > # vconfig add eth1 102
> > # brctl addbr br0
> > # brctl addif br0 eth0.102
> > # brctl addif br0 eth1.102
> > # ip link set br0 mtu 9000 up
> > ...etc...
> >
> > At this point, the bridge seems to be working, i can ping between host1 &
> > host2, even with jumbo frames without fragmentation.
> >
> > BUT when i am trying to use iperf & friends to measure raw tcp speed between
> > hosts 1/2, i'm getting something weird like 7-10 MEGABITS per second, or even
> > an iperf hang until ctrl+c.
This sounds like a symptom of doing LRO on a bridged device. Normally
we turn off LRO for bridge members automatically, but we haven't been
doing that when the bridge members are VLAN devices.
> > If i attach an ip address to the bridge, and measure between hosts and the
> > bridge, it works flawlessly, rendering 9.8Gbit/s in both directions.
> >
> > While trying to find a solution, when i ran out of options, i've set
> > net.ipv4.ip_forward to 1, and, SURPRISE, the bridge started to work like a
> > charm, at almost 10gig speed.
[...]
Right, that should force LRO off for all devices with IPv4 set up.
This should be fixed by:
commit f11970e383acd6f505f492f1bc07fb1a4d884829
Author: Neil Horman <nhorman@tuxdriver.com>
Date: Tue May 24 08:31:09 2011 +0000
net: make dev_disable_lro use physical device if passed a vlan dev (v2)
which is in 3.0-rc1.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* [PATCH] sch_generic unused variable warning
From: Connor Hansen @ 2011-06-03 23:18 UTC (permalink / raw)
To: hadi; +Cc: davem, netdev, linux-kernel, Connor Hansen
during randconfig testing net/sched/sch_generic produced
net/sched/sch_generic.c: In function dev_watchdog
net/sched/sch_generic.c:254:10: warning: unused variable drivername
drivername is only used in the scope of the WARN_ONCE
Signed-off-by: Connor Hansen <cmdkhh@gmail.com>
---
net/sched/sch_generic.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index b1721d7..7380da2 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -251,9 +251,8 @@ static void dev_watchdog(unsigned long arg)
}
if (some_queue_timedout) {
- char drivername[64];
WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
- dev->name, netdev_drivername(dev, drivername, 64), i);
+ dev->name, netdev_drivername(dev, char drivername[64], 64), i);
dev->netdev_ops->ndo_tx_timeout(dev);
}
if (!mod_timer(&dev->watchdog_timer,
--
1.7.4.4
^ permalink raw reply related
* Re: Are we allowed to add a new column to /proc/net/tcp?
From: David Miller @ 2011-06-03 23:25 UTC (permalink / raw)
To: greearb; +Cc: netdev
In-Reply-To: <4DE9615E.1010309@candelatech.com>
From: Ben Greear <greearb@candelatech.com>
Date: Fri, 03 Jun 2011 15:34:06 -0700
> If there is another way to get at this information for
> arbritrary TCP sockets, I'm interested in that as well.
"ss" can dump everything, even the full contents of tcp_info
^ permalink raw reply
* Re: [PATCH] bonding: reset queue mapping prior to transmission to physical device (v5)
From: Jay Vosburgh @ 2011-06-03 23:31 UTC (permalink / raw)
To: Neil Horman; +Cc: netdev, Andy Gospodarek, David S. Miller
In-Reply-To: <1307133352-4111-1-git-send-email-nhorman@tuxdriver.com>
Neil Horman <nhorman@tuxdriver.com> wrote:
>The bonding driver is multiqueue enabled, in which each queue represents a slave
>to enable optional steering of output frames to given slaves against the default
>output policy. However, it needs to reset the skb->queue_mapping prior to
>queuing to the physical device or the physical slave (if it is multiqueue) could
>wind up transmitting on an unintended tx queue
>
>Change Notes:
>v2) Based on first pass review, updated the patch to restore the origional queue
>mapping that was found in bond_select_queue, rather than simply resetting to
>zero. This preserves the value of queue_mapping when it was set on receive in
>the forwarding case which is desireable.
>
>v3) Fixed spelling an casting error in skb->cb
>
>v4) fixed to store raw queue_mapping to avoid double decrement
>
>v5) Eric D requested that ->cb access be wrapped in a macro.
Shouldn't the change log go below the "---" so it doesn't end up
in the git commit log?
In any event, I looked for ways into bond_dev_queue_xmit without
first passing through bond_select_queue (lest stale cb[] data intrude),
and I don't see any, so I think this is ok.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
-J
>Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>CC: Jay Vosburgh <fubar@us.ibm.com>
>CC: Andy Gospodarek <andy@greyhouse.net>
>CC: "David S. Miller" <davem@davemloft.net>
>---
> drivers/net/bonding/bond_main.c | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 17b4dd9..abf6e19 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -388,6 +388,8 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
> return next;
> }
>
>+#define bond_queue_mapping(skb) (*(u16 *)((skb)->cb))
>+
> /**
> * bond_dev_queue_xmit - Prepare skb for xmit.
> *
>@@ -400,6 +402,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
> {
> skb->dev = slave_dev;
> skb->priority = 1;
>+
>+ skb->queue_mapping = bond_queue_mapping(skb);
>+
> if (unlikely(netpoll_tx_running(slave_dev)))
> bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
> else
>@@ -4206,6 +4211,7 @@ static inline int bond_slave_override(struct bonding *bond,
> return res;
> }
>
>+
> static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
> {
> /*
>@@ -4216,6 +4222,11 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
> */
> u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
>
>+ /*
>+ * Save the original txq to restore before passing to the driver
>+ */
>+ bond_queue_mapping(skb) = skb->queue_mapping;
>+
> if (unlikely(txq >= dev->real_num_tx_queues)) {
> do {
> txq -= dev->real_num_tx_queues;
>--
>1.7.3.4
>
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* Re: pull request: wireless-2.6 2011-06-03
From: David Miller @ 2011-06-03 23:53 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20110603195254.GF2509@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 3 Jun 2011 15:52:54 -0400
> Here is a batch of fixes intended for 3.0 -- I guess I'll need to
> rename my tree eventually... :-)
>
> Included are a libertas fix to ensure proper sequence number assignment
> on transmitted frames, an ath9k fix that propogates an earlier fix to a
> few more places, a fix for a cfg80211 regression caused by some mesh
> code changes, a locking fix for the bluetooth l2cap code, a zd1211rw
> regression fix, a collection of small fixes for wl12xx, an iwl4965
> fix for a bad temperature check, an a device ID-related fix for iwlagn.
>
> Please let me know if there are problems!
Pulled, thanks John.
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2011-06-04 0:08 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
This is the first batch of networking bug fixes after -rc1:
1) TG3 iterates one too many frags when doing DMA unmaps,
fix from Matt Carlson based upon a report by Alex
Williamson.
2) net_dev_xmit tracepoint uses SKB after it may have been
freed up, fix from Koki Sanagi.
3) flexcan and davinci_emac drivers missing clk_put(), fix from Julia
Lawall.
4) RTNL locking race fix in CAIF protocol, from Sjur Brændeland.
5) Validate family of sockaddr in ipv4 bind(), from Marcus Meissner.
6) Packet capture reports VLAN ID but doesn't indicate whether there
was really a VLAN header there. This is important because VLAN ID
0 is legitimate. Add a TP_STATUS_* flag to indicate this state,
from Ben Greear.
7) Fix stats update locking bug in vlan_dev_hard_start_xmit(), from
Wei Yongjun.
8) Add missing ->reset_resume() to cdc_ncm USB net driver. From
Stefan Metzmacher.
9) Fix broken handling of even header lengths in mwifiex driver,
from Yogesh Ashok Powar.
10) Don't panic on RX buffer alloc failure in rtlwifi, from Larry
Finger.
11) Fix oops in sched_scan of wl12xx driver, from Luciano Coelho.
12) Fix zs1211rw with OHCI controllers, from Jussi Kivilinna.
13) Fix under-allocation of SKB buffer space when receiving in PIO
mode of ks8842 driver. From Dennis Aberilla.
14) Pending timer and queue purging fix in SCTP from Wei Yongjun.
15) catc USB driver does GFP_KERNEL alloc with locks held, fix from
Alexey Khoroshilov.
16) Revert an attempt to fix some section mismatches, it causes new
problems.
17) Locking in l2cap_global_chan_by_psm() is busted, using read_unlock_bh()
when should be using plain read_unlock(). Fix from Johannes Berg.
Please pull, thanks a lot!
The following changes since commit 4f1ba49efafccbc73017f824efa2505c81b247cd:
Merge branch 'for-linus' of git://git.kernel.dk/linux-block (2011-06-04 08:11:26 +0900)
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
Adrian Chadd (1):
ath9k: Fix AR9287 calibration
Alexey Khoroshilov (1):
drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
Ben Greear (1):
af-packet: Add flag to distinguish VID 0 from no-vlan.
Chris Metcalf (1):
ip_options_compile: properly handle unaligned pointer
Daniel Drake (1):
libertas: Set command sequence number later to ensure consistency
Daniel Halperin (1):
ath9k: fix two more bugs in tx power
David S. Miller (1):
Revert "net: fix section mismatches"
Dennis Aberilla (1):
drivers/net: ks8842 Fix crash on received packet when in PIO mode.
Eliad Peller (2):
mac80211: clear local->ps_data on disassoc
cfg80211: don't drop p2p probe responses
Jesper Juhl (1):
mac80211: Remove duplicate linux/slab.h include from net/mac80211/scan.c
Johannes Berg (1):
bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
John W. Linville (2):
Merge git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6 into for-davem
Julia Lawall (2):
drivers/net/davinci_emac.c: add missing clk_put
drivers/net/can/flexcan.c: add missing clk_put
Jussi Kivilinna (1):
zd1211rw: fix to work on OHCI
Koki Sanagi (1):
net: tracepoint of net_dev_xmit sees freed skb and causes panic
Larry Finger (2):
rtlwifi: Fix kernel panic resulting from RX buffer allocation failure
rtlwifi: Use order 2 RX buffer allocation only if necessary
Luciano Coelho (5):
nl80211: fix check for valid SSID size in scan operations
wl12xx: fix passive and radar channel generation for scheduled scan
wl12xx: fix DFS channels handling in scheduled scan
wl12xx: add separate config value for DFS dwell time on sched scan
wl12xx: fix oops in sched_scan when forcing a passive scan
Marcus Meissner (1):
net/ipv4: Check for mistakenly passed in non-IPv4 address
Mark Brown (1):
net: dm9000: Get the chip in a known good state before enabling interrupts
Matt Carlson (1):
tg3: Fix tg3_skb_error_unmap()
Rafał Miłecki (1):
b43: N-PHY: initialize last var in calibration function
Rajkumar Manoharan (4):
ath9k: Reset chip on baseband hang
ath9k_hw: disable phy restart on baseband panic caused by RXSM
ath9k: set 40 Mhz rate only if hw is configured in ht40
mac80211: stop queues before rate control updation
Stanislaw Gruszka (2):
iwl4965: fix 5GHz operation
iwl4965: correctly validate temperature value
Stefan Metzmacher (1):
usbnet/cdc_ncm: add missing .reset_resume hook
Tao Ma (1):
wireless: Default to 'n' for 2 new added devices in Kconfig.
Wei Yongjun (2):
sctp: stop pending timers and purge queues when peer restart asoc
vlan: fix typo in vlan_dev_hard_start_xmit()
Wey-Yi Guy (1):
iwlagn: fix incorrect PCI subsystem id for 6150 devices
Yogesh Ashok Powar (1):
mwifiex: correct event header length
sjur.brandeland@stericsson.com (1):
caif: Fix race when conditionally taking rtnl lock
drivers/net/3c509.c | 14 +++---
drivers/net/3c59x.c | 4 +-
drivers/net/can/flexcan.c | 5 +-
drivers/net/davinci_emac.c | 10 +++--
drivers/net/depca.c | 35 ++++++++--------
drivers/net/dm9000.c | 6 +-
drivers/net/hp100.c | 12 +++---
drivers/net/ibmlana.c | 4 +-
drivers/net/irda/smsc-ircc2.c | 44 ++++++++++----------
drivers/net/ks8842.c | 2 +-
drivers/net/ne3210.c | 15 +++----
drivers/net/smc-mca.c | 6 +-
drivers/net/tg3.c | 2 +-
drivers/net/tokenring/madgemc.c | 2 +-
drivers/net/tulip/de4x5.c | 4 +-
drivers/net/usb/catc.c | 2 +-
drivers/net/usb/cdc_ncm.c | 3 +-
drivers/net/wireless/ath/ath9k/Kconfig | 1 -
drivers/net/wireless/ath/ath9k/ar9002_calib.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 10 ++++-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 22 ++++++++++
drivers/net/wireless/ath/ath9k/eeprom_9287.c | 10 ++++-
drivers/net/wireless/ath/ath9k/hw.c | 5 ++-
drivers/net/wireless/ath/ath9k/hw.h | 2 +
drivers/net/wireless/ath/ath9k/main.c | 4 +-
drivers/net/wireless/ath/ath9k/rc.c | 3 +-
drivers/net/wireless/b43/phy_n.c | 2 +-
drivers/net/wireless/iwlegacy/iwl-4965-lib.c | 4 +-
drivers/net/wireless/iwlegacy/iwl-4965.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-6000.c | 28 ++++++++----
drivers/net/wireless/iwlwifi/iwl-agn.c | 6 +-
drivers/net/wireless/iwlwifi/iwl-agn.h | 1 +
drivers/net/wireless/libertas/cmd.c | 6 +-
drivers/net/wireless/mwifiex/sdio.h | 4 +-
drivers/net/wireless/rt2x00/Kconfig | 1 -
drivers/net/wireless/rtlwifi/pci.c | 35 ++++++++++------
drivers/net/wireless/wl12xx/conf.h | 3 +
drivers/net/wireless/wl12xx/main.c | 1 +
drivers/net/wireless/wl12xx/scan.c | 49 +++++++++++++++-------
drivers/net/wireless/wl12xx/scan.h | 3 +
drivers/net/wireless/zd1211rw/zd_usb.c | 53 +++++++++++++++++++-----
include/linux/ieee80211.h | 8 +++-
include/linux/if_packet.h | 1 +
include/net/sctp/command.h | 1 +
include/net/sctp/structs.h | 2 +-
include/trace/events/net.h | 12 +++--
net/8021q/vlan_dev.c | 2 +-
net/bluetooth/l2cap_core.c | 2 +-
net/caif/chnl_net.c | 9 +---
net/core/dev.c | 7 ++-
net/ipv4/af_inet.c | 3 +
net/ipv4/ip_options.c | 15 ++++---
net/mac80211/mlme.c | 7 +++
net/mac80211/scan.c | 1 -
net/packet/af_packet.c | 15 +++++-
net/sctp/associola.c | 23 ++++++----
net/sctp/sm_sideeffect.c | 3 +
net/sctp/sm_statefuns.c | 14 +++++-
net/wireless/nl80211.c | 4 +-
net/wireless/scan.c | 43 +++++++++++--------
60 files changed, 380 insertions(+), 219 deletions(-)
^ permalink raw reply
* Re: [PATCH 2/2] bonding: restore NETIF_F_VLAN_CHALLENGED properly in bond_del_vlan()
From: Jay Vosburgh @ 2011-06-04 0:26 UTC (permalink / raw)
To: Jiri Bohac
Cc: Andy Gospodarek, David S. Miller, netdev, Pedro Garcia,
Patrick McHardy
In-Reply-To: <20110603201424.GB24804@midget.suse.cz>
Jiri Bohac <jbohac@suse.cz> wrote:
>Since commit ad1afb00, bond_del_vlan() never restores
>NETIF_F_VLAN_CHALLENGED as intended. bond->vlan_list is never
>empty once the 8021q module is loaded, because the special VLAN 0
>is always kept registered on the bond interface. Change the
>condition to check if bond->vlan_list contains exactly one item
>instead of checking for an empty list.
>
>Signed-off-by: Jiri Bohac <jbohac@suse.cz>
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 17b4dd9..4d317cd 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -329,9 +329,10 @@ static int bond_del_vlan(struct bonding *bond, unsigned short vlan_id)
>
> kfree(vlan);
>
>- if (list_empty(&bond->vlan_list) &&
>+ if (bond->vlan_list.next->next == &bond->vlan_list &&
> (bond->slave_cnt == 0)) {
>- /* Last VLAN removed and no slaves, so
>+ /* Last VLAN removed (the only member of vlan_list
>+ * is the special vid == 0 vlan) and no slaves, so
> * restore block on adding VLANs. This will
> * be removed once new slaves that are not
> * VLAN challenged will be added.
Could we do this instead in bond_release, when the last slave is
removed? The CHALLENGED flag just prevents adding new VLANs; existing
ones would persist until a new slave was added.
Since CHALLENGED slaves are in the minority these days (looks
like just IPoIB, one wimax and one obscure ethernet chipset) we could
even invert the logic: only assert CHALLENGED for the master when such a
slave is added. We'd have to issue a NETDEV_CHANGEADDR when the master
picks up or releases its MAC address so the VLANs would pick it up, but
that's not a really big deal, and we probably ought to do that anyway.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* [net-next-2.6 PATCH] enic: Add support for MTU change via port profile on a dynamic vnic
From: Roopa Prabhu @ 2011-06-04 0:35 UTC (permalink / raw)
To: davem; +Cc: netdev
From: Roopa Prabhu <roprabhu@cisco.com>
enic driver gets MTU change notifications for MTU changes in the
port profile associated to a dynamic vnic. This patch adds support
in enic driver to set new MTU on the dynamic vnic and dynamically
adjust its buffers with new MTU size in response to such notifications.
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
---
drivers/net/enic/enic.h | 3 +-
drivers/net/enic/enic_main.c | 71 +++++++++++++++++++++++++++++++++++++++---
2 files changed, 68 insertions(+), 6 deletions(-)
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 38b351c..e0d2ad1 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -32,7 +32,7 @@
#define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
-#define DRV_VERSION "2.1.1.13"
+#define DRV_VERSION "2.1.1.16"
#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc"
#define ENIC_BARS_MAX 6
@@ -74,6 +74,7 @@ struct enic {
struct vnic_dev *vdev;
struct timer_list notify_timer;
struct work_struct reset;
+ struct work_struct change_mtu_work;
struct msix_entry msix_entry[ENIC_INTR_MAX];
struct enic_msix_entry msix[ENIC_INTR_MAX];
u32 msg_enable;
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 2f433fb..449e3fa 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -423,11 +423,18 @@ static void enic_mtu_check(struct enic *enic)
if (mtu && mtu != enic->port_mtu) {
enic->port_mtu = mtu;
- if (mtu < netdev->mtu)
- netdev_warn(netdev,
- "interface MTU (%d) set higher "
- "than switch port MTU (%d)\n",
- netdev->mtu, mtu);
+ if (enic_is_dynamic(enic)) {
+ mtu = max_t(int, ENIC_MIN_MTU,
+ min_t(int, ENIC_MAX_MTU, mtu));
+ if (mtu != netdev->mtu)
+ schedule_work(&enic->change_mtu_work);
+ } else {
+ if (mtu < netdev->mtu)
+ netdev_warn(netdev,
+ "interface MTU (%d) set higher "
+ "than switch port MTU (%d)\n",
+ netdev->mtu, mtu);
+ }
}
}
@@ -1688,6 +1695,9 @@ static int enic_change_mtu(struct net_device *netdev, int new_mtu)
if (new_mtu < ENIC_MIN_MTU || new_mtu > ENIC_MAX_MTU)
return -EINVAL;
+ if (enic_is_dynamic(enic))
+ return -EOPNOTSUPP;
+
if (running)
enic_stop(netdev);
@@ -1704,6 +1714,55 @@ static int enic_change_mtu(struct net_device *netdev, int new_mtu)
return 0;
}
+static void enic_change_mtu_work(struct work_struct *work)
+{
+ struct enic *enic = container_of(work, struct enic, change_mtu_work);
+ struct net_device *netdev = enic->netdev;
+ int new_mtu = vnic_dev_mtu(enic->vdev);
+ int err;
+ unsigned int i;
+
+ new_mtu = max_t(int, ENIC_MIN_MTU, min_t(int, ENIC_MAX_MTU, new_mtu));
+
+ rtnl_lock();
+
+ /* Stop RQ */
+ del_timer_sync(&enic->notify_timer);
+
+ for (i = 0; i < enic->rq_count; i++)
+ napi_disable(&enic->napi[i]);
+
+ vnic_intr_mask(&enic->intr[0]);
+ enic_synchronize_irqs(enic);
+ err = vnic_rq_disable(&enic->rq[0]);
+ if (err) {
+ netdev_err(netdev, "Unable to disable RQ.\n");
+ return;
+ }
+ vnic_rq_clean(&enic->rq[0], enic_free_rq_buf);
+ vnic_cq_clean(&enic->cq[0]);
+ vnic_intr_clean(&enic->intr[0]);
+
+ /* Fill RQ with new_mtu-sized buffers */
+ netdev->mtu = new_mtu;
+ vnic_rq_fill(&enic->rq[0], enic_rq_alloc_buf);
+ /* Need at least one buffer on ring to get going */
+ if (vnic_rq_desc_used(&enic->rq[0]) == 0) {
+ netdev_err(netdev, "Unable to alloc receive buffers.\n");
+ return;
+ }
+
+ /* Start RQ */
+ vnic_rq_enable(&enic->rq[0]);
+ napi_enable(&enic->napi[0]);
+ vnic_intr_unmask(&enic->intr[0]);
+ enic_notify_timer_start(enic);
+
+ rtnl_unlock();
+
+ netdev_info(netdev, "interface MTU set as %d\n", netdev->mtu);
+}
+
#ifdef CONFIG_NET_POLL_CONTROLLER
static void enic_poll_controller(struct net_device *netdev)
{
@@ -2345,6 +2404,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
enic->notify_timer.data = (unsigned long)enic;
INIT_WORK(&enic->reset, enic_reset);
+ INIT_WORK(&enic->change_mtu_work, enic_change_mtu_work);
for (i = 0; i < enic->wq_count; i++)
spin_lock_init(&enic->wq_lock[i]);
@@ -2427,6 +2487,7 @@ static void __devexit enic_remove(struct pci_dev *pdev)
struct enic *enic = netdev_priv(netdev);
cancel_work_sync(&enic->reset);
+ cancel_work_sync(&enic->change_mtu_work);
unregister_netdev(netdev);
enic_dev_deinit(enic);
vnic_dev_close(enic->vdev);
^ permalink raw reply related
* [PATCH] net: fix smc91x.c device tree support
From: Grant Likely @ 2011-06-04 7:31 UTC (permalink / raw)
To: netdev, David S. Miller, linux-kernel, Thomas Chou
Fix missing semicolon at end of smc91x.c match tabledevice driver.
Also remove unnecessary #ifdef around of_match_table pointer.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/net/smc91x.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index dc4805f..f628574 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2400,8 +2400,10 @@ static const struct of_device_id smc91x_match[] = {
{ .compatible = "smsc,lan91c94", },
{ .compatible = "smsc,lan91c111", },
{},
-}
+};
MODULE_DEVICE_TABLE(of, smc91x_match);
+#else
+#define smc91x_match NULL
#endif
static struct dev_pm_ops smc_drv_pm_ops = {
@@ -2416,9 +2418,7 @@ static struct platform_driver smc_driver = {
.name = CARDNAME,
.owner = THIS_MODULE,
.pm = &smc_drv_pm_ops,
-#ifdef CONFIG_OF
.of_match_table = smc91x_match,
-#endif
},
};
^ permalink raw reply related
* Re: bridge/netfilter: regression in 2.6.39.1
From: Alexander Holler @ 2011-06-04 12:04 UTC (permalink / raw)
To: Eric Dumazet; +Cc: linux-kernel, David Miller, Herbert Xu, netdev
In-Reply-To: <1307130914.2600.12.camel@edumazet-laptop>
Am 03.06.2011 21:55, schrieb Eric Dumazet:
> Le vendredi 03 juin 2011 à 21:51 +0200, Alexander Holler a écrit :
>> Hello,
>>
>> Am 03.06.2011 21:34, schrieb Eric Dumazet:
>>>>
>>>> Commit 42923465fb8d025a2b5153f2e7ab1e6e1058bf00 does here what it
>>>> should prevent, it introduces NULL a dereference.
>>>>
>>>
>>> I cant find this commit in known trees. Could you give the real commit
>>> id and its title ?
>>
>> Sorry, I haven't seen that question at first. This is the real commit id
>> as found in the stable tree for 2.6.39. The title of that commit is
>> "bridge: initialize fake_rtable metrics"
>
> OK, its commit id is 33eb9873a283a2076f2b5628813d5365ca420ea9
>
> Please always use linux-2.6 tree commits, this saves a lot of time.
Sorry to have wasted your time with posting a full breakdown of the bug
and a possible solution. I didn't know that stable trees are unknown to
kernel developers and I did'nt know that the "upstream commit id" in
comments of commits in the stable tree are referencing to commit ids in
Linus tree.
Anyway, I've used the broken way of not using git send-email because I'm
unsure if the solution I've offered is the best one. I'm lacking the
knowledge about what cow_metrics() does, what it is used for, and what,
if any, pre- or post-requisites are needed to use dst_cow_metrics_generic().
I can only say that my solution seems to work here, the machine comes up
without an oops and I didn't have seen any other problems while using
the bridge (which surely doesn't say anything, e.g. I'm not sure if my
use of dst_cow_metrics_generic() may introduce a mem leak or similiar,
it doesn't look so, but who knows).
Regards,
Alexander
^ permalink raw reply
* Re: pull request: wireless-2.6 2011-06-03
From: John W. Linville @ 2011-06-04 13:04 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: davem, netdev, linux-kernel, linux-wireless
In-Reply-To: <BANLkTimoeVDQK+zu=U+nSM_kj0a3-hh_Jg@mail.gmail.com>
On Fri, Jun 03, 2011 at 11:24:49PM +0200, Rafał Miłecki wrote:
> On Jun 3, 2011 10:03 PM, "John W. Linville" <linville@tuxdriver.com> wrote:
> >
> > Dave,
> >
> > Here is a batch of fixes intended for 3.0 -- I guess I'll need to
> > rename my tree eventually... :-)
> >
> > Included are a libertas fix to ensure proper sequence number assignment
> > on transmitted frames, an ath9k fix that propogates an earlier fix to a
> > few more places, a fix for a cfg80211 regression caused by some mesh
> > code changes, a locking fix for the bluetooth l2cap code, a zd1211rw
> > regression fix, a collection of small fixes for wl12xx, an iwl4965
> > fix for a bad temperature check, an a device ID-related fix for iwlagn.
> >
> > Please let me know if there are problems!
>
> John, you didn't.take my fix for regression in ssb. I really want this for
> 3.0.quickly, as few ppl already had problems with machine locking on boot.
Yours isn't the only fix, and I had quite a few queued already. Patience.
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* iwlagn: Random "Time out reading EEPROM".
From: Nicolas de Pesloüan @ 2011-06-04 13:14 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, wireless
Hi,
From time to time, my Intel Wifi adapter fail on cold boot, with the following in dmesg:
[ 7.442634] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks
[ 7.442636] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 7.442701] iwlagn 0000:05:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 7.442708] iwlagn 0000:05:00.0: setting latency timer to 64
[ 7.442788] iwlagn 0000:05:00.0: Detected Intel Wireless WiFi Link 5100AGN REV=0x54
[ 7.455547] iwlagn 0000:05:00.0: Time out reading EEPROM[0]
[ 7.455611] iwlagn 0000:05:00.0: Unable to init EEPROM
[ 7.455678] iwlagn 0000:05:00.0: PCI INT A disabled
[ 7.455685] iwlagn: probe of 0000:05:00.0 failed with error -110
After "modprobe -r iwlagn ; modprobe iwlagn" or after a reboot, everything work fine:
[ 346.332166] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks
[ 346.332169] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 346.332225] iwlagn 0000:05:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 346.332234] iwlagn 0000:05:00.0: setting latency timer to 64
[ 346.332277] iwlagn 0000:05:00.0: Detected Intel Wireless WiFi Link 5100AGN REV=0x54
[ 346.365739] iwlagn 0000:05:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels
[ 346.365787] alloc irq_desc for 33 on node -1
[ 346.365788] alloc kstat_irqs on node -1
[ 346.365804] iwlagn 0000:05:00.0: irq 33 for MSI/MSI-X
[ 346.449989] phy0: Selected rate control algorithm 'iwl-agn-rs'
This happens using 2.6.32-5 from Debian. I didn't had the opportunity to reproduce it using recent
kernel, but it occurs too rarely to conclude anything.
I had a look at the git log, without finding something that seems related to this problem. Does this
ring a bell for someone?
Nicolas.
05:00.0 Network controller: Intel Corporation WiFi Link 5100
Subsystem: Intel Corporation WiFi Link 5100 AGN
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR-
FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR-
<PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 33
Region 0: Memory at d6d00000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee0300c Data: 41c9
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <128ns, L1 <32us
ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC-
UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC-
UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC-
UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Capabilities: [140 v1] Device Serial Number 00-22-fb-ff-ff-28-46-c8
Kernel driver in use: iwlagn
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] bridge: Forward EAPOL when STP off
From: Stephen Hemminger @ 2011-06-04 13:42 UTC (permalink / raw)
To: Nick Carter; +Cc: netdev, benjamin.poirier, davem, shemminger
In-Reply-To: <BANLkTimdK-5tsWcTFbe_-82fHxr4TN4F_g@mail.gmail.com>
On Thu, 2 Jun 2011 16:59:13 +0100
Nick Carter <ncarter100@gmail.com> wrote:
> Signed-off-by: Nick Carter <ncarter100@gmail.com>
>
> If STP is disabled then forward frames destined to the 802.1X PAE group
> address (01-80-C2-00-00-03)
>
> This change is required to support virtual machines running an 802.1X
> supplicant and bridged to an ethernet interface.
>
> This change has been tested and works fine with a range of supplicants.
No. This is getting messy and starts down the path of the recent
802.3ad change which just got reverted. A better solution is needed
than individual hacky standards breaking. If you really need to do
this, use the "duct tape" of networking ebtables.
See also:
https://lists.linux-foundation.org/pipermail/bridge/2007-November/005638.html
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox