<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net, branch v3.3-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net?h=v3.3-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/net?h=v3.3-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-30T18:53:20Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-01-30T18:53:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-30T18:53:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a14a8d93169a8f2b0b000891571659ddbfa3a169'/>
<id>urn:sha1:a14a8d93169a8f2b0b000891571659ddbfa3a169</id>
<content type='text'>
1) Setting link attributes can modify the size of the attributes that
   would be reported on a subsequent getlink netlink operation,
   therefore min_ifinfo_dump_size needs to be adjusted.  From Stefan
   Gula.

2) Resegmentation of TSO frames while trimming can violate invariants
   expected by callers, namely that the number of segments can only stay
   the same or decrease, never increase.  If MSS changes, however, we
   can trim data but then end up with more segments.  Fix this by only
   segmenting to the MSS already recorded in the SKB.  That's the
   simplest fix for now and if we want to get more fancy in the future
   that's a more involved change.

   This probably explains some retransmit counter inaccuracies.

   From Neal Cardwell.

3) Fix too-many-wakeups in POLL with AF_UNIX sockets, from Eric Dumazet.

4) Fix CAIF crashes wrt.  namespace handling.  From Eric Dumazet and
   Eric W. Biederman.

5) TCP port selection fixes from Flavio Leitner.

6) More socket memory cgroup build fixes in certain randonfig
   situations.  From Glauber Costa.

7) Fix TCP memory sysctl regression reported by Ingo Molnar, also from
   Glauber Costa.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  af_unix: fix EPOLLET regression for stream sockets
  tcp: fix tcp_trim_head() to adjust segment count with skb MSS
  net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTL
  net caif: Register properly as a pernet subsystem.
  netns: Fail conspicously if someone uses net_generic at an inappropriate time.
  net: explicitly add jump_label.h header to sock.h
  net: RTNETLINK adjusting values of min_ifinfo_dump_size
  ipv6: Fix ip_gre lockless xmits.
  xen-netfront: correct MAX_TX_TARGET calculation.
  netns: fix net_alloc_generic()
  tcp: bind() optimize port allocation
  tcp: bind() fix autoselection to share ports
  l2tp: l2tp_ip - fix possible oops on packet receive
  iwlwifi: fix PCI-E transport "inta" race
  mac80211: set bss_conf.idle when vif is connected
  mac80211: update oper_channel on ibss join
</content>
</entry>
<entry>
<title>af_unix: fix EPOLLET regression for stream sockets</title>
<updated>2012-01-30T17:45:07Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-28T16:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f01fd6e6f6809061b56e78f1e8d143099716d70'/>
<id>urn:sha1:6f01fd6e6f6809061b56e78f1e8d143099716d70</id>
<content type='text'>
Commit 0884d7aa24 (AF_UNIX: Fix poll blocking problem when reading from
a stream socket) added a regression for epoll() in Edge Triggered mode
(EPOLLET)

Appropriate fix is to use skb_peek()/skb_unlink() instead of
skb_dequeue(), and only call skb_unlink() when skb is fully consumed.

This remove the need to requeue a partial skb into sk_receive_queue head
and the extra sk-&gt;sk_data_ready() calls that added the regression.

This is safe because once skb is given to sk_receive_queue, it is not
modified by a writer, and readers are serialized by u-&gt;readlock mutex.

This also reduce number of spinlock acquisition for small reads or
MSG_PEEK users so should improve overall performance.

Reported-by: Nick Mathewson &lt;nickm@freehaven.net&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Alexey Moiseytsev &lt;himeraster@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: fix tcp_trim_head() to adjust segment count with skb MSS</title>
<updated>2012-01-30T17:42:58Z</updated>
<author>
<name>Neal Cardwell</name>
<email>ncardwell@google.com</email>
</author>
<published>2012-01-28T17:29:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5b35e1e6e9ca651e6b291c96d1106043c9af314a'/>
<id>urn:sha1:5b35e1e6e9ca651e6b291c96d1106043c9af314a</id>
<content type='text'>
This commit fixes tcp_trim_head() to recalculate the number of
segments in the skb with the skb's existing MSS, so trimming the head
causes the skb segment count to be monotonically non-increasing - it
should stay the same or go down, but not increase.

Previously tcp_trim_head() used the current MSS of the connection. But
if there was a decrease in MSS between original transmission and ACK
(e.g. due to PMTUD), this could cause tcp_trim_head() to
counter-intuitively increase the segment count when trimming bytes off
the head of an skb. This violated assumptions in tcp_tso_acked() that
tcp_trim_head() only decreases the packet count, so that packets_acked
in tcp_tso_acked() could underflow, leading tcp_clean_rtx_queue() to
pass u32 pkts_acked values as large as 0xffffffff to
ca_ops-&gt;pkts_acked().

