<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/core, branch v2.6.30.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>pktgen: do not access flows[] beyond its length</title>
<updated>2009-05-21T22:07:12+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2009-05-21T22:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b5f792a6a9a2f9ae812d151ed621f72e99b1725'/>
<id>5b5f792a6a9a2f9ae812d151ed621f72e99b1725</id>
<content type='text'>
typo -- pkt_dev-&gt;nflows is for stats only, the number of concurrent
flows is stored in cflows.

Reported-By: Vladimir Ivashchenko &lt;hazard@francoudi.com&gt;
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
typo -- pkt_dev-&gt;nflows is for stats only, the number of concurrent
flows is stored in cflows.

Reported-By: Vladimir Ivashchenko &lt;hazard@francoudi.com&gt;
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fix skb_seq_read returning wrong offset/length for page frag data</title>
<updated>2009-05-19T04:43:27+00:00</updated>
<author>
<name>Thomas Chenault</name>
<email>thomas_chenault@dell.com</email>
</author>
<published>2009-05-19T04:43:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=995b337952cdf7e05d288eede580257b632a8343'/>
<id>995b337952cdf7e05d288eede580257b632a8343</id>
<content type='text'>
When called with a consumed value that is less than skb_headlen(skb)
bytes into a page frag, skb_seq_read() incorrectly returns an
offset/length relative to skb-&gt;data. Ensure that data which should come
from a page frag does.

Signed-off-by: Thomas Chenault &lt;thomas_chenault@dell.com&gt;
Tested-by: Shyam Iyer &lt;shyam_iyer@dell.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When called with a consumed value that is less than skb_headlen(skb)
bytes into a page frag, skb_seq_read() incorrectly returns an
offset/length relative to skb-&gt;data. Ensure that data which should come
from a page frag does.

Signed-off-by: Thomas Chenault &lt;thomas_chenault@dell.com&gt;
Tested-by: Shyam Iyer &lt;shyam_iyer@dell.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pkt_sched: gen_estimator: use 64 bit intermediate counters for bps</title>
<updated>2009-05-19T02:26:37+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2009-05-19T02:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=511e11e396dc596825ce04d53d7f6d579404bc01'/>
<id>511e11e396dc596825ce04d53d7f6d579404bc01</id>
<content type='text'>
gen_estimator can overflow bps (bytes per second) with Gb links, while
it was designed with a u32 API, with a theorical limit of 34360Mbit
(2^32 bytes)

Using 64 bit intermediate avbps/brate counters can allow us to reach
this theorical limit.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gen_estimator can overflow bps (bytes per second) with Gb links, while
it was designed with a u32 API, with a theorical limit of 34360Mbit
(2^32 bytes)

