* Re: [RESEND][PATCH] cxgb4: Use kfree_skb for skb pointers
From: David Miller @ 2010-07-03 6:43 UTC (permalink / raw)
To: dm; +Cc: dkirjanov, netdev
In-Reply-To: <8A71B368A89016469F72CD08050AD334081E3D00@maui.asicdesigners.com>
From: "Dimitrios Michailidis" <dm@chelsio.com>
Date: Fri, 2 Jul 2010 22:51:17 -0700
>
>> From: Denis Kirjanov <dkirjanov@hera.kernel.org>
>> Date: Thu, 1 Jul 2010 09:45:52 +0000
>>
>> > Use kfree_skb for skb pointers
>> >
>> > Acked-by: Dimitris Michailidis <dm@chelsio.com>
>> > Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
>>
>> The code is completely different in this part of the driver now, this
>> patch does not apply.
>>
>> In fact there is no reference to the string "kfree" at all in the
>> l2t.c file of the cxgb4 driver :)
>
> This patch is for net-next and it should apply there, I see the wrong
> kfree (there's only one kfree). Denis didn't mention net-next, maybe
> you tried to apply it to net-2.6?
Yes, I did.
That's why people should always indicate what tree a patch is for
in the subject line or similar.
^ permalink raw reply
* Re: [PATCHv2] xfrm: fix xfrm by MARK logic
From: Eric Dumazet @ 2010-07-03 6:38 UTC (permalink / raw)
To: Peter Kosyh; +Cc: netdev
In-Reply-To: <20100702174755.GA12509@myhost>
Le vendredi 02 juillet 2010 à 21:47 +0400, Peter Kosyh a écrit :
> From: Peter Kosyh <p.kosyh@gmail.com>
>
> While using xfrm by MARK feature in
> 2.6.34 - 2.6.35 kernels, the mark
> is always cleared in flowi structure via memset in
> _decode_session4 (net/ipv4/xfrm4_policy.c), so
> the policy lookup fails.
> IPv6 code is affected by this bug too.
>
> Signed-off-by: Peter Kosyh <p.kosyh@gmail.com>
> ---
>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Thanks !
^ permalink raw reply
* Re: Generic rx-recycling and emergency skb pool
From: Eric Dumazet @ 2010-07-03 6:23 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: netdev, tglx
In-Reply-To: <1278098421-21296-1-git-send-email-sebastian@breakpoint.cc>
Le vendredi 02 juillet 2010 à 21:20 +0200, Sebastian Andrzej Siewior a
écrit :
> This is version two of generic rx-recycling followed by version one of
> emergency skb pools which are built on top of rx-recycling.
> The change from v1 of generic rx-recycling is that the list access is
> unlocked instead of locked.
> Patch six which introduces the emergency pools adds the locking back.
> This is required since we now have two not serialized users. In order
> not to punish everyone patch eight removes this locking again. That
> patch converts only two drivers so you have an idea what I think is
> required to get the locking removed.
>
> The idea behind emergency pools is to have pre-allocated skbs for TX and
> RX. Using the memory allocator for it leads to latencies during memory
> pressure. The pre-allocated skb are "tagged" and should get back to the
> pool once they are through the stack so the pool should never get
> exhausted.
>
> While it was easy to convert the drivers which share the same concept of
> rx-recycling to use the emergency pools it was difficult to hook up the
> more complex drivers like e1000e. The e1000e can use split skbs / a frag
> list which is different from the allocation currently used. So instead of
> forcing all drivers to use the same way of doing things I've been thinking
> about providing a dedicated callback for skb allocation and checking if
> this skb is "good enough". This is not yet implemented.
>
> I would be glad to receive some feedback on this patch series before I go
> any further. Unfortunately I'm on vacation for the next two weeks so I
> can't respond earlier. tglx is on Cc and should be able respond earlier :)
>
> Sebastian
Sebastian
I read all patches, and my initial feeling is all this is very complex
and have many shortcomings.
Most modern NICS are multiqueue, so that each cpu can use a queue on its
own without slowing down other cpus.
Yet rx recycling has one queue per device, defeating part of the
multiqueue goal.
Patch 6/8 even touches dev->refcnt on each emerg packet
Patch 6/8 adds 8 bytes (emerg_dev) to skb. Oh well...
Adding cache layers, especially dumb ones like this one, is probably the
sign something more fundamental is broken somewhere.
I do believe for example that netdev_alloc_skb() should not try to use
the node affinity of the device, but use current cpu node for sk_buff at
least, and possibly for data part too.
One other problem of skb are the two memory blocs involved, and fact
that first one (skb) is already very big and fat, and filled/dirtied
many cycles before its use in RX path.
Maybe its time to provide new API, so that a driver can build an skb at
the time RX interrupt is handled, not at the time the rx ring buffer is
renewed. RX ring should only provide the data part to NIC, and skb
should be built when NIC delivers the frame, so that we provide to IP
stack a real hot skb.
^ permalink raw reply
* RE: [RESEND][PATCH] cxgb4: Use kfree_skb for skb pointers
From: Dimitrios Michailidis @ 2010-07-03 5:51 UTC (permalink / raw)
To: David Miller, dkirjanov; +Cc: netdev
In-Reply-To: <20100702.222851.59693056.davem@davemloft.net>
> From: Denis Kirjanov <dkirjanov@hera.kernel.org>
> Date: Thu, 1 Jul 2010 09:45:52 +0000
>
> > Use kfree_skb for skb pointers
> >
> > Acked-by: Dimitris Michailidis <dm@chelsio.com>
> > Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
>
> The code is completely different in this part of the driver now, this
> patch does not apply.
>
> In fact there is no reference to the string "kfree" at all in the
> l2t.c file of the cxgb4 driver :)
This patch is for net-next and it should apply there, I see the wrong
kfree (there's only one kfree). Denis didn't mention net-next, maybe
you tried to apply it to net-2.6?
^ permalink raw reply
* Re: [PATCH 0/9] netfilter: netfilter update
From: David Miller @ 2010-07-03 5:44 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <20100702.220408.112596216.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Fri, 02 Jul 2010 22:04:08 -0700 (PDT)
> From: kaber@trash.net
> Date: Fri, 2 Jul 2010 11:52:13 +0200
>
>> Please apply or pull from:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git master
>
> Looks good, pulled, thanks Patrick.
The br_netfilter changes don't build against net-next-2.6:
net/bridge/br_netfilter.c: In function 'br_nf_pre_routing':
net/bridge/br_netfilter.c:558:6: error: 'const struct net_device' has no member named 'br_port'
net/bridge/br_netfilter.c:558:6: warning: type defaults to 'int' in declaration of '_________p1'
net/bridge/br_netfilter.c:558:6: error: 'const struct net_device' has no member named 'br_port'
net/bridge/br_netfilter.c:558:6: error: 'const struct net_device' has no member named 'br_port'
net/bridge/br_netfilter.c:558:2: warning: type defaults to 'int' in type name
net/bridge/br_netfilter.c:558:4: warning: assignment makes pointer from integer without a cast
net/bridge/br_netfilter.c: In function 'br_nf_forward_arp':
net/bridge/br_netfilter.c:730:6: error: 'const struct net_device' has no member named 'br_port'
net/bridge/br_netfilter.c:730:6: warning: type defaults to 'int' in declaration of '_________p1'
The br_port accessors got changed in net-next-2.6, so you have to do it using
br_port_get_rcu(netdev) et al.
I'll fix this up in the merge commit when I pull.
^ permalink raw reply
* Re: [PATCH 0/4] Introduce and use printk pointer extension %pV
From: David Miller @ 2010-07-03 5:32 UTC (permalink / raw)
To: joe; +Cc: akpm, linux-kernel, netdev, greg
In-Reply-To: <20100630.130709.93452021.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Wed, 30 Jun 2010 13:07:09 -0700 (PDT)
> From: Joe Perches <joe@perches.com>
> Date: Sun, 27 Jun 2010 04:02:32 -0700
>
>> Recursive printk can reduce the total image size of an x86 defconfig about 1%
>> by reducing duplicated KERN_<level> strings and centralizing the functions
>> used by macros in new separate functions.
>>
>> Joe Perches (4):
>> vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
>> device.h drivers/base/core.c Convert dev_<level> logging macros to functions
>> netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
>> netdevice.h: Change netif_<level> macros to call netdev_<level> functions
>
> I'm fine with this, thanks Joe.
>
> Greg, could you ACK this and let me know if it's OK if it swings
> through my net-next-2.6 tree?
Greg, ping?
^ permalink raw reply
* Re: [PATCH] s2io: resolve statistics issues
From: David Miller @ 2010-07-03 5:30 UTC (permalink / raw)
To: jon.mason
Cc: netdev, Ramkrishna.Vepa, Sivakumar.Subramani, Sreenivasa.Honnur,
mschmidt
In-Reply-To: <20100702191349.GD22020@exar.com>
From: Jon Mason <jon.mason@exar.com>
Date: Fri, 2 Jul 2010 14:13:49 -0500
> This patch resolves a number of issues in the statistics gathering of
> the s2io driver.
>
> On Xframe adapters, the received multicast statistics counter includes
> pause frames which are not indicated to the driver. This can cause
> issues where the multicast packet count is higher than what has actually
> been received, possibly higher than the number of packets received.
>
> The driver software counters are replaced with the adapter hardware
> statistics for rx_packets, rx_bytes, and tx_bytes. It also uses the
> overflow registers to determine if the statistics wrapped the 32bit
> register (removing the window of having a statistic value less than the
> previous call). rx_length_errors statistic now includes undersized
> packets in addition to oversized packets in its counting. Finally,
> rx_crc_errors are now being counted.
>
> Signed-off-by: Jon Mason <jon.mason@exar.com>
Looks good, applied.
^ permalink raw reply
* Re: [PATCH 2/2] virtio_net: fix oom handling on tx
From: David Miller @ 2010-07-03 5:29 UTC (permalink / raw)
To: rusty; +Cc: netdev, mst, herbert
In-Reply-To: <201007031234.01937.rusty@rustcorp.com.au>
From: Rusty Russell <rusty@rustcorp.com.au>
Date: Sat, 3 Jul 2010 12:34:01 +1000
> virtio net will never try to overflow the TX ring, so the only reason
> add_buf may fail is out of memory. Thus, we can not stop the
> device until some request completes - there's no guarantee anything
> at all is outstanding.
>
> Make the error message clearer as well: error here does not
> indicate queue full.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (...and avoid TX_BUSY)
> Cc: stable@kernel.org # .34.x (s/virtqueue_/vi->svq->vq_ops->/)
Applied.
^ permalink raw reply
* Re: [GIT PULL net-2.6] vhost-net: more error handling fixes
From: David Miller @ 2010-07-03 5:29 UTC (permalink / raw)
To: mst; +Cc: kvm, virtualization, netdev, linux-kernel, krkumar2
In-Reply-To: <20100701164127.GA3199@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Thu, 1 Jul 2010 19:41:27 +0300
> David,
> The following tree includes more fixes dealing with
> error handling in vhost-net. It is on top of net-2.6.
> Please merge it for 2.6.35.
> Thanks!
>
> The following changes since commit 38000a94a902e94ca8b5498f7871c6316de8957a:
>
> sky2: enable rx/tx in sky2_phy_reinit() (2010-06-23 14:37:04 -0700)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-net
>
> Michael S. Tsirkin (2):
> vhost: break out of polling loop on error
> vhost: add unlikely annotations to error path
Pulled.
^ permalink raw reply
* Re: [PATCH 1/2] virtio_net: do not reschedule rx refill forever
From: David Miller @ 2010-07-03 5:29 UTC (permalink / raw)
To: rusty; +Cc: netdev, mst
In-Reply-To: <201007031232.56510.rusty@rustcorp.com.au>
From: Rusty Russell <rusty@rustcorp.com.au>
Date: Sat, 3 Jul 2010 12:32:55 +1000
> From: "Michael S. Tsirkin" <mst@redhat.com>
>
> We currently fill all of RX ring, then add_buf
> returns ENOSPC, which gets mis-detected as an out of
> memory condition and causes us to reschedule the work,
> and so on forever. Fix this by oom = err == -ENOMEM;
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> Cc: stable@kernel.org # .34.x
Applied.
^ permalink raw reply
* Re: [RESEND][PATCH] cxgb4: Use kfree_skb for skb pointers
From: David Miller @ 2010-07-03 5:28 UTC (permalink / raw)
To: dkirjanov; +Cc: netdev
In-Reply-To: <20100701094552.GA6188@hera.kernel.org>
From: Denis Kirjanov <dkirjanov@hera.kernel.org>
Date: Thu, 1 Jul 2010 09:45:52 +0000
> Use kfree_skb for skb pointers
>
> Acked-by: Dimitris Michailidis <dm@chelsio.com>
> Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
The code is completely different in this part of the driver now, this
patch does not apply.
In fact there is no reference to the string "kfree" at all in the
l2t.c file of the cxgb4 driver :)
^ permalink raw reply
* Re: [PATCH net-next-2.6 1/3] ethtool: Change ethtool_op_set_flags to validate flags
From: David Miller @ 2010-07-03 5:07 UTC (permalink / raw)
To: randy.dunlap
Cc: bhutchings, netdev, linux-net-drivers, sgruszka, amit.salecha,
amwang, anirban.chakraborty, dm, scofeldm, vkolluri, roprabhu,
e1000-devel, buytenh, gallatin, brice, shemminger, jgarzik
In-Reply-To: <20100702095514.7fb324c8.randy.dunlap@oracle.com>
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Fri, 2 Jul 2010 09:55:14 -0700
> On Wed, 30 Jun 2010 13:44:32 +0100 Ben Hutchings wrote:
>> @@ -457,7 +457,7 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data);
>> u32 ethtool_op_get_ufo(struct net_device *dev);
>> int ethtool_op_set_ufo(struct net_device *dev, u32 data);
>> u32 ethtool_op_get_flags(struct net_device *dev);
>> -int ethtool_op_set_flags(struct net_device *dev, u32 data);
>> +int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
>
> That one-line change is missing from linux-next-20100702, causing:
>
> drivers/infiniband/ulp/ipoib/ipoib_ethtool.c:157: warning: initialization from incompatible pointer type
Strange, it's in net-next-2.6 for sure:
davem@sunset:~/src/GIT/net-next-2.6$ egrep ethtool_op_set_flags include/linux/ethtool.h
int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
^ permalink raw reply
* Re: [PATCH 0/1] netfilter: netfilter fix
From: David Miller @ 2010-07-03 5:05 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <1278070805-26278-1-git-send-email-kaber@trash.net>
From: kaber@trash.net
Date: Fri, 2 Jul 2010 13:40:04 +0200
> the following patch for 2.6.35 fixes a dst leak in ip6t_REJECT when
> dst->error is set, from Eric Dumazet.
>
> Please apply or pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git master
Also pulled, thanks Patrick.
^ permalink raw reply
* Re: [PATCH 0/9] netfilter: netfilter update
From: David Miller @ 2010-07-03 5:04 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <1278064342-19059-1-git-send-email-kaber@trash.net>
From: kaber@trash.net
Date: Fri, 2 Jul 2010 11:52:13 +0200
> Please apply or pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git master
Looks good, pulled, thanks Patrick.
^ permalink raw reply
* Re: [net-2.6 PATCH 2/2] net: decreasing real_num_tx_queues needs to flush qdisc
From: David Miller @ 2010-07-03 4:59 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, john.r.fastabend
In-Reply-To: <20100701232156.15685.69551.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 01 Jul 2010 16:21:57 -0700
> From: John Fastabend <john.r.fastabend@intel.com>
>
> Reducing real_num_queues needs to flush the qdisc otherwise
> skbs with queue_mappings greater then real_num_tx_queues can
> be sent to the underlying driver.
>
> The flow for this is,
>
> dev_queue_xmit()
> dev_pick_tx()
> skb_tx_hash() => hash using real_num_tx_queues
> skb_set_queue_mapping()
> ...
> qdisc_enqueue_root() => enqueue skb on txq from hash
> ...
> dev->real_num_tx_queues -= n
> ...
> sch_direct_xmit()
> dev_hard_start_xmit()
> ndo_start_xmit(skb,dev) => skb queue set with old hash
>
> skbs are enqueued on the qdisc with skb->queue_mapping set
> 0 < queue_mappings < real_num_tx_queues. When the driver
> decreases real_num_tx_queues skb's may be dequeued from the
> qdisc with a queue_mapping greater then real_num_tx_queues.
>
> This fixes a case in ixgbe where this was occurring with DCB
> and FCoE. Because the driver is using queue_mapping to map
> skbs to tx descriptor rings we can potentially map skbs to
> rings that no longer exist.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Tested-by: Ross Brattain <ross.b.brattain@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-2.6 PATCH 1/2] sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
From: David Miller @ 2010-07-03 4:59 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, john.r.fastabend
In-Reply-To: <20100701232103.15685.48453.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 01 Jul 2010 16:21:35 -0700
> From: John Fastabend <john.r.fastabend@intel.com>
>
> When calling qdisc_reset() the qdisc lock needs to be held. In
> this case there is at least one driver i4l which is using this
> without holding the lock. Add the locking here.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [PATCH] linux/net.h: fix kernel-doc warnings
From: David Miller @ 2010-07-03 4:59 UTC (permalink / raw)
To: randy.dunlap; +Cc: netdev
In-Reply-To: <20100701161858.a24a5803.randy.dunlap@oracle.com>
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Thu, 1 Jul 2010 16:18:58 -0700
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Fix kernel-doc warnings in linux/net.h:
>
> Warning(include/linux/net.h:151): No description found for parameter 'wq'
> Warning(include/linux/net.h:151): Excess struct/union/enum/typedef member 'fasync_list' description in 'socket'
> Warning(include/linux/net.h:151): Excess struct/union/enum/typedef member 'wait' description in 'socket'
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] qlge: fix a eeh handler to not add a pending timer
From: David Miller @ 2010-07-03 4:59 UTC (permalink / raw)
To: leitao; +Cc: netdev, ron.mercer
In-Reply-To: <3d4d609f65c74c269e056c5fbe2fe4b174023059.1277936929.git.root@sanx1002.austin.ibm.com>
From: leitao@linux.vnet.ibm.com
Date: Thu, 1 Jul 2010 10:00:18 -0300
> On some ocasions the function qlge_io_resume() tries to add a
> pending timer, which causes the system to hit the BUG() on
> add_timer() function.
>
> This patch removes the timer during the EEH recovery.
>
> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/2] qlge: Replacing add_timer() to mod_timer()
From: David Miller @ 2010-07-03 4:59 UTC (permalink / raw)
To: leitao; +Cc: netdev, ron.mercer
In-Reply-To: <e687077281d05d3a2da49431b7c0ff0b1076f3e6.1277936929.git.root@sanx1002.austin.ibm.com>
From: leitao@linux.vnet.ibm.com
Date: Thu, 1 Jul 2010 10:00:17 -0300
> Currently qlge driver calls add_timer() instead of mod_timer().
> This patch changes add_timer() to mod_timer(), which seems a better
> solution.
>
> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6 2/2] usbnet: Set parent device early for netdev_printk()
From: David Miller @ 2010-07-03 4:49 UTC (permalink / raw)
To: ben; +Cc: netdev, pitxyoki, joe
In-Reply-To: <1278111386.4878.77.camel@localhost>
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 02 Jul 2010 23:56:26 +0100
> On Fri, 2010-07-02 at 23:40 +0100, Ben Hutchings wrote:
>> netdev_printk() follows the net_device's parent device pointer, so
>> we must set that earlier than we previously did.
>>
>> Reported-by: Luís Picciochi Oliveira <pitxyoki@gmail.com>
>> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> [...]
>
> This should also go into a stable update for 2.6.34.
Ok, queued up.
^ permalink raw reply
* Re: [PATCH net-2.6 2/2] usbnet: Set parent device early for netdev_printk()
From: David Miller @ 2010-07-03 4:49 UTC (permalink / raw)
To: ben; +Cc: netdev, pitxyoki, joe
In-Reply-To: <1278110450.4878.75.camel@localhost>
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 02 Jul 2010 23:40:50 +0100
> netdev_printk() follows the net_device's parent device pointer, so
> we must set that earlier than we previously did.
>
> Reported-by: Luís Picciochi Oliveira <pitxyoki@gmail.com>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-2.6 1/2] Revert "rndis_host: Poll status channel before control channel"
From: David Miller @ 2010-07-03 4:48 UTC (permalink / raw)
To: ben; +Cc: netdev, pitxyoki
In-Reply-To: <1278110361.4878.73.camel@localhost>
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 02 Jul 2010 23:39:21 +0100
> This reverts commit c17b274dc2aa538b68c1f02b01a3c4e124b435ba.
>
> That change was reported to break rndis_wlan support for the WUSB54GS.
>
> Reported-by: Luís Picciochi Oliveira <pitxyoki@gmail.com>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
So I wasn't completely crazy when I wanted more testing feedback
for this change :-)
Applied, thanks Ben.
^ permalink raw reply
* [PATCH 2/2] virtio_net: fix oom handling on tx
From: Rusty Russell @ 2010-07-03 2:34 UTC (permalink / raw)
To: netdev; +Cc: Michael S. Tsirkin, Herbert Xu
In-Reply-To: <201007031232.56510.rusty@rustcorp.com.au>
virtio net will never try to overflow the TX ring, so the only reason
add_buf may fail is out of memory. Thus, we can not stop the
device until some request completes - there's no guarantee anything
at all is outstanding.
Make the error message clearer as well: error here does not
indicate queue full.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (...and avoid TX_BUSY)
Cc: stable@kernel.org # .34.x (s/virtqueue_/vi->svq->vq_ops->/)
---
drivers/net/virtio_net.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -562,7 +562,6 @@ static netdev_tx_t start_xmit(struct sk_
struct virtnet_info *vi = netdev_priv(dev);
int capacity;
-again:
/* Free up any pending old buffers before queueing new ones. */
free_old_xmit_skbs(vi);
@@ -571,14 +570,20 @@ again:
/* This can happen with OOM and indirect buffers. */
if (unlikely(capacity < 0)) {
- netif_stop_queue(dev);
- dev_warn(&dev->dev, "Unexpected full queue\n");
- if (unlikely(!virtqueue_enable_cb(vi->svq))) {
- virtqueue_disable_cb(vi->svq);
- netif_start_queue(dev);
- goto again;
+ if (net_ratelimit()) {
+ if (likely(capacity == -ENOMEM)) {
+ dev_warn(&dev->dev,
+ "TX queue failure: out of memory\n");
+ } else {
+ dev->stats.tx_fifo_errors++;
+ dev_warn(&dev->dev,
+ "Unexpected TX queue failure: %d\n",
+ capacity);
+ }
}
- return NETDEV_TX_BUSY;
+ dev->stats.tx_dropped++;
+ kfree_skb(skb);
+ return NETDEV_TX_OK;
}
virtqueue_kick(vi->svq);
^ permalink raw reply
* [PATCH 1/2] virtio_net: do not reschedule rx refill forever
From: Rusty Russell @ 2010-07-03 2:32 UTC (permalink / raw)
To: netdev; +Cc: Michael S. Tsirkin
From: "Michael S. Tsirkin" <mst@redhat.com>
We currently fill all of RX ring, then add_buf
returns ENOSPC, which gets mis-detected as an out of
memory condition and causes us to reschedule the work,
and so on forever. Fix this by oom = err == -ENOMEM;
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org # .34.x
---
drivers/net/virtio_net.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 06c30df..85615a3 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -416,7 +416,7 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi, gfp_t gfp)
static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp)
{
int err;
- bool oom = false;
+ bool oom;
do {
if (vi->mergeable_rx_bufs)
@@ -426,10 +426,9 @@ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp)
else
err = add_recvbuf_small(vi, gfp);
- if (err < 0) {
- oom = true;
+ oom = err == -ENOMEM;
+ if (err < 0)
break;
- }
++vi->num;
} while (err > 0);
if (unlikely(vi->num > vi->max))
^ permalink raw reply related
* Re: [stable] [stable-2.6.32 PATCH] ixgbe: backport bug fix for tx panic
From: Greg KH @ 2010-07-03 2:28 UTC (permalink / raw)
To: Jeff Kirsher
Cc: Brandeburg, Jesse, linux-kernel@vger.kernel.org,
stable@kernel.org, Brandon, netdev@vger.kernel.org,
davem@davemloft.net
In-Reply-To: <AANLkTimr7-8TIjuCjIbqrJSVH4VI-Pjp8plpjTubuTfE@mail.gmail.com>
On Fri, Jul 02, 2010 at 02:37:13PM -0700, Jeff Kirsher wrote:
> On Tue, May 25, 2010 at 13:18, Greg KH <greg@kroah.com> wrote:
> > On Tue, May 25, 2010 at 09:27:25AM -0700, Brandeburg, Jesse wrote:
> >>
> >>
> >> On Tue, 25 May 2010, Jeff Kirsher wrote:
> >>
> >> > On Mon, May 10, 2010 at 17:46, Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote:
> >> > > From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> >> > >
> >> > > backporting this commit:
> >> > >
> >> > > commit fdd3d631cddad20ad9d3e1eb7dbf26825a8a121f
> >> > > Author: Krishna Kumar <krkumar2@in.ibm.com>
> >> > > Date: Wed Feb 3 13:13:10 2010 +0000
> >> > >
> >> > > ixgbe: Fix return of invalid txq
> >> > >
> >> > > a developer had complained of getting lots of warnings:
> >> > >
> >> > > "eth16 selects TX queue 98, but real number of TX queues is 64"
> >> > >
> >> > > http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html
> >> > >
> >> > > As there was no follow up on that bug, I am submitting this
> >> > > patch assuming that the other return points will not return
> >> > > invalid txq's, and also that this fixes the bug (not tested).
> >> > >
> >> > > Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
> >> > > Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> >> > > Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> >> > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> >> > > Signed-off-by: David S. Miller <davem@davemloft.net>
> >> > >
> >> > > CC: Brandon <brandon@ifup.org>
> >> > > Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> >> > > ---
> >> > >
> >> > > drivers/net/ixgbe/ixgbe_main.c | 8 ++++++--
> >> > > 1 files changed, 6 insertions(+), 2 deletions(-)
> >> > >
> >> >
> >> > Greg - status? Did you queue this patch for the stable release and I missed it?
> >>
> >> Maybe we didn't say (and we should have) that this fixes a panic on
> >> machines with > 64 cores. Please apply to -stable 32.
> >
> > I'll get to it for the next release after this one, if that's ok.
> >
> > thanks,
> >
> > greg k-h
> > --
>
> I did not see this patch in the list of patches for the next release
> of the stable kernel. Just want to make sure this patch makes it this
> time... :)
Ick, I missed it, let me go queue it up right now, sorry about that.
greg k-h
^ 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