<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-09-24T20:51:53Z</updated>
<entry>
<title>net: guard tcp_set_keepalive() to tcp sockets</title>
<updated>2012-09-24T20:51:53Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-09-24T07:00:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e10986d1d698140747fcfc2761ec9cb64c1d582'/>
<id>urn:sha1:3e10986d1d698140747fcfc2761ec9cb64c1d582</id>
<content type='text'>
Its possible to use RAW sockets to get a crash in
tcp_set_keepalive() / sk_reset_timer()

Fix is to make sure socket is a SOCK_STREAM one.

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: do not disable sg for packets requiring no checksum</title>
<updated>2012-09-21T02:23:40Z</updated>
<author>
<name>Ed Cashin</name>
<email>ecashin@coraid.com</email>
</author>
<published>2012-09-19T15:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0d680e577ff171e7b37dbdb1b1bf5451e851f04'/>
<id>urn:sha1:c0d680e577ff171e7b37dbdb1b1bf5451e851f04</id>
<content type='text'>
A change in a series of VLAN-related changes appears to have
inadvertently disabled the use of the scatter gather feature of
network cards for transmission of non-IP ethernet protocols like ATA
over Ethernet (AoE).  Below is a reference to the commit that
introduces a "harmonize_features" function that turns off scatter
gather when the NIC does not support hardware checksumming for the
ethernet protocol of an sk buff.

  commit f01a5236bd4b140198fbcc550f085e8361fd73fa
  Author: Jesse Gross &lt;jesse@nicira.com&gt;
  Date:   Sun Jan 9 06:23:31 2011 +0000

      net offloading: Generalize netif_get_vlan_features().

The can_checksum_protocol function is not equipped to consider a
protocol that does not require checksumming.  Calling it for a
protocol that requires no checksum is inappropriate.

The patch below has harmonize_features call can_checksum_protocol when
the protocol needs a checksum, so that the network layer is not forced
to perform unnecessary skb linearization on the transmission of AoE
packets.  Unnecessary linearization results in decreased performance
and increased memory pressure, as reported here:

  http://www.spinics.net/lists/linux-mm/msg15184.html

The problem has probably not been widely experienced yet, because
only recently has the kernel.org-distributed aoe driver acquired the
ability to use payloads of over a page in size, with the patchset
recently included in the mm tree:

  https://lkml.org/lkml/2012/8/28/140

The coraid.com-distributed aoe driver already could use payloads of
greater than a page in size, but its users generally do not use the
newest kernels.

Signed-off-by: Ed Cashin &lt;ecashin@coraid.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/core: fix comment in skb_try_coalesce</title>
<updated>2012-09-19T21:29:13Z</updated>
<author>
<name>Li RongQing</name>
<email>roy.qing.li@gmail.com</email>
</author>
<published>2012-09-18T16:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ea853fd0b721f14eacff1a5b364fe3e60d2dd82'/>
<id>urn:sha1:8ea853fd0b721f14eacff1a5b364fe3e60d2dd82</id>
<content type='text'>
It should be the skb which is not cloned

Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix memory leak on oom with zerocopy</title>
<updated>2012-09-18T20:24:00Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2012-09-15T22:44:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e698bf6624c469cd4f3f391247b142963ca9c4e'/>
<id>urn:sha1:0e698bf6624c469cd4f3f391247b142963ca9c4e</id>
<content type='text'>
If orphan flags fails, we don't free the skb
on receive, which leaks the skb memory.

Return value was also wrong: netif_receive_skb
is supposed to return NET_RX_DROP, not ENOMEM.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>pktgen: fix crash with vlan and packet size less than 46</title>
<updated>2012-09-13T21:10:00Z</updated>
<author>
<name>Nishank Trivedi</name>
<email>nistrive@cisco.com</email>
</author>
<published>2012-09-12T13:32:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6af773e786ad617b0264ebe06ba60675c01f3e51'/>
<id>urn:sha1:6af773e786ad617b0264ebe06ba60675c01f3e51</id>
<content type='text'>
If vlan option is being specified in the pktgen and packet size
being requested is less than 46 bytes, despite being illogical
request, pktgen should not crash the kernel.

BUG: unable to handle kernel paging request at ffff88021fb82000
Process kpktgend_0 (pid: 1184, threadinfo ffff880215f1a000, task ffff880218544530)
Call Trace:
[&lt;ffffffffa0637cd2&gt;] ? pktgen_finalize_skb+0x222/0x300 [pktgen]
[&lt;ffffffff814f0084&gt;] ? build_skb+0x34/0x1c0
[&lt;ffffffffa0639b11&gt;] pktgen_thread_worker+0x5d1/0x1790 [pktgen]
[&lt;ffffffffa03ffb10&gt;] ? igb_xmit_frame_ring+0xa30/0xa30 [igb]
[&lt;ffffffff8107ba20&gt;] ? wake_up_bit+0x40/0x40
[&lt;ffffffff8107ba20&gt;] ? wake_up_bit+0x40/0x40
[&lt;ffffffffa0639540&gt;] ? spin+0x240/0x240 [pktgen]
[&lt;ffffffff8107b4e3&gt;] kthread+0x93/0xa0
[&lt;ffffffff81615de4&gt;] kernel_thread_helper+0x4/0x10
[&lt;ffffffff8107b450&gt;] ? flush_kthread_worker+0x80/0x80
[&lt;ffffffff81615de0&gt;] ? gs_change+0x13/0x13

The root cause of why pktgen is not able to handle this case is due
to comparison of signed (datalen) and unsigned data (sizeof), which
eventually passes a huge number to skb_put().

