* Re: [PATCH 2/2] tcp: cleanup tcp_try_coalesce
From: David Miller @ 2012-05-03 5:25 UTC (permalink / raw)
To: eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w
Cc: alexander.duyck-Re5JQEeQqe8AvxtiuMwx3w,
alexander.h.duyck-ral2JQCrhuEAvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA, edumazet-hpIqsD4AKlfQT0dZR+AlfA,
jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w,
linville-2XuSBdqkA4R54TAoqtyWWQ,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1336022373.12425.24.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Thu, 03 May 2012 07:19:33 +0200
> My last patch against iwlwifi is still waiting to make its way into
> official tree.
>
> http://www.spinics.net/lists/netdev/msg192629.html
John, please rectify this situation.
The Intel Wireless folks said they would test it, but that was more
than a month ago.
It's not acceptable to let bug fixes rot for that long, I don't care
what their special internal testing procedure is.
If they give you further pushback, please just ignore them and apply
Eric's fix directly.
Thank you.
--
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
* IPv6 bonding in VM doesn't work (was Re: bonding and IPv6 "doesn't work"?)
From: Amos Kong @ 2012-05-03 5:33 UTC (permalink / raw)
To: Chris Friesen
Cc: netdev, bridge, qemu-devel, Tomasz Chmielewski, shemminger,
David Lamparter
[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]
On Wed, Jul 13, 2011 at 1:15 AM, Chris Friesen <chris.friesen@genband.com>wrote:
> On 07/12/2011 10:25 AM, Tomasz Chmielewski wrote:
>
>> On 12.07.2011 18:14, David Lamparter wrote:
>>
>
> Your bonding peer is probably looping those
>>> packets back on the other link, most likely because...
>>>
>>> Bonding Mode: load balancing (round-robin)
>>>>
>>>
>>> ... most likely because you maybe have a switch on the other side, and
>>> that switch expects you to do 802.3ad?
>>>
>>
>> It's a virtual machine, so the host shouldn't know or care much about
>> 802.3ad (I think!).
>>
>
Bonding mode 1 and 5 work when slave nics(guest) connect with same virtual
bridge in host.
other modes don't work.
>
> I suspect that connecting multiple links of a bond to the same unmanaged
> switch (or virtual bridge) is going to confuse things.
>
> Try using multiple virtual bridges instead, one for each slave in the
> bond. That way they won't interfere with each other.
>
>> Continue original thread: http://marc.info/?t=131048686200002&r=1&w=2
http://en.wikipedia.org/wiki/IEEE_802.1AX
""" With modes balance-rr, balance-xor, broadcast and 802.3ad all physical
ports in the link aggregation group _must reside on the same_ logical
switch, which in most scenarios will leave a single point of failure when
the physical switch to which both links are connected goes offline. Modes
active-backup, balance-tlb, and balance-alb can also be set up with two or
more switches."""
We could not resolve this issue by connect links to different virtual
bridges?
But it doesn't make sense to connect slave nics with same physical path,
NO stable /performance benefit.
What will happen if we connect two physical NIC directly (back-to-back)?
duplicated address detected?
BTW, openvswitch already support 802.3ad, it might resolve this issue.
Thanks, Amos
[-- Attachment #2: Type: text/html, Size: 3384 bytes --]
^ permalink raw reply
* Re: [v2 PATCH] net: Stop decapitating clones that have a head_frag
From: David Miller @ 2012-05-03 5:39 UTC (permalink / raw)
To: eric.dumazet; +Cc: alexander.h.duyck, netdev, edumazet, jeffrey.t.kirsher
In-Reply-To: <1336019638.12425.16.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 03 May 2012 06:33:58 +0200
> On Wed, 2012-05-02 at 21:18 -0700, Alexander Duyck wrote:
>> This change is meant ot prevent stealing the skb->head to use as a page in
>> the event that the skb->head was cloned. This allows the other clones to
>> track each other via shinfo->dataref.
>>
>> Without this we break down to two methods for tracking the reference count,
>> one being dataref, the other being the page count. As a result it becomes
>> difficult to track how many references there are to skb->head.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
...
> Acked-by: Eric Dumazet <edumazet@google.com>
Applied, thanks.
These tests of the form:
head_frag || cloned
and
head_frag && cloned
will probably crop up in other places. Therefore we should probably
add a "skb_head_is_locked()" helper function to skbuff.h
Well, there are already two instances, which is candidate enough. :-)
^ permalink raw reply
* Re: [PATCH 2/2] tcp: cleanup tcp_try_coalesce
From: Alexander Duyck @ 2012-05-03 5:41 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Alexander Duyck, netdev, davem, Eric Dumazet, Jeff Kirsher
In-Reply-To: <1336022373.12425.24.camel@edumazet-glaptop>
On 5/2/2012 10:19 PM, Eric Dumazet wrote:
> On Wed, 2012-05-02 at 21:58 -0700, Alexander Duyck wrote:
>> The question I have is how can you get into a case where the ksize is
>> different from the end offset plus the aligned size of skb_shared_info?
>> From what I can tell it looks like the only place we can lie is if we
>> use build_skb with the frag_size option, and in that case we are using a
>> page, not kmalloc memory. Otherwise in all other cases __alloc_skb or
>> build_skb is using ksize(skb->head) - SKB_DATA_ALIGN(struct
>> skb_shared_info) to set the end pointer, so reversing that should give
>> us the same value as ksize(skb->head).
>
> Right after skb is allocated (build_skb() or other skb_alloc...
> variants), truesize is correct by construction.
>
> Then drivers add fragments and can make truesize smaller than reality.
>
> And Intel drivers are known to abuse truesize.
>
> My last patch against iwlwifi is still waiting to make its way into
> official tree.
>
> http://www.spinics.net/lists/netdev/msg192629.html
I think the part that has me confused is how being more precise about
removing from truesize gets in the way of detecting abuses of truesize.
It seems like it should be more as good as or better then the original
approach of just using skb->len.
Then again we might just be talking in circles again. I have things
broken out into 3 patches now that are much more readable. I will email
them out in an hour or so once I do some quick tests to verify they are
building and don't break anything.
Thanks,
Alex
^ permalink raw reply
* Re: [PATCH v3] tilegx network driver: initial support
From: David Miller @ 2012-05-03 5:41 UTC (permalink / raw)
To: cmetcalf; +Cc: arnd, linux-kernel, netdev
In-Reply-To: <201205011759.q41HxR21020043@farm-0012.internal.tilera.com>
From: Chris Metcalf <cmetcalf@tilera.com>
Date: Mon, 17 Sep 2001 00:00:00 -0400
> +/* #define USE_SIM_PRINTF */
> +
> +#ifdef USE_SIM_PRINTF
> +
> +static __attribute__((unused, format (printf, 1, 2))) void
> +sim_printf(const char *format, ...)
...
> +/* HACK: Allow use of "sim_printf()" instead of "printk()". */
> +#define printk sim_printf
> +
> +#endif
This doesn't belong in a driver.
You want a debugging console driver that uses that special SIM output
facility instead.
Therefore, please remove this sim_printf stuff completely.
^ permalink raw reply
* Re: [PATCH] sungem: Fix WakeOnLan
From: David Miller @ 2012-05-03 5:43 UTC (permalink / raw)
To: gerard.lledo; +Cc: netdev
In-Reply-To: <1335639157-6336-1-git-send-email-gerard.lledo@gmail.com>
From: Gerard Lledo <gerard.lledo@gmail.com>
Date: Sat, 28 Apr 2012 21:52:37 +0300
> From: Gerard Lledo <gerard.lledo@gmail.com>
>
> WakeOnLan was broken in this driver because gp->asleep_wol is a 1-bit
> bitfield and it was being assigned WAKE_MAGIC, which is (1 << 5).
> gp->asleep_wol remains 0 and the machine never wakes up. Fixed by casting
> gp->wake_on_lan to bool. Tested on an iBook G4.
>
> Signed-off-by: Gerard Lledo <gerard.lledo@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [net-next PATCH v4 0/8] Managing the forwarding database(FDB)
From: Michael S. Tsirkin @ 2012-05-03 5:48 UTC (permalink / raw)
To: John Fastabend
Cc: shemminger, bhutchings, sri, hadi, jeffrey.t.kirsher, netdev,
gregory.v.rose, krkumar2, roprabhu
In-Reply-To: <4FA1ACA1.2080808@intel.com>
On Wed, May 02, 2012 at 02:52:33PM -0700, John Fastabend wrote:
> On 5/2/2012 8:08 AM, Michael S. Tsirkin wrote:
> > On Sun, Apr 15, 2012 at 01:06:37PM -0400, David Miller wrote:
> >> From: John Fastabend <john.r.fastabend@intel.com>
> >> Date: Sun, 15 Apr 2012 09:43:51 -0700
> >>
> >>> The following series is a submission for net-next to allow
> >>> embedded switches and other stacked devices other then the
> >>> Linux bridge to manage a forwarding database.
> >>>
> >>> Previously discussed here,
> >>>
> >>> http://lists.openwall.net/netdev/2012/03/19/26
> >>>
> >>> v4: propagate return codes correctly for ndo_dflt_Fdb_dump()
> >>>
> >>> v3: resolve the macvlan patch 8/8 to fix a dev_set_promiscuity()
> >>> error and add the flags field to change and get link routines.
> >>>
> >>> v2: addressed feedback from Ben Hutchings resolving a typo in the
> >>> multicast add/del routines and improving the error handling
> >>> when both NTF_SELF and NTF_MASTER are set.
> >>>
> >>> I've tested this with 'br' tool published by Stephen Hemminger
> >>> soon to be renamed 'bridge' I believe and various traffic
> >>> generators mostly pktgen, ping, and netperf.
> >>
> >> All applied, if we need any more tweaks we can just add them
> >> on top of this work.
> >>
> >> Thanks John.
> >
> > John, do you plan to update kvm userspace to use this interface?
> >
>
> No immediate plans. I would really appreciate it if you or one
> of the IBM developers working in this space took it on. Of course
> if no one steps up I guess I can eventually get at it but it will
> be sometime. For now I've been doing this manually with the bridge
> tool yet to be published.
>
> .John
It'll be easier once you publish the tool, qemu can just run
scripts like it does for ifup/ifdown now.
--
MST
^ permalink raw reply
* Re: [PATCH 2/2] tcp: cleanup tcp_try_coalesce
From: David Miller @ 2012-05-03 5:50 UTC (permalink / raw)
To: alexander.duyck
Cc: eric.dumazet, alexander.h.duyck, netdev, edumazet,
jeffrey.t.kirsher
In-Reply-To: <4FA21A90.3010008@gmail.com>
From: Alexander Duyck <alexander.duyck@gmail.com>
Date: Wed, 02 May 2012 22:41:36 -0700
> I think the part that has me confused is how being more precise about
> removing from truesize gets in the way of detecting abuses of
> truesize. It seems like it should be more as good as or better then
> the original approach of just using skb->len.
You can only trim from truesize if you can be absolutely certain that
you have removed any reference in the fraglist, or the page'd head, to
the entire "block" of data.
If the skb still refers to even just one byte in a particular block,
we must still charge the entire block in the truesize.
For example, NIU has three pools of power-of-2 blocks of data it
maintainers and the device pulls from to build incoming packets.
So if the chip used one of the 2048 byte buffers, we charge the entire
2048 bytes even of the packet is much smaller.
Conversely this means we cannot trim the 2048 part of the truesize of
that SKB unless we had some mechanism to know for certain 1) what the
block size of the underlying data is and 2) that we've removed all
references to that.
Currently this is not really possible, so we therefore defer truesize
adjustments.
Behaving otherwise is dangerous, because then we'd potentially end up
with a lot of memory used, but not actually accounted for by anyone.
^ permalink raw reply
* linux-next: build failure after merge of the final tree (net-next tree related)
From: Stephen Rothwell @ 2012-05-03 6:16 UTC (permalink / raw)
To: David Miller, netdev; +Cc: linux-next, linux-kernel, Eric Dumazet
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
Hi all,
After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:
net/core/sock.c: In function '__release_sock':
net/core/sock.c:1703:4: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]
Caused by commit e4cbb02a1070 ("net: add a prefetch in socket backlog
processing").
I have reverted that commit for today.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: linux-next: build failure after merge of the final tree (net-next tree related)
From: David Miller @ 2012-05-03 6:26 UTC (permalink / raw)
To: sfr; +Cc: netdev, linux-next, linux-kernel, edumazet
In-Reply-To: <20120503161623.ad219e088031fd66be212407@canb.auug.org.au>
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 3 May 2012 16:16:23 +1000
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
>
> net/core/sock.c: In function '__release_sock':
> net/core/sock.c:1703:4: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]
>
> Caused by commit e4cbb02a1070 ("net: add a prefetch in socket backlog
> processing").
>
> I have reverted that commit for today.
Fixed as follows:
--------------------
net: Add missing linux/prefetch.h include to net/core/sock.c
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/core/sock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/sock.c b/net/core/sock.c
index 1a88351..b8c818e 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -113,6 +113,7 @@
#include <linux/user_namespace.h>
#include <linux/static_key.h>
#include <linux/memcontrol.h>
+#include <linux/prefetch.h>
#include <asm/uaccess.h>
--
1.7.10
^ permalink raw reply related
* Re: [PATCH] net: skb_set_dev do not unconditionally drop ref to dst
From: David Miller @ 2012-05-03 6:28 UTC (permalink / raw)
To: eric.dumazet; +Cc: blaschka, netdev, arnd, linux-s390
In-Reply-To: <1335941961.22133.48.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 02 May 2012 08:59:21 +0200
> If Arnd doesnt care to even reply, we can just revert his buggy
> patch, instead of trying to understand and fix all issues.
Agreed, it's the best sounding solution by far.
^ permalink raw reply
* Re: [PATCH 3/8] Sometimes the ISDN chip only controls the D-channel
From: Karsten Keil @ 2012-05-03 6:31 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20120501.133007.569588994121475807.davem@davemloft.net>
Hello David,
Am 01.05.2012 19:30, schrieb David Miller:
> From: Karsten Keil <kkeil@linux-pingi.de>
> Date: Sat, 28 Apr 2012 13:43:19 +0200
>
>> The B-channels are only accessed via the PCM backplane.
>> Add infrastruckture for this special mode.
>>
>> Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
>
> I dread reviewing these ISDN patch sets because they are so
> full of problems, and it's so damn obvious how little care is
> put into preparing them.
>
> What I see is that you put the minimum amount of work necessary
> into splitting up your huge ISDN patch set submission into more
> managable pieces, and as a result you are introducing problems.
>
I did put the additional PCM infrastructure in this series, because
the approval test was done with it in place.
I did plan the update of the low level drivers in a separate patchset
from the beginning.
What do you prefer, adding the driver part now, as additional patch, or
removing this additional infrastruckture part and submit it in a later
series ?
>> diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
>> index abe2d69..502bcf1 100644
>> --- a/drivers/isdn/mISDN/socket.c
>> +++ b/drivers/isdn/mISDN/socket.c
>> @@ -270,6 +270,7 @@ data_sock_release(struct socket *sock)
>> break;
>> case ISDN_P_LAPD_TE:
>> case ISDN_P_LAPD_NT:
>> + case ISDN_P_B_PCM:
>> case ISDN_P_B_RAW:
>> case ISDN_P_B_HDLC:
>> case ISDN_P_B_X75SLP:
>
> Ok, that's fine.
>
>> @@ -148,6 +149,8 @@ struct bchannel {
>> u_int state;
>> void *hw;
>> int slot; /* multiport card channel slot */
>> + int pcm_tx; /* PCM tx slot nr */
>> + int pcm_rx; /* PCM rx slot nr */
>> struct timer_list timer;
>> /* receive data */
>> struct sk_buff *rx_skb;
>
> But what the hell is this? These structure members are unused by
> this patch, and in fact no patch in your entire series uses them.
>
>> @@ -360,8 +360,8 @@ clear_channelmap(u_int nr, u_char *map)
>> #define MISDN_CTRL_LOOP 0x0001
>> #define MISDN_CTRL_CONNECT 0x0002
>> #define MISDN_CTRL_DISCONNECT 0x0004
>> -#define MISDN_CTRL_PCMCONNECT 0x0010
>> -#define MISDN_CTRL_PCMDISCONNECT 0x0020
>> +#define MISDN_CTRL_GET_PCM_SLOTS 0x0010
>> +#define MISDN_CTRL_SET_PCM_SLOTS 0x0020
>> #define MISDN_CTRL_SETPEER 0x0040
>> #define MISDN_CTRL_UNSETPEER 0x0080
>> #define MISDN_CTRL_RX_OFF 0x0100
>
> Another completely unrelated change, nothing in this patch uses
> these new defines.
>
>> @@ -381,6 +381,10 @@ clear_channelmap(u_int nr, u_char *map)
>> #define MISDN_CTRL_HFC_WD_INIT 0x4009
>> #define MISDN_CTRL_HFC_WD_RESET 0x400A
>>
>> +/* special PCM slot numbers */
>> +#define MISDN_PCM_SLOT_DISABLE -1 /* PCM disabled */
>> +#define MISDN_PCM_SLOT_IGNORE -2 /* PCM setting will be not changed */
>> +
>> /* socket options */
>> #define MISDN_TIME_STAMP 0x0001
>>
>
> Same thing.
>
>> @@ -389,6 +393,7 @@ struct mISDN_ctrl_req {
>> int channel;
>> int p1;
>> int p2;
>> + int p3;
>> };
>>
>> /* muxer options */
>
> And again, same problem.
>
> You really need to get your act in gear and prepare your patches
> properly, so that they don't have unrelated changes in them.
>
> This is not amateur hour.
>
>
^ permalink raw reply
* Re: [PATCH 3/8] Sometimes the ISDN chip only controls the D-channel
From: David Miller @ 2012-05-03 6:50 UTC (permalink / raw)
To: kkeil; +Cc: netdev
In-Reply-To: <4FA2265D.6040000@linux-pingi.de>
From: Karsten Keil <kkeil@linux-pingi.de>
Date: Thu, 03 May 2012 08:31:57 +0200
> I did put the additional PCM infrastructure in this series, because
> the approval test was done with it in place.
> I did plan the update of the low level drivers in a separate patchset
> from the beginning.
>
> What do you prefer, adding the driver part now, as additional patch, or
> removing this additional infrastruckture part and submit it in a later
> series ?
I feel like I'm talking to a wall.
A patch should do one, and only one thing. It should not have
changes which are unrelated to that one thing.
What part of this is so hard to understand?
To make matters worse, you didn't even make a mention of those
unrelated changes in your commit message.
So that patch was bogus on at least two counts.
^ permalink raw reply
* Re: WARNING: at net/sched/sch_generic.c:256 dev_watchdog+0x277/0x280()
From: Francois Romieu @ 2012-05-03 6:47 UTC (permalink / raw)
To: Alex Villacís Lasso; +Cc: netdev
In-Reply-To: <4FA1C331.80909@fiec.espol.edu.ec>
(please avoid posting twice)
Alex Villacís Lasso <avillaci@fiec.espol.edu.ec> :
[...]
> I am currently away from the target computer. How should I check for this? lspci?
lspci can not tell much. Use 'dmesg | grep XID' instead.
A complete dmesg would be welcome.
It could help to know a few things :
- does the problem qualify as a regression since some kernel version ?
If so which one ?
- can it be reproduced with a kernel that has not been vbox tainted ?
- does networking recover ?
Thanks.
--
Ueimor
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2012-05-03 6:59 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
It's the usual jumble of small fixes, mostly in drivers, but a few in
core infrastructure parts and TCP.
1) Transfer padding was wrong for full-speed USB in ASIX driver,
fix from Ingo van Lil.
2) Propagate the negative packet offset fix into the PowerPC BPF JIT.
From Jan Seiffert.
3) dl2k driver's private ioctls were letting unprivileged tasks make
MII writes and other ugly bits like that. Fix from Jeff Mahoney.
4) Fix TX VLAN and RX packet drops in ucc_geth, from Joakim Tjernlund.
5) OOPS and network namespace fixes in IPVS from Hans Schillstrom and
Julian Anastasov.
6) Fix races and sleeping in locked context bugs in drop_monitor, from
Neil Horman.
7) Fix link status indication in smsc95xx driver, from Paolo Pisati.
8) Fix bridge netfilter OOPS, from Peter Huang.
9) L2TP sendmsg can return on error conditions with the socket lock
held, oops. Fix from Sasha Levin.
10) udp_diag should return meaningful values for socket memory usage,
from Shan Wei.
11) Eric Dumazet is so awesome he gets his own section:
Socket memory cgroup code (I never should have applied those
patches, grumble...) made erroneous changes to
sk_sockets_allocated_read_positive(). It was changed to
use percpu_counter_sum_positive (which requires BH disabling)
instead of percpu_counter_read_positive (which does not).
Revert back to avoid crashes and lockdep warnings.
Adjust the default tcp_adv_win_scale and tcp_rmem[2] values
to fix throughput regressions. This is necessary as a result
of our more precise skb->truesize tracking.
Fix SKB leak in netem packet scheduler.
12) New device IDs for various bluetooth devices, from Manoj Iyer,
AceLan Kao, and Steven Harms.
13) Fix command completion race in ipw2200, from Stanislav Yakovlev.
14) Fix rtlwifi oops on unload, from Larry Finger.
15) Fix hard_mtu when adjusting hard_header_len in smsc95xx driver. From
Stephane Fillod.
16) ehea driver registers it's IRQ before all the necessary state is
setup, resulting in crashes. Fix from Thadeu Lima de Souza
Cascardo.
17) Fix PHY connection failures in davinci_emac driver, from Anatolij
Gustschin.
18) Missing break; in switch statement in bluetooth's
hci_cmd_complete_evt(). Fix from Szymon Janc.
19) Fix queue programming in iwlwifi, from Johannes Berg.
20) Interrupt throttling defaults not being actually programmed
into the hardware, fix from Jeff Kirsher and Ying Cai.
21) TLAN driver SKB encoding in descriptor busted on 64-bit, fix
from Benjamin Poirier.
22) Fix blind status block RX producer pointer deref in TG3 driver,
from Matt Carlson.
23) Promisc and multicast are busted on ehea, fixes from Thadeu Lima
de Souza Cascardo.
24) Fix crashes in 6lowpan, from Alexander Smirnov.
25) tcp_complete_cwr() needs to be careful to not rewind the CWND to
ssthresh if ssthresh has the "infinite" value. Fix from Yuchung
Cheng.
Please pull, thanks a lot.
The following changes since commit 4d634ca35a8b38530b134ae92bc9e3cc9c23c030:
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild (2012-04-23 19:45:19 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
for you to fetch changes up to 5a8887d39e1ba5ee2d4ccb94b14d6f2dce5ddfca:
sungem: Fix WakeOnLan (2012-05-03 01:42:55 -0400)
----------------------------------------------------------------
AceLan Kao (2):
Bluetooth: Add support for Atheros [13d3:3362]
Bluetooth: Add support for AR3012 [0cf3:e004]
Alexander Duyck (1):
ixgbe: Fix a memory leak in IEEE DCB
Anatolij Gustschin (1):
net/davinci_emac: fix failing PHY connect attempts
Benjamin Poirier (1):
tlan: add cast needed for proper 64 bit operation
David S. Miller (4):
Merge branch 'for-davem' of git://git.kernel.org/.../linville/wireless
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net
Merge branch 'master' of git://1984.lsi.us.es/net
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net
Eldad Zack (1):
brcmsmac: "INTERMEDIATE but not AMPDU" only when tracing
Eliad Peller (1):
mac80211: call ieee80211_mgd_stop() on interface stop
Eric Dumazet (4):
net: fix sk_sockets_allocated_read_positive
net: fix two typos in skbuff.h
netem: fix possible skb leak
tcp: change tcp_adv_win_scale and tcp_rmem[2]
Felix Fietkau (1):
mac80211: fix AP mode EAP tx for VLAN stations
Franky Lin (2):
brcm80211: fmac: fix SDIO function 0 register r/w issue
brcm80211: fmac: fix missing completion events issue
Gabor Juhos (2):
ath9k: add an extra boolean parameter to ath9k_hw_apply_txpower
ath9k: fix tx power settings for AR9287
Gerard Lledo (1):
sungem: Fix WakeOnLan
Grazvydas Ignotas (2):
wl1251: fix crash on remove due to premature kfree
wl1251: fix crash on remove due to leftover work item
Hans Schillstrom (3):
ipvs: null check of net->ipvs in lblc(r) shedulers
ipvs: take care of return value from protocol init_netns
ipvs: kernel oops - do_ip_vs_get_ctl
Ingo van Lil (1):
asix: Fix tx transfer padding for full-speed USB
Jan Seiffert (1):
bpf jit: Let the powerpc jit handle negative offsets
Jeff Kirsher (1):
e1000e: Fix default interrupt throttle rate not set in NIC HW
Jeff Mahoney (1):
dl2k: Clean up rio_ioctl
Joakim Tjernlund (2):
net: ucc_geth, increase no. of HW RX descriptors
ucc_geth: Add 16 bytes to max TX frame for VLANs
Johannes Berg (1):
iwlwifi: fix hardware queue programming
John W. Linville (3):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
Jonathan Bither (1):
ath5k: add missing iounmap to AHB probe removal
Julian Anastasov (3):
ipvs: fix crash in ip_vs_control_net_cleanup on unload
ipvs: add check in ftp for initialized core
ipvs: reset ipvs pointer in netns
Larry Finger (1):
rtlwifi: Fix oops on unload
Manoj Iyer (1):
Bluetooth: btusb: Add vendor specific ID (0489 e042) for BCM20702A0
Matt Carlson (1):
tg3: Avoid panic from reserved statblk field access
Meenakshi Venkataraman (1):
iwlwifi: use correct released ucode version
Neal Cardwell (1):
tcp: clean up use of jiffies in tcp_rcv_rtt_measure()
Neil Horman (3):
drop_monitor: fix sleeping in invalid context warning
drop_monitor: Make updating data->skb smp safe
drop_monitor: prevent init path from scheduling on the wrong cpu
Pablo Neira Ayuso (1):
netfilter: xt_CT: fix wrong checking in the timeout assignment path
Paolo Pisati (1):
smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes
Peter Huang (Peng) (1):
set fake_rtable's dst to NULL to avoid kernel Oops
Prasanna S Panchamukhi (1):
e1000e: MSI interrupt test failed, using legacy interrupt
Roland Dreier (1):
cxgb3: Don't call cxgb_vlan_mode until q locks are initialized
Samuel Liao (1):
igbvf: fix the bug when initializing the igbvf
Sasha Levin (2):
ipvs: Verify that IP_VS protocol has been registered
net: l2tp: unlock socket lock before returning from l2tp_ip_sendmsg
Seth Forshee (1):
b43: only reload config after successful initialization
Shan Wei (1):
udp_diag: implement idiag_get_info for udp/udplite to get queue information
Stanislav Yakovlev (1):
ipw2200: Fix race condition in the command completion acknowledge
Stanislaw Gruszka (1):
iwlwifi: do not nulify ctx->vif on reset
Stefan Raspl (1):
qeth: Use blkt defaults for OSA Express 4
Stephane Fillod (1):
net: usb: smsc95xx: fix mtu
Steve Glendinning (7):
smsc75xx: mark link down on startup and let PHY interrupt deal with carrier changes
smsc75xx: fix mdio reads and writes
smsc75xx: add more information to register io failure warnings
smsc75xx: fix phy init reset loop
smsc75xx: fix phy interrupt acknowledge
smsc75xx: declare smsc75xx's MII as GMII capable
smsc75xx: enable mac to detect speed/duplex from phy
Steven Harms (1):
Add Foxconn / Hon Hai IDs for btusb module
Szymon Janc (1):
Bluetooth: Fix missing break in hci_cmd_complete_evt
Thadeu Lima de Souza Cascardo (3):
ehea: only register irq after setting up ports
ehea: fix allmulticast support
ehea: fix promiscuous mode
Ursula Braun (1):
qeth: allow change of blkt default values
Vishal Agarwal (2):
Bluetooth: hci_persistent_key should return bool
Bluetooth: Temporary keys should be retained during connection
Vlad Yasevich (1):
MAINTAINERS: update sctp maintainer address
Wey-Yi Guy (1):
iwlwifi: use 6000G2B for 6030 device series
Yi Zou (1):
ixgbe: fix calling skb_put on nonlinear skb assertion bug
Yuchung Cheng (1):
tcp: fix infinite cwnd in tcp_complete_cwr()
alex.bluesman.smirnov@gmail.com (3):
6lowpan: fix segmentation fault caused by mlme request
6lowpan: clean up fragments list if module unloaded
6lowpan: add missing spin_lock_init()
stephen hemminger (2):
sky2: propogate rx hash when packet is copied
sky2: fix receive length error in mixed non-VLAN/VLAN traffic
tom.leiming@gmail.com (2):
usbnet: fix leak of transfer buffer of dev->interrupt
usbnet: fix failure handling in usbnet_probe
Documentation/networking/ip-sysctl.txt | 4 +-
MAINTAINERS | 4 +-
arch/powerpc/net/bpf_jit.h | 8 +++-
arch/powerpc/net/bpf_jit_64.S | 108 +++++++++++++++++++++++++++++++++++++++------
arch/powerpc/net/bpf_jit_comp.c | 26 ++++-------
drivers/bluetooth/ath3k.c | 4 ++
drivers/bluetooth/btusb.c | 6 +++
drivers/net/ethernet/broadcom/tg3.c | 18 +++++++-
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 92 +++++++++++++++++++-------------------
drivers/net/ethernet/dlink/dl2k.c | 52 ++++------------------
drivers/net/ethernet/dlink/dl2k.h | 7 ---
drivers/net/ethernet/freescale/ucc_geth.c | 6 +--
drivers/net/ethernet/freescale/ucc_geth.h | 2 +-
drivers/net/ethernet/ibm/ehea/ehea_main.c | 60 ++++++++++++++-----------
drivers/net/ethernet/ibm/ehea/ehea_phyp.h | 2 +-
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
drivers/net/ethernet/intel/e1000e/param.c | 99 ++++++++++++++++++++++-------------------
drivers/net/ethernet/intel/igbvf/netdev.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 ++--
drivers/net/ethernet/marvell/sky2.c | 31 ++++++++-----
drivers/net/ethernet/marvell/sky2.h | 1 -
drivers/net/ethernet/sun/sungem.c | 2 +-
drivers/net/ethernet/ti/davinci_emac.c | 2 +-
drivers/net/ethernet/ti/tlan.c | 2 +-
drivers/net/usb/asix.c | 4 +-
drivers/net/usb/smsc75xx.c | 35 ++++++++++-----
drivers/net/usb/smsc95xx.c | 3 +-
drivers/net/usb/usbnet.c | 5 ++-
drivers/net/wireless/ath/ath5k/ahb.c | 1 +
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_paprd.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 +-
drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 +
drivers/net/wireless/ath/ath9k/hw.c | 9 ++--
drivers/net/wireless/ath/ath9k/hw.h | 3 +-
drivers/net/wireless/b43/main.c | 10 ++++-
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 8 +++-
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 63 +++++++++++++++++++++-----
drivers/net/wireless/brcm80211/brcmsmac/main.c | 3 +-
drivers/net/wireless/ipw2x00/ipw2200.c | 13 +++++-
drivers/net/wireless/iwlwifi/iwl-1000.c | 8 ++--
drivers/net/wireless/iwlwifi/iwl-2000.c | 16 +++----
drivers/net/wireless/iwlwifi/iwl-5000.c | 11 ++++-
drivers/net/wireless/iwlwifi/iwl-6000.c | 10 +++--
drivers/net/wireless/iwlwifi/iwl-agn.c | 3 --
drivers/net/wireless/iwlwifi/iwl-fh.h | 24 +++++++---
drivers/net/wireless/iwlwifi/iwl-mac80211.c | 10 ++++-
drivers/net/wireless/iwlwifi/iwl-prph.h | 27 ++++++++++--
drivers/net/wireless/rtlwifi/pci.c | 1 +
drivers/net/wireless/wl1251/main.c | 1 +
drivers/net/wireless/wl1251/sdio.c | 2 +-
drivers/s390/net/qeth_core_main.c | 6 ++-
include/linux/netfilter_bridge.h | 9 ++++
include/linux/skbuff.h | 4 +-
include/net/bluetooth/hci_core.h | 3 +-
include/net/dst.h | 1 +
include/net/ip_vs.h | 4 +-
include/net/sock.h | 4 +-
net/bluetooth/hci_core.c | 27 ++++++------
net/bluetooth/hci_event.c | 3 ++
net/bluetooth/mgmt.c | 2 +-
net/bridge/br_forward.c | 1 +
net/bridge/br_netfilter.c | 8 +---
net/core/drop_monitor.c | 88 ++++++++++++++++++++++++++----------
net/ieee802154/6lowpan.c | 40 ++++++++++++++++-
net/ipv4/inet_diag.c | 2 +-
net/ipv4/tcp.c | 9 ++--
net/ipv4/tcp_input.c | 13 +++---
net/ipv4/udp_diag.c | 9 ++++
net/l2tp/l2tp_ip.c | 3 +-
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/iface.c | 4 +-
net/mac80211/mlme.c | 2 +-
net/mac80211/tx.c | 3 +-
net/netfilter/ipvs/ip_vs_core.c | 11 +++++
net/netfilter/ipvs/ip_vs_ctl.c | 56 +++++++++++++----------
net/netfilter/ipvs/ip_vs_ftp.c | 2 +
net/netfilter/ipvs/ip_vs_lblc.c | 3 ++
net/netfilter/ipvs/ip_vs_lblcr.c | 3 ++
net/netfilter/ipvs/ip_vs_proto.c | 38 +++++++++++-----
net/netfilter/ipvs/ip_vs_proto_sctp.c | 5 ++-
net/netfilter/ipvs/ip_vs_proto_tcp.c | 5 ++-
net/netfilter/ipvs/ip_vs_proto_udp.c | 5 ++-
net/netfilter/xt_CT.c | 2 +-
net/sched/sch_netem.c | 6 +--
86 files changed, 795 insertions(+), 418 deletions(-)
^ permalink raw reply
* Re: [PATCH 2/2] tcp: cleanup tcp_try_coalesce
From: Alexander Duyck @ 2012-05-03 7:08 UTC (permalink / raw)
To: David Miller
Cc: eric.dumazet, alexander.h.duyck, netdev, edumazet,
jeffrey.t.kirsher
In-Reply-To: <20120503.015018.1396745597972676005.davem@davemloft.net>
On 5/2/2012 10:50 PM, David Miller wrote:
> From: Alexander Duyck<alexander.duyck@gmail.com>
> Date: Wed, 02 May 2012 22:41:36 -0700
>
>> I think the part that has me confused is how being more precise about
>> removing from truesize gets in the way of detecting abuses of
>> truesize. It seems like it should be more as good as or better then
>> the original approach of just using skb->len.
> You can only trim from truesize if you can be absolutely certain that
> you have removed any reference in the fraglist, or the page'd head, to
> the entire "block" of data.
>
> If the skb still refers to even just one byte in a particular block,
> we must still charge the entire block in the truesize.
I get that, and that is what my code was doing that the old code wasn't
doing. That is why I am confused. I should have another patch ready in
an hour or so that should help to make my position clear.
> For example, NIU has three pools of power-of-2 blocks of data it
> maintainers and the device pulls from to build incoming packets.
>
> So if the chip used one of the 2048 byte buffers, we charge the entire
> 2048 bytes even of the packet is much smaller.
>
> Conversely this means we cannot trim the 2048 part of the truesize of
> that SKB unless we had some mechanism to know for certain 1) what the
> block size of the underlying data is and 2) that we've removed all
> references to that.
>
> Currently this is not really possible, so we therefore defer truesize
> adjustments.
This is true for the frags, but not for the head buffer allocated with
__alloc_skb or build_skb. For either of these we set both truesize and
the end pointer offset based on the ksize(data). The truesize is the
value plus SKB_DATA_ALIGNED(sizeof(struct sk_buff)), and the end pointer
offset is the value minus SKB_DATA_ALIGNED(sizeof(struct
skb_shared_info)). So in the case where we are removing the sk_buff and
skb->head, I am subtracting the end pointer offset plus the aligned
shared info and sk_buff values from skb->truesize to get the size of
just the paged region.
> Behaving otherwise is dangerous, because then we'd potentially end up
> with a lot of memory used, but not actually accounted for by anyone.
I fully agree that is why I was surprised when I was told not to use the
values for skb->truesize that were computed back when we allocated the
skb to determine the truesize to remove from the delta when we were
removing it.
Thanks,
Alex
^ permalink raw reply
* [v2 PATCH 0/4] Cleanup tcp_try_coalesce, fix module lockup on ixgbe
From: Alexander Duyck @ 2012-05-03 7:18 UTC (permalink / raw)
To: netdev; +Cc: davem, jeffrey.t.kirsher, edumazet
This set represents the original patch I had done for trying to cleanup
tcp_try_coalesce broken into 3 patches. The first one illustrates how I
believe we should be updating the truesize based on either the size of
sk_buff in the case of head reuse, or sk_buff plus the size of the head in
the case of a headlen of 0.
The other two patches go through and reorder things so there isn't as much
need for gotos. I believe it makes the code much more readable since it
starts at the top and finishes at the bottom instead of looping through the
entire code path a few times.
The last patch addresses an issue I ran into on ixgbe. It turns out the
recent HWMON patch added a but on 82598 adapters that caused the driver to
get hung in module unload. I figured I would submit it directly since it
is a small change to fix an issue that could have a larger impact.
On that note I am going to sleep now and will respond to any reviews and/or
comments in the morning.
---
Alexander Duyck (4):
ixgbe: Fix use after free on module remove
tcp: move stats merge to the end of tcp_try_coalesce
tcp: Move code related to head frag in tcp_try_coalesce
tcp: Fix truesize accounting in tcp_try_coalesce
drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c | 4 +
net/ipv4/tcp_input.c | 83 +++++++++++++-----------
2 files changed, 49 insertions(+), 38 deletions(-)
--
Thanks,
Alex
^ permalink raw reply
* [v2 PATCH 1/4] tcp: Fix truesize accounting in tcp_try_coalesce
From: Alexander Duyck @ 2012-05-03 7:18 UTC (permalink / raw)
To: netdev; +Cc: davem, jeffrey.t.kirsher, edumazet
In-Reply-To: <20120503071141.13636.37564.stgit@gitlad.jf.intel.com>
This patch addresses several issues in the way we were tracking the
truesize in tcp_try_coalesce.
First it was using ksize which prevents us from having a 0 sized head frag
and getting a usable result. To resolve that this patch uses the end
pointer which is set based off either ksize, or the frag_size supplied in
build_skb. This allows us to compute the original truesize of the entire
buffer and remove that value leaving us with just what was added as pages.
The second issue was the use of skb->len if there is a mergeable head frag.
We should only need to remove the size of an data aligned sk_buff from our
current skb->truesize to compute the delta for a buffer with a reused head.
By using skb->len the value of truesize was being artificially reduced
which means that head frags could use more memory than buffers using
standard allocations.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
net/ipv4/tcp_input.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c6f78e2..3cb273a 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4565,12 +4565,10 @@ merge:
if (skb_headlen(from) == 0 &&
(skb_shinfo(to)->nr_frags +
skb_shinfo(from)->nr_frags <= MAX_SKB_FRAGS)) {
- WARN_ON_ONCE(from->head_frag);
- delta = from->truesize - ksize(from->head) -
- SKB_DATA_ALIGN(sizeof(struct sk_buff));
-
- WARN_ON_ONCE(delta < len);
+ delta = from->truesize -
+ SKB_TRUESIZE(skb_end_pointer(from) - from->head);
copyfrags:
+ WARN_ON_ONCE(delta < len);
memcpy(skb_shinfo(to)->frags + skb_shinfo(to)->nr_frags,
skb_shinfo(from)->frags,
skb_shinfo(from)->nr_frags * sizeof(skb_frag_t));
@@ -4600,7 +4598,7 @@ copyfrags:
skb_fill_page_desc(to, skb_shinfo(to)->nr_frags,
page, offset, skb_headlen(from));
*fragstolen = true;
- delta = len; /* we dont know real truesize... */
+ delta = from->truesize - SKB_DATA_ALIGN(sizeof(struct sk_buff));
goto copyfrags;
}
return false;
^ permalink raw reply related
* [v2 PATCH 2/4] tcp: Move code related to head frag in tcp_try_coalesce
From: Alexander Duyck @ 2012-05-03 7:19 UTC (permalink / raw)
To: netdev; +Cc: davem, jeffrey.t.kirsher, edumazet
In-Reply-To: <20120503071141.13636.37564.stgit@gitlad.jf.intel.com>
This change reorders the code related to the use of an skb->head_frag so it
is placed before we check the rest of the frags. This allows the code to
read more linearly instead of like some sort of loop.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
net/ipv4/tcp_input.c | 42 +++++++++++++++++++++++++-----------------
1 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 3cb273a..41fa5df 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4562,9 +4562,31 @@ merge:
if (skb_has_frag_list(to) || skb_has_frag_list(from))
return false;
- if (skb_headlen(from) == 0 &&
- (skb_shinfo(to)->nr_frags +
- skb_shinfo(from)->nr_frags <= MAX_SKB_FRAGS)) {
+ if (skb_headlen(from) != 0) {
+ struct page *page;
+ unsigned int offset;
+
+ if (skb_shinfo(to)->nr_frags +
+ skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS)
+ return false;
+
+ if (!from->head_frag || skb_cloned(from))
+ return false;
+
+ delta = from->truesize - SKB_DATA_ALIGN(sizeof(struct sk_buff));
+
+ page = virt_to_head_page(from->head);
+ offset = from->data - (unsigned char *)page_address(page);
+
+ skb_fill_page_desc(to, skb_shinfo(to)->nr_frags,
+ page, offset, skb_headlen(from));
+ *fragstolen = true;
+ goto copyfrags;
+ } else {
+ if (skb_shinfo(to)->nr_frags +
+ skb_shinfo(from)->nr_frags > MAX_SKB_FRAGS)
+ return false;
+
delta = from->truesize -
SKB_TRUESIZE(skb_end_pointer(from) - from->head);
copyfrags:
@@ -4587,20 +4609,6 @@ copyfrags:
to->data_len += len;
goto merge;
}
- if (from->head_frag && !skb_cloned(from)) {
- struct page *page;
- unsigned int offset;
-
- if (skb_shinfo(to)->nr_frags + skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS)
- return false;
- page = virt_to_head_page(from->head);
- offset = from->data - (unsigned char *)page_address(page);
- skb_fill_page_desc(to, skb_shinfo(to)->nr_frags,
- page, offset, skb_headlen(from));
- *fragstolen = true;
- delta = from->truesize - SKB_DATA_ALIGN(sizeof(struct sk_buff));
- goto copyfrags;
- }
return false;
}
^ permalink raw reply related
* [v2 PATCH 4/4] ixgbe: Fix use after free on module remove
From: Alexander Duyck @ 2012-05-03 7:19 UTC (permalink / raw)
To: netdev; +Cc: davem, jeffrey.t.kirsher, edumazet
In-Reply-To: <20120503071141.13636.37564.stgit@gitlad.jf.intel.com>
While testing the TCP changes I had to fix an issue in order to be able to
load and unload the module.
The recent patch that added thermal sensor support added a use after free
bug on module unload with an 82598 adapter in the system. To resolve the
issue I have updated the code so that when we free the info_kobj we set it
back to NULL.
I suspect there are likely other bugs present, but I will leave that for
another patch that can undergo more testing.
I am submitting this directly to net-next since this fixes a fairly serious
bug that will lock up the ixgbe module until the system is rebooted.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
index aa41fb7..f81c166 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
@@ -185,8 +185,10 @@ static void ixgbe_sysfs_del_adapter(struct ixgbe_adapter *adapter)
hwmon_device_unregister(adapter->ixgbe_hwmon_buff.device);
#endif /* CONFIG_IXGBE_HWMON */
- if (adapter->info_kobj != NULL)
+ if (adapter->info_kobj != NULL) {
kobject_put(adapter->info_kobj);
+ adapter->info_kobj = NULL;
+ }
}
/* called from ixgbe_main.c */
^ permalink raw reply related
* [v2 PATCH 3/4] tcp: move stats merge to the end of tcp_try_coalesce
From: Alexander Duyck @ 2012-05-03 7:19 UTC (permalink / raw)
To: netdev; +Cc: davem, jeffrey.t.kirsher, edumazet
In-Reply-To: <20120503071141.13636.37564.stgit@gitlad.jf.intel.com>
This change cleans up the last bits of tcp_try_coalesce so that we only
need one goto which jumps to the end of the function. The idea is to make
the code more readable by putting things in a linear order so that we start
execution at the top of the function, and end it at the bottom.
I also made a slight tweak to the code for handling frags when we are a
clone. Instead of making it an if (clone) loop else nr_frags = 0 I changed
the logic so that if (!clone) we just set the number of frags to 0 which
disables the for loop anyway.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
net/ipv4/tcp_input.c | 55 ++++++++++++++++++++++++++------------------------
1 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 41fa5df..84e69e0 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4548,15 +4548,13 @@ static bool tcp_try_coalesce(struct sock *sk,
int i, delta, len = from->len;
*fragstolen = false;
+
if (tcp_hdr(from)->fin || skb_cloned(to))
return false;
+
if (len <= skb_tailroom(to)) {
BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len));
-merge:
- NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRCVCOALESCE);
- TCP_SKB_CB(to)->end_seq = TCP_SKB_CB(from)->end_seq;
- TCP_SKB_CB(to)->ack_seq = TCP_SKB_CB(from)->ack_seq;
- return true;
+ goto merge;
}
if (skb_has_frag_list(to) || skb_has_frag_list(from))
@@ -4581,7 +4579,6 @@ merge:
skb_fill_page_desc(to, skb_shinfo(to)->nr_frags,
page, offset, skb_headlen(from));
*fragstolen = true;
- goto copyfrags;
} else {
if (skb_shinfo(to)->nr_frags +
skb_shinfo(from)->nr_frags > MAX_SKB_FRAGS)
@@ -4589,27 +4586,33 @@ merge:
delta = from->truesize -
SKB_TRUESIZE(skb_end_pointer(from) - from->head);
-copyfrags:
- WARN_ON_ONCE(delta < len);
- memcpy(skb_shinfo(to)->frags + skb_shinfo(to)->nr_frags,
- skb_shinfo(from)->frags,
- skb_shinfo(from)->nr_frags * sizeof(skb_frag_t));
- skb_shinfo(to)->nr_frags += skb_shinfo(from)->nr_frags;
-
- if (skb_cloned(from))
- for (i = 0; i < skb_shinfo(from)->nr_frags; i++)
- skb_frag_ref(from, i);
- else
- skb_shinfo(from)->nr_frags = 0;
-
- to->truesize += delta;
- atomic_add(delta, &sk->sk_rmem_alloc);
- sk_mem_charge(sk, delta);
- to->len += len;
- to->data_len += len;
- goto merge;
}
- return false;
+
+ WARN_ON_ONCE(delta < len);
+
+ memcpy(skb_shinfo(to)->frags + skb_shinfo(to)->nr_frags,
+ skb_shinfo(from)->frags,
+ skb_shinfo(from)->nr_frags * sizeof(skb_frag_t));
+ skb_shinfo(to)->nr_frags += skb_shinfo(from)->nr_frags;
+
+ if (!skb_cloned(from))
+ skb_shinfo(from)->nr_frags = 0;
+
+ /* if the skb is cloned this does nothing since we set nr_frags to 0 */
+ for (i = 0; i < skb_shinfo(from)->nr_frags; i++)
+ skb_frag_ref(from, i);
+
+ to->truesize += delta;
+ atomic_add(delta, &sk->sk_rmem_alloc);
+ sk_mem_charge(sk, delta);
+ to->len += len;
+ to->data_len += len;
+
+merge:
+ NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRCVCOALESCE);
+ TCP_SKB_CB(to)->end_seq = TCP_SKB_CB(from)->end_seq;
+ TCP_SKB_CB(to)->ack_seq = TCP_SKB_CB(from)->ack_seq;
+ return true;
}
static void kfree_skb_partial(struct sk_buff *skb, bool head_stolen)
^ permalink raw reply related
* Re: [PATCH 3/8] Sometimes the ISDN chip only controls the D-channel
From: Karsten Keil @ 2012-05-03 7:31 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20120503.025059.1771068683530938115.davem@davemloft.net>
Am 03.05.2012 08:50, schrieb David Miller:
> From: Karsten Keil <kkeil@linux-pingi.de>
> Date: Thu, 03 May 2012 08:31:57 +0200
>
>> I did put the additional PCM infrastructure in this series, because
>> the approval test was done with it in place.
>> I did plan the update of the low level drivers in a separate patchset
>> from the beginning.
>>
>> What do you prefer, adding the driver part now, as additional patch, or
>> removing this additional infrastruckture part and submit it in a later
>> series ?
>
> I feel like I'm talking to a wall.
>
> A patch should do one, and only one thing. It should not have
> changes which are unrelated to that one thing.
>
Sorry I disagree here, this patch does exactly one thing, it add the
infrastructure in the mISDN core to allow the PCM only B-channel mode.
PCM only mode need a special protocol and a mechanism to set/get/store
the PCM slots of the card, and this is for what the extra stuff is used.
> What part of this is so hard to understand?
>
> To make matters worse, you didn't even make a mention of those
> unrelated changes in your commit message.
>
Yes, I was not verbose enough in the commit message and it was my error
to include it in this series, without the use case. Maybe I'm too
deep in the ISDN stuff so I forget that 3 parties do not see how it fit
together.
So would you accept this patch with a changed commit message like this ?
Sometimes the ISDN chip only controls the D-channel
The B-channels are connected only via the PCM backplane.
For this special case we need two things, a protocol which do not enable
the normal IO path and a method to set/get and store the PCM slots to be
used on the backplane.
This patch add the core infrastructure for both. A later patch will
add the methods to the supported low level drivers.
> So that patch was bogus on at least two counts.
>
>
^ permalink raw reply
* Re: [v2 PATCH 1/4] tcp: Fix truesize accounting in tcp_try_coalesce
From: Eric Dumazet @ 2012-05-03 7:48 UTC (permalink / raw)
To: Alexander Duyck; +Cc: netdev, davem, jeffrey.t.kirsher, edumazet
In-Reply-To: <20120503071859.13636.30050.stgit@gitlad.jf.intel.com>
On Thu, 2012-05-03 at 00:18 -0700, Alexander Duyck wrote:
> This patch addresses several issues in the way we were tracking the
> truesize in tcp_try_coalesce.
>
> First it was using ksize which prevents us from having a 0 sized head frag
> and getting a usable result. To resolve that this patch uses the end
> pointer which is set based off either ksize, or the frag_size supplied in
> build_skb. This allows us to compute the original truesize of the entire
> buffer and remove that value leaving us with just what was added as pages.
>
> The second issue was the use of skb->len if there is a mergeable head frag.
> We should only need to remove the size of an data aligned sk_buff from our
> current skb->truesize to compute the delta for a buffer with a reused head.
> By using skb->len the value of truesize was being artificially reduced
> which means that head frags could use more memory than buffers using
> standard allocations.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>
> net/ipv4/tcp_input.c | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index c6f78e2..3cb273a 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -4565,12 +4565,10 @@ merge:
> if (skb_headlen(from) == 0 &&
> (skb_shinfo(to)->nr_frags +
> skb_shinfo(from)->nr_frags <= MAX_SKB_FRAGS)) {
> - WARN_ON_ONCE(from->head_frag);
> - delta = from->truesize - ksize(from->head) -
> - SKB_DATA_ALIGN(sizeof(struct sk_buff));
> -
> - WARN_ON_ONCE(delta < len);
> + delta = from->truesize -
> + SKB_TRUESIZE(skb_end_pointer(from) - from->head);
> copyfrags:
> + WARN_ON_ONCE(delta < len);
> memcpy(skb_shinfo(to)->frags + skb_shinfo(to)->nr_frags,
> skb_shinfo(from)->frags,
> skb_shinfo(from)->nr_frags * sizeof(skb_frag_t));
> @@ -4600,7 +4598,7 @@ copyfrags:
> skb_fill_page_desc(to, skb_shinfo(to)->nr_frags,
> page, offset, skb_headlen(from));
> *fragstolen = true;
> - delta = len; /* we dont know real truesize... */
> + delta = from->truesize - SKB_DATA_ALIGN(sizeof(struct sk_buff));
> goto copyfrags;
> }
> return false;
>
> --
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Re: [v2 PATCH 2/4] tcp: Move code related to head frag in tcp_try_coalesce
From: Eric Dumazet @ 2012-05-03 7:50 UTC (permalink / raw)
To: Alexander Duyck; +Cc: netdev, davem, jeffrey.t.kirsher, edumazet
In-Reply-To: <20120503071904.13636.61130.stgit@gitlad.jf.intel.com>
On Thu, 2012-05-03 at 00:19 -0700, Alexander Duyck wrote:
> This change reorders the code related to the use of an skb->head_frag so it
> is placed before we check the rest of the frags. This allows the code to
> read more linearly instead of like some sort of loop.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>
> net/ipv4/tcp_input.c | 42 +++++++++++++++++++++++++-----------------
> 1 files changed, 25 insertions(+), 17 deletions(-)
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Re: [v2 PATCH 3/4] tcp: move stats merge to the end of tcp_try_coalesce
From: Eric Dumazet @ 2012-05-03 7:52 UTC (permalink / raw)
To: Alexander Duyck; +Cc: netdev, davem, jeffrey.t.kirsher, edumazet
In-Reply-To: <20120503071909.13636.43086.stgit@gitlad.jf.intel.com>
On Thu, 2012-05-03 at 00:19 -0700, Alexander Duyck wrote:
> This change cleans up the last bits of tcp_try_coalesce so that we only
> need one goto which jumps to the end of the function. The idea is to make
> the code more readable by putting things in a linear order so that we start
> execution at the top of the function, and end it at the bottom.
>
> I also made a slight tweak to the code for handling frags when we are a
> clone. Instead of making it an if (clone) loop else nr_frags = 0 I changed
> the logic so that if (!clone) we just set the number of frags to 0 which
> disables the for loop anyway.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>
> net/ipv4/tcp_input.c | 55 ++++++++++++++++++++++++++------------------------
> 1 files changed, 29 insertions(+), 26 deletions(-)
Thanks a lot Alex, this patch serie looks very good.
Acked-by: Eric Dumazet <edumazet@google.com>
^ 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