Using 64 bit intermediate avbps/brate counters can allow us to reach
this theorical limit.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netpoll: don't dereference NULL dev from np</title>
<updated>2009-05-18T03:37:55+00:00</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2009-05-11T00:36:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e392739d6ab72f7c35040aa07f4097904bce6e7'/>
<id>5e392739d6ab72f7c35040aa07f4097904bce6e7</id>
<content type='text'>
It looks like the dev in netpoll_poll can be NULL - at lease it's
checked at the function beginning. Thus the dev-&gt;netde_ops dereference
looks dangerous.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It looks like the dev in netpoll_poll can be NULL - at lease it's
checked at the function beginning. Thus the dev-&gt;netde_ops dereference
looks dangerous.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: update skb_recycle_check() for hardware timestamping changes</title>
<updated>2009-05-06T23:49:18+00:00</updated>
<author>
<name>Lennert Buytenhek</name>
<email>buytenh@wantstofly.org</email>
</author>
<published>2009-05-06T23:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b805007545813d276c844f0f6d6c825b07c6aec6'/>
<id>b805007545813d276c844f0f6d6c825b07c6aec6</id>
<content type='text'>
Commit ac45f602ee3d1b6f326f68bc0c2591ceebf05ba4 ("net: infrastructure
for hardware time stamping") added two skb initialization actions to
__alloc_skb(), which need to be added to skb_recycle_check() as well.

Signed-off-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit ac45f602ee3d1b6f326f68bc0c2591ceebf05ba4 ("net: infrastructure
for hardware time stamping") added two skb initialization actions to
__alloc_skb(), which need to be added to skb_recycle_check() as well.

Signed-off-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Fix skb_tx_hash() for forwarding workloads.</title>
<updated>2009-05-01T16:05:06+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2009-05-01T16:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ec581f6a42bbbea5271c66da9769a41b46c74e10'/>
<id>ec581f6a42bbbea5271c66da9769a41b46c74e10</id>
<content type='text'>
When skb_rx_queue_recorded() is true, we dont want to use jash distribution
as the device driver exactly told us which queue was selected at RX time.
jhash makes a statistical shuffle, but this wont work with 8 static inputs.

Later improvements would be to compute reciprocal value of real_num_tx_queues
to avoid a divide here. But this computation should be done once,
when real_num_tx_queues is set. This needs a separate patch, and a new
field in struct net_device.

Reported-by: Andrew Dickinson &lt;andrew@whydna.net&gt;
Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When skb_rx_queue_recorded() is true, we dont want to use jash distribution
as the device driver exactly told us which queue was selected at RX time.
jhash makes a statistical shuffle, but this wont work with 8 static inputs.

Later improvements would be to compute reciprocal value of real_num_tx_queues
to avoid a divide here. But this computation should be done once,
when real_num_tx_queues is set. This needs a separate patch, and a new
field in struct net_device.

Reported-by: Andrew Dickinson &lt;andrew@whydna.net&gt;
Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Fix oops when splicing skbs from a frag_list.</title>
<updated>2009-04-30T12:41:19+00:00</updated>
<author>
<name>Jarek Poplawski</name>
<email>jarkao2@gmail.com</email>
</author>
<published>2009-04-30T12:41:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7a67e56fd362d3edfde1f19170893508c3940d3a'/>
<id>7a67e56fd362d3edfde1f19170893508c3940d3a</id>
<content type='text'>
Lennert Buytenhek wrote:
&gt; Since 4fb669948116d928ae44262ab7743732c574630d ("net: Optimize memory
&gt; usage when splicing from sockets.") I'm seeing this oops (e.g. in
&gt; 2.6.30-rc3) when splicing from a TCP socket to /dev/null on a driver
&gt; (mv643xx_eth) that uses LRO in the skb mode (lro_receive_skb) rather
&gt; than the frag mode:

My patch incorrectly assumed skb-&gt;sk was always valid, but for
"frag_listed" skbs we can only use skb-&gt;sk of their parent.

Reported-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Debugged-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Tested-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lennert Buytenhek wrote:
&gt; Since 4fb669948116d928ae44262ab7743732c574630d ("net: Optimize memory
&gt; usage when splicing from sockets.") I'm seeing this oops (e.g. in
&gt; 2.6.30-rc3) when splicing from a TCP socket to /dev/null on a driver
&gt; (mv643xx_eth) that uses LRO in the skb mode (lro_receive_skb) rather
&gt; than the frag mode:

My patch incorrectly assumed skb-&gt;sk was always valid, but for
"frag_listed" skbs we can only use skb-&gt;sk of their parent.

Reported-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Debugged-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Tested-by: Lennert Buytenhek &lt;buytenh@wantstofly.org&gt;
Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Avoid extra wakeups of threads blocked in wait_for_packet()</title>
<updated>2009-04-28T09:24:21+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2009-04-28T09:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bf368e4e70cd4e0f880923c44e95a4273d725ab4'/>
<id>bf368e4e70cd4e0f880923c44e95a4273d725ab4</id>
<content type='text'>
In 2.6.25 we added UDP mem accounting.

This unfortunatly added a penalty when a frame is transmitted, since
we have at TX completion time to call sock_wfree() to perform necessary
memory accounting. This calls sock_def_write_space() and utimately
scheduler if any thread is waiting on the socket.
Thread(s) waiting for an incoming frame was scheduled, then had to sleep
again as event was meaningless.

(All threads waiting on a socket are using same sk_sleep anchor)

This adds lot of extra wakeups and increases latencies, as noted
by Christoph Lameter, and slows down softirq handler.

Reference : http://marc.info/?l=linux-netdev&amp;m=124060437012283&amp;w=2 

Fortunatly, Davide Libenzi recently added concept of keyed wakeups
into kernel, and particularly for sockets (see commit
37e5540b3c9d838eb20f2ca8ea2eb8072271e403 
epoll keyed wakeups: make sockets use keyed wakeups)

Davide goal was to optimize epoll, but this new wakeup infrastructure
can help non epoll users as well, if they care to setup an appropriate
handler.

This patch introduces new DEFINE_WAIT_FUNC() helper and uses it
in wait_for_packet(), so that only relevant event can wakeup a thread
blocked in this function.

Trace of function calls from bnx2 TX completion bnx2_poll_work() is :
__kfree_skb()
 skb_release_head_state()
  sock_wfree()
   sock_def_write_space()
    __wake_up_sync_key()
     __wake_up_common()
      receiver_wake_function() : Stops here since thread is waiting for an INPUT


Reported-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 2.6.25 we added UDP mem accounting.

This unfortunatly added a penalty when a frame is transmitted, since
we have at TX completion time to call sock_wfree() to perform necessary
memory accounting. This calls sock_def_write_space() and utimately
scheduler if any thread is waiting on the socket.
Thread(s) waiting for an incoming frame was scheduled, then had to sleep
again as event was meaningless.

(All threads waiting on a socket are using same sk_sleep anchor)

This adds lot of extra wakeups and increases latencies, as noted
by Christoph Lameter, and slows down softirq handler.

Reference : http://marc.info/?l=linux-netdev&amp;m=124060437012283&amp;w=2 

Fortunatly, Davide Libenzi recently added concept of keyed wakeups
into kernel, and particularly for sockets (see commit
37e5540b3c9d838eb20f2ca8ea2eb8072271e403 
epoll keyed wakeups: make sockets use keyed wakeups)

Davide goal was to optimize epoll, but this new wakeup infrastructure
can help non epoll users as well, if they care to setup an appropriate
handler.

This patch introduces new DEFINE_WAIT_FUNC() helper and uses it
in wait_for_packet(), so that only relevant event can wakeup a thread
blocked in this function.

Trace of function calls from bnx2 TX completion bnx2_poll_work() is :
__kfree_skb()
 skb_release_head_state()
  sock_wfree()
   sock_def_write_space()
    __wake_up_sync_key()
     __wake_up_common()
      receiver_wake_function() : Stops here since thread is waiting for an INPUT


Reported-by: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Fix GRO for multiple page fragments</title>
<updated>2009-04-20T09:20:30+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2009-04-16T08:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5db8765a86a4cbaf45adaf8c231cf9a6ca2dcfaf'/>
<id>5db8765a86a4cbaf45adaf8c231cf9a6ca2dcfaf</id>
<content type='text'>
This loop over fragments in napi_fraginfo_skb() was "interesting".

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This loop over fragments in napi_fraginfo_skb() was "interesting".

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fix "compatibility" typos</title>
<updated>2009-04-20T09:15:01+00:00</updated>
<author>
<name>Marcin Slusarz</name>
<email>marcin.slusarz@gmail.com</email>
</author>
<published>2009-04-19T07:24:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eb39c57ff7782bc015da517af1d9c3b2592e721e'/>
<id>eb39c57ff7782bc015da517af1d9c3b2592e721e</id>
<content type='text'>
Signed-off-by: Marcin Slusarz &lt;marcin.slusarz@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Marcin Slusarz &lt;marcin.slusarz@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