Signed-off-by: Nishank Trivedi &lt;nistrive@cisco.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix net/core/sock.c build error</title>
<updated>2012-09-10T20:44:45Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2012-09-10T16:13:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c463e57b32e3b6a3250fe75d1d56cb598d664e6'/>
<id>urn:sha1:1c463e57b32e3b6a3250fe75d1d56cb598d664e6</id>
<content type='text'>
Fix net/core/sock.c build error when CONFIG_INET is not enabled:

net/built-in.o: In function `sock_edemux':
(.text+0xd396): undefined reference to `inet_twsk_put'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: small bug on rxhash calculation</title>
<updated>2012-09-08T22:41:48Z</updated>
<author>
<name>Chema Gonzalez</name>
<email>chema@google.com</email>
</author>
<published>2012-09-07T13:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6862234238e84648c305526af2edd98badcad1e0'/>
<id>urn:sha1:6862234238e84648c305526af2edd98badcad1e0</id>
<content type='text'>
In the current rxhash calculation function, while the
sorting of the ports/addrs is coherent (you get the
same rxhash for packets sharing the same 4-tuple, in
both directions), ports and addrs are sorted
independently. This implies packets from a connection
between the same addresses but crossed ports hash to
the same rxhash.

For example, traffic between A=S:l and B=L:s is hashed
(in both directions) from {L, S, {s, l}}. The same
rxhash is obtained for packets between C=S:s and D=L:l.

This patch ensures that you either swap both addrs and ports,
or you swap none. Traffic between A and B, and traffic
between C and D, get their rxhash from different sources
({L, S, {l, s}} for A&lt;-&gt;B, and {L, S, {s, l}} for C&lt;-&gt;D)

The patch is co-written with Eric Dumazet &lt;edumazet@google.com&gt;

Signed-off-by: Chema Gonzalez &lt;chema@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sock_edemux() should take care of timewait sockets</title>
<updated>2012-09-03T17:22:43Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-09-02T23:57:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e812347ccf9e8ce073b0ba0c49d03b124707b2b4'/>
<id>urn:sha1:e812347ccf9e8ce073b0ba0c49d03b124707b2b4</id>
<content type='text'>
sock_edemux() can handle either a regular socket or a timewait socket

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netpoll: revert 6bdb7fe3104 and fix be_poll() instead</title>
<updated>2012-08-29T19:03:23Z</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2012-08-24T21:41:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=072a9c48600409d72aeb0d5b29fbb75861a06631'/>
<id>urn:sha1:072a9c48600409d72aeb0d5b29fbb75861a06631</id>
<content type='text'>
Against -net.

In the patch "netpoll: re-enable irq in poll_napi()", I tried to
fix the following warning:

[100718.051041] ------------[ cut here ]------------
[100718.051048] WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x7d/0xb0()
(Not tainted)
[100718.051049] Hardware name: ProLiant BL460c G7
...
[100718.051068] Call Trace:
[100718.051073]  [&lt;ffffffff8106b747&gt;] ? warn_slowpath_common+0x87/0xc0
[100718.051075]  [&lt;ffffffff8106b79a&gt;] ? warn_slowpath_null+0x1a/0x20
[100718.051077]  [&lt;ffffffff810747ed&gt;] ? local_bh_enable_ip+0x7d/0xb0
[100718.051080]  [&lt;ffffffff8150041b&gt;] ? _spin_unlock_bh+0x1b/0x20
[100718.051085]  [&lt;ffffffffa00ee974&gt;] ? be_process_mcc+0x74/0x230 [be2net]
[100718.051088]  [&lt;ffffffffa00ea68c&gt;] ? be_poll_tx_mcc+0x16c/0x290 [be2net]
[100718.051090]  [&lt;ffffffff8144fe76&gt;] ? netpoll_poll_dev+0xd6/0x490
[100718.051095]  [&lt;ffffffffa01d24a5&gt;] ? bond_poll_controller+0x75/0x80 [bonding]
[100718.051097]  [&lt;ffffffff8144fde5&gt;] ? netpoll_poll_dev+0x45/0x490
[100718.051100]  [&lt;ffffffff81161b19&gt;] ? ksize+0x19/0x80
[100718.051102]  [&lt;ffffffff81450437&gt;] ? netpoll_send_skb_on_dev+0x157/0x240

by reenabling IRQ before calling -&gt;poll, but it seems more
problems are introduced after that patch:

http://ozlabs.org/~akpm/stuff/IMG_20120824_122054.jpg
http://marc.info/?l=linux-netdev&amp;m=134563282530588&amp;w=2

So it is safe to fix be2net driver code directly.

This patch reverts the offending commit and fixes be_poll() by
avoid disabling BH there, this is okay because be_poll()
can be called either by poll_napi() which already disables
IRQ, or by net_rx_action() which already disables BH.

Reported-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Reported-by: Sylvain Munaut &lt;s.munaut@whatever-company.com&gt;
Cc: Sylvain Munaut &lt;s.munaut@whatever-company.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Sathya Perla &lt;sathya.perla@emulex.com&gt;
Cc: Subbu Seetharaman &lt;subbu.seetharaman@emulex.com&gt;
Cc: Ajit Khaparde &lt;ajit.khaparde@emulex.com&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Tested-by: Sylvain Munaut &lt;s.munaut@whatever-company.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/core/dev.c: fix kernel-doc warning</title>
<updated>2012-08-20T10:00:55Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2012-08-18T14:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3de7a37b02f607716753dc669c1dca4f71db08fc'/>
<id>urn:sha1:3de7a37b02f607716753dc669c1dca4f71db08fc</id>
<content type='text'>
Fix kernel-doc warning:

Warning(net/core/dev.c:5745): No description found for parameter 'dev'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc:	"David S. Miller" &lt;davem@davemloft.net&gt;
Cc:	netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
