<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net, branch v2.6.35.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/net?h=v2.6.35.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/net?h=v2.6.35.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-09-27T00:18:14Z</updated>
<entry>
<title>udp: add rehash on connect()</title>
<updated>2010-09-27T00:18:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-09-08T05:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=749f63ed9bf702e588000f1d1ce6290e6c156289'/>
<id>urn:sha1:749f63ed9bf702e588000f1d1ce6290e6c156289</id>
<content type='text'>
commit 719f835853a92f6090258114a72ffe41f09155cd upstream

commit 30fff923 introduced in linux-2.6.33 (udp: bind() optimisation)
added a secondary hash on UDP, hashed on (local addr, local port).

Problem is that following sequence :

fd = socket(...)
connect(fd, &amp;remote, ...)

not only selects remote end point (address and port), but also sets
local address, while UDP stack stored in secondary hash table the socket
while its local address was INADDR_ANY (or ipv6 equivalent)

Sequence is :
 - autobind() : choose a random local port, insert socket in hash tables
              [while local address is INADDR_ANY]
 - connect() : set remote address and port, change local address to IP
              given by a route lookup.

When an incoming UDP frame comes, if more than 10 sockets are found in
primary hash table, we switch to secondary table, and fail to find
socket because its local address changed.

One solution to this problem is to rehash datagram socket if needed.

We add a new rehash(struct socket *) method in "struct proto", and
implement this method for UDP v4 &amp; v6, using a common helper.

This rehashing only takes care of secondary hash table, since primary
hash (based on local port only) is not changed.

Reported-by: Krzysztof Piotr Oledzki &lt;ole@ans.pl&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Tested-by: Krzysztof Piotr Oledzki &lt;ole@ans.pl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>tcp: Prevent overzealous packetization by SWS logic.</title>
<updated>2010-09-27T00:18:14Z</updated>
<author>
<name>Alexey Kuznetsov</name>
<email>kuznet@ms2.inr.ac.ru</email>
</author>
<published>2010-09-15T17:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4275a88aa5891aadb1227631d9e602a1f66f347f'/>
<id>urn:sha1:4275a88aa5891aadb1227631d9e602a1f66f347f</id>
<content type='text'>
[ Upstream commit 01f83d69844d307be2aa6fea88b0e8fe5cbdb2f4 ]

If peer uses tiny MSS (say, 75 bytes) and similarly tiny advertised
window, the SWS logic will packetize to half the MSS unnecessarily.

This causes problems with some embedded devices.

However for large MSS devices we do want to half-MSS packetize
otherwise we never get enough packets into the pipe for things
like fast retransmit and recovery to work.

Be careful also to handle the case where MSS &gt; window, otherwise
we'll never send until the probe timer.

Reported-by: ツ Leandro Melo de Sales &lt;leandroal@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>tcp: Combat per-cpu skew in orphan tests.</title>
<updated>2010-09-27T00:18:13Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-08-25T09:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fd31b5dcb8c69c007705caa9dccdaa371f21b4f0'/>
<id>urn:sha1:fd31b5dcb8c69c007705caa9dccdaa371f21b4f0</id>
<content type='text'>
[ Upstream commit ad1af0fedba14f82b240a03fe20eb9b2fdbd0357 ]

As reported by Anton Blanchard when we use
percpu_counter_read_positive() to make our orphan socket limit checks,
the check can be off by up to num_cpus_online() * batch (which is 32
by default) which on a 128 cpu machine can be as large as the default
orphan limit itself.

Fix this by doing the full expensive sum check if the optimized check
triggers.

Reported-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>net sched: fix race in mirred device removal</title>
<updated>2010-07-25T04:04:20Z</updated>
<author>
<name>stephen hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2010-07-22T18:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b87956ea645fb4de7e59c7d0aa94de04be72615'/>
<id>urn:sha1:3b87956ea645fb4de7e59c7d0aa94de04be72615</id>
<content type='text'>
This fixes hang when target device of mirred packet classifier
action is removed.

If a mirror or redirection action is configured to cause packets
to go to another device, the classifier holds a ref count, but was assuming
the adminstrator cleaned up all redirections before removing. The fix
is to add a notifier and cleanup during unregister.