As an aside, if tcp_trim_head() had really wanted the skb to reflect
the current MSS, it should have called tcp_set_skb_tso_segs()
unconditionally, since a decrease in MSS would mean that a
single-packet skb should now be sliced into multiple segments.

Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Nandita Dukkipati &lt;nanditad@google.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@helsinki.fi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTL</title>
<updated>2012-01-30T17:41:06Z</updated>
<author>
<name>Glauber Costa</name>
<email>glommer@parallels.com</email>
</author>
<published>2012-01-30T01:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4acb41903b2f99f3dffd4c3df9acc84ca5942cb2'/>
<id>urn:sha1:4acb41903b2f99f3dffd4c3df9acc84ca5942cb2</id>
<content type='text'>
sysctl_tcp_mem() initialization was moved to sysctl_tcp_ipv4.c
in commit 3dc43e3e4d0b52197d3205214fe8f162f9e0c334, since it
became a per-ns value.

That code, however, will never run when CONFIG_SYSCTL is
disabled, leading to bogus values on those fields - causing hung
TCP sockets.

This patch fixes it by keeping an initialization code in
tcp_init(). It will be overwritten by the first net namespace
init if CONFIG_SYSCTL is compiled in, and do the right thing if
it is compiled out.

It is also named properly as tcp_init_mem(), to properly signal
its non-sysctl side effect on TCP limits.

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Glauber Costa &lt;glommer@parallels.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Link: http://lkml.kernel.org/r/4F22D05A.8030604@parallels.com
[ renamed the function, tidied up the changelog a bit ]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'nfs-for-3.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2012-01-30T16:47:49Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-30T16:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f94f72ee673edd6cd9cd36fd954173871808873f'/>
<id>urn:sha1:f94f72ee673edd6cd9cd36fd954173871808873f</id>
<content type='text'>
NFS client bugfixes for Linux 3.3 (pull 3)

* tag 'nfs-for-3.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  SUNRPC: Fix machine creds in generic_create_cred and generic_match
</content>
</entry>
<entry>
<title>net caif: Register properly as a pernet subsystem.</title>
<updated>2012-01-28T02:06:03Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-01-26T14:04:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6'/>
<id>urn:sha1:8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6</id>
<content type='text'>
caif is a subsystem and as such it needs to register with
register_pernet_subsys instead of register_pernet_device.

Among other problems using register_pernet_device was resulting in
net_generic being called before the caif_net structure was allocated.
Which has been causing net_generic to fail with either BUG_ON's or by
return NULL pointers.

A more ugly problem that could be caused is packets in flight why the
subsystem is shutting down.

To remove confusion also remove the cruft cause by inappropriately
trying to fix this bug.

With the aid of the previous patch I have tested this patch and
confirmed that using register_pernet_subsys makes the failure go away as
it should.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Sjur Brændeland &lt;sjur.brandeland@stericsson.com&gt;
Tested-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless</title>
<updated>2012-01-28T01:40:18Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-01-28T01:40:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cc0d7b91db000aef1cc12f1d3d4d7f80af9bd419'/>
<id>urn:sha1:cc0d7b91db000aef1cc12f1d3d4d7f80af9bd419</id>
<content type='text'>
</content>
</entry>
<entry>
<title>net: RTNETLINK adjusting values of min_ifinfo_dump_size</title>
<updated>2012-01-26T21:35:57Z</updated>
<author>
<name>Stefan Gula</name>
<email>steweg@gmail.com</email>
</author>
<published>2012-01-26T11:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f18da14565819ba43b8321237e2426a2914cc2ef'/>
<id>urn:sha1:f18da14565819ba43b8321237e2426a2914cc2ef</id>
<content type='text'>
Setting link parameters on a netdevice changes the value
of if_nlmsg_size(), therefore it is necessary to recalculate
min_ifinfo_dump_size.

Signed-off-by: Stefan Gula &lt;steweg@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Fix ip_gre lockless xmits.</title>
<updated>2012-01-26T21:34:08Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2012-01-26T10:34:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f2b3ee9e4200b32d113b1bd3c93f9a836c97357c'/>
<id>urn:sha1:f2b3ee9e4200b32d113b1bd3c93f9a836c97357c</id>
<content type='text'>
Tunnel devices set NETIF_F_LLTX to bypass HARD_TX_LOCK.  Sit and
ipip set this unconditionally in ops-&gt;setup, but gre enables it
conditionally after parameter passing in ops-&gt;newlink. This is
not called during tunnel setup as below, however, so GRE tunnels are
still taking the lock.