The new list is implicitly protected by RTNL mutex because
it is held during filter add/delete as well as notifier.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Acked-by: Jamal Hadi Salim &lt;hadi@cyberus.ca&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix problem in reading sock TX queue</title>
<updated>2010-07-15T03:50:29Z</updated>
<author>
<name>Tom Herbert</name>
<email>therbert@google.com</email>
</author>
<published>2010-07-15T03:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b0f77d0eae0c58a5a9691a067ada112ceeae2d00'/>
<id>urn:sha1:b0f77d0eae0c58a5a9691a067ada112ceeae2d00</id>
<content type='text'>
Fix problem in reading the tx_queue recorded in a socket.  In
dev_pick_tx, the TX queue is read by doing a check with
sk_tx_queue_recorded on the socket, followed by a sk_tx_queue_get.
The problem is that there is not mutual exclusion across these
calls in the socket so it it is possible that the queue in the
sock can be invalidated after sk_tx_queue_recorded is called so
that sk_tx_queue get returns -1, which sets 65535 in queue_index
and thus dev_pick_tx returns 65536 which is a bogus queue and
can cause crash in dev_queue_xmit.

We fix this by only calling sk_tx_queue_get which does the proper
checks.  The interface is that sk_tx_queue_get returns the TX queue
if the sock argument is non-NULL and TX queue is recorded, else it
returns -1.  sk_tx_queue_recorded is no longer used so it can be
completely removed.

Signed-off-by: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: decreasing real_num_tx_queues needs to flush qdisc</title>
<updated>2010-07-03T04:59:07Z</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2010-07-01T13:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f0796d5c73e59786d09a1e617689d1d415f2db44'/>
<id>urn:sha1:f0796d5c73e59786d09a1e617689d1d415f2db44</id>
<content type='text'>
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()  =&gt; hash using real_num_tx_queues
		skb_set_queue_mapping()
	...
	qdisc_enqueue_root() =&gt; enqueue skb on txq from hash
...
dev-&gt;real_num_tx_queues -= n
...
sch_direct_xmit()
	dev_hard_start_xmit()
		ndo_start_xmit(skb,dev) =&gt; skb queue set with old hash

skbs are enqueued on the qdisc with skb-&gt;queue_mapping set
0 &lt; queue_mappings &lt; 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 &lt;john.r.fastabend@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock</title>
<updated>2010-07-03T04:59:07Z</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2010-07-01T13:21:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4ef6acff83222f4496ceef7d1f0ee9e50a5bb403'/>
<id>urn:sha1:4ef6acff83222f4496ceef7d1f0ee9e50a5bb403</id>
<content type='text'>
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 &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: fix XFRMA_MARK extraction in xfrm_mark_get</title>
<updated>2010-06-30T17:43:31Z</updated>
<author>
<name>Andreas Steffen</name>
<email>andreas.steffen@strongswan.org</email>
</author>
<published>2010-06-30T17:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4efd7e833591721bec21cc4730a7f6261417840f'/>
<id>urn:sha1:4efd7e833591721bec21cc4730a7f6261417840f</id>
<content type='text'>
Determine the size of the xfrm_mark struct, not of its pointer.

Signed-off-by: Andreas Steffen &lt;andreas.steffen@strongswan.org&gt;
Acked-by: Jamal Hadi Salim &lt;hadi@cyberus.ca&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>snmp: fix SNMP_ADD_STATS()</title>
<updated>2010-06-23T18:48:19Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-06-23T00:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f1c14b2e3b1805d3e9e6a306d07f5371ea703a7'/>
<id>urn:sha1:8f1c14b2e3b1805d3e9e6a306d07f5371ea703a7</id>
<content type='text'>
commit aa2ea0586d9d (tcp: fix outsegs stat for TSO segments) incorrectly
assumed SNMP_ADD_STATS() was used from BH context.

Fix this using mib[!in_softirq()] instead of mib[0]

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: check for refcount if pop a stacked dst_entry</title>
<updated>2010-06-04T22:56:00Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2010-06-04T01:57:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8764ab2ca7ab5055e1ca80f9cfa4970c34acb804'/>
<id>urn:sha1:8764ab2ca7ab5055e1ca80f9cfa4970c34acb804</id>
<content type='text'>
xfrm triggers a warning if dst_pop() drops a refcount
on a noref dst. This patch changes dst_pop() to
skb_dst_pop(). skb_dst_pop() drops the refcnt only
on a refcounted dst. Also we don't clone the child
dst_entry, so it is not refcounted and we can use
skb_dst_set_noref() in xfrm_output_one().

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