modprobe ip_gre
ip tunnel add test0 mode gre remote 10.5.1.1 dev lo
ip link set test0 up
ip addr add 10.6.0.1 dev test0
 # cat /sys/class/net/test0/features
 # $DIR/test_tunnel_xmit 10 10.5.2.1
ip route add 10.5.2.0/24 dev test0
ip tunnel del test0

The newlink callback is only called in rtnl_netlink, and only if
the device is new, as it calls register_netdevice internally. Gre
tunnels are created at 'ip tunnel add' with ioctl SIOCADDTUNNEL,
which calls ipgre_tunnel_locate, which calls register_netdev.
rtnl_newlink is called at 'ip link set', but skips ops-&gt;newlink
and the device is up with locking still enabled. The equivalent
ipip tunnel works fine, btw (just substitute 'method gre' for
'method ipip').

On kernels before /sys/class/net/*/features was removed [1],
the first commented out line returns 0x6000 with method gre,
which indicates that NETIF_F_LLTX (0x1000) is not set. With ipip,
it reports 0x7000. This test cannot be used on recent kernels where
the sysfs file is removed (and ETHTOOL_GFEATURES does not currently
work for tunnel devices, because they lack dev-&gt;ethtool_ops).

The second commented out line calls a simple transmission test [2]
that sends on 24 cores at maximum rate. Results of a single run:

ipip:			19,372,306
gre before patch:	 4,839,753
gre after patch:	19,133,873

This patch replicates the condition check in ipgre_newlink to
ipgre_tunnel_locate. It works for me, both with oseq on and off.
This is the first time I looked at rtnetlink and iproute2 code,
though, so someone more knowledgeable should probably check the
patch. Thanks.

The tail of both functions is now identical, by the way. To avoid
code duplication, I'll be happy to rework this and merge the two.

[1] http://patchwork.ozlabs.org/patch/104610/
[2] http://kernel.googlecode.com/files/xmit_udp_parallel.c

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netns: fix net_alloc_generic()</title>
<updated>2012-01-26T18:36:19Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-26T00:41:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=073862ba5d249c20bd5c49fc6d904ff0e1f6a672'/>
<id>urn:sha1:073862ba5d249c20bd5c49fc6d904ff0e1f6a672</id>
<content type='text'>
When a new net namespace is created, we should attach to it a "struct
net_generic" with enough slots (even empty), or we can hit the following
BUG_ON() :

[  200.752016] kernel BUG at include/net/netns/generic.h:40!
...
[  200.752016]  [&lt;ffffffff825c3cea&gt;] ? get_cfcnfg+0x3a/0x180
[  200.752016]  [&lt;ffffffff821cf0b0&gt;] ? lockdep_rtnl_is_held+0x10/0x20
[  200.752016]  [&lt;ffffffff825c41be&gt;] caif_device_notify+0x2e/0x530
[  200.752016]  [&lt;ffffffff810d61b7&gt;] notifier_call_chain+0x67/0x110
[  200.752016]  [&lt;ffffffff810d67c1&gt;] raw_notifier_call_chain+0x11/0x20
[  200.752016]  [&lt;ffffffff821bae82&gt;] call_netdevice_notifiers+0x32/0x60
[  200.752016]  [&lt;ffffffff821c2b26&gt;] register_netdevice+0x196/0x300
[  200.752016]  [&lt;ffffffff821c2ca9&gt;] register_netdev+0x19/0x30
[  200.752016]  [&lt;ffffffff81c1c67a&gt;] loopback_net_init+0x4a/0xa0
[  200.752016]  [&lt;ffffffff821b5e62&gt;] ops_init+0x42/0x180
[  200.752016]  [&lt;ffffffff821b600b&gt;] setup_net+0x6b/0x100
[  200.752016]  [&lt;ffffffff821b6466&gt;] copy_net_ns+0x86/0x110
[  200.752016]  [&lt;ffffffff810d5789&gt;] create_new_namespaces+0xd9/0x190

net_alloc_generic() should take into account the maximum index into the
ptr array, as a subsystem might use net_generic() anytime.

This also reduces number of reallocations in net_assign_generic()

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Tested-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Sjur Brændeland &lt;sjur.brandeland@stericsson.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
