<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/sch_generic.h, branch v3.0.62</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/net/sch_generic.h?h=v3.0.62</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/net/sch_generic.h?h=v3.0.62'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-07-16T15:47:37Z</updated>
<entry>
<title>bonding: Fix corrupted queue_mapping</title>
<updated>2012-07-16T15:47:37Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-12T06:03:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=76886430203577bfa3b437630058aa0346cb3168'/>
<id>urn:sha1:76886430203577bfa3b437630058aa0346cb3168</id>
<content type='text'>
[ Upstream commit 5ee31c6898ea5537fcea160999d60dc63bc0c305 ]

In the transmit path of the bonding driver, skb-&gt;cb is used to
stash the skb-&gt;queue_mapping so that the bonding device can set its
own queue mapping.  This value becomes corrupted since the skb-&gt;cb is
also used in __dev_xmit_skb.

When transmitting through bonding driver, bond_select_queue is
called from dev_queue_xmit.  In bond_select_queue the original
skb-&gt;queue_mapping is copied into skb-&gt;cb (via bond_queue_mapping)
and skb-&gt;queue_mapping is overwritten with the bond driver queue.

Subsequently in dev_queue_xmit, __dev_xmit_skb is called which writes
the packet length into skb-&gt;cb, thereby overwriting the stashed
queue mappping.  In bond_dev_queue_xmit (called from hard_start_xmit),
the queue mapping for the skb is set to the stashed value which is now
the skb length and hence is an invalid queue for the slave device.

If we want to save skb-&gt;queue_mapping into skb-&gt;cb[], best place is to
add a field in struct qdisc_skb_cb, to make sure it wont conflict with
other layers (eg : Qdiscc, Infiniband...)

This patchs also makes sure (struct qdisc_skb_cb)-&gt;data is aligned on 8
bytes :

netem qdisc for example assumes it can store an u64 in it, without
misalignment penalty.

Note : we only have 20 bytes left in (struct qdisc_skb_cb)-&gt;data[].
The largest user is CHOKe and it fills it.

Based on a previous patch from Tom Herbert.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Tom Herbert &lt;therbert@google.com&gt;
Cc: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: Make qdisc_skb_cb upper size bound explicit.</title>
<updated>2012-03-01T00:33:44Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-02-06T20:14:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c3e8445f6ec4ad66c5143d6df8528f7440429b91'/>
<id>urn:sha1:c3e8445f6ec4ad66c5143d6df8528f7440429b91</id>
<content type='text'>
[ Upstream commit 16bda13d90c8d5da243e2cfa1677e62ecce26860 ]

Just like skb-&gt;cb[], so that qdisc_skb_cb can be encapsulated inside
of other data structures.

This is intended to be used by IPoIB so that it can remember
addressing information stored at hard_header_ops-&gt;create() time that
it can fetch when the packet gets to the transmit routine.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net_sched: fix THROTTLED/RUNNING race</title>
<updated>2011-03-24T07:13:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-03-24T07:13:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef352e7cdf714596f51ad18809404edeaa50e8fd'/>
<id>urn:sha1:ef352e7cdf714596f51ad18809404edeaa50e8fd</id>
<content type='text'>
commit fd245a4adb52 (net_sched: move TCQ_F_THROTTLED flag)
added a race.

qdisc_watchdog() is run from softirq, so special care should be taken or
we can lose one state transition (THROTTLED/RUNNING)

Prior to fd245a4adb52, we were manipulating q-&gt;flags (qdisc-&gt;flags &amp;=
~TCQ_F_THROTTLED;) and this manipulation could only race with
qdisc_warn_nonwc().

Since we want to avoid atomic ops in qdisc fast path - it was the
meaning of commit 371121057607e (QDISC_STATE_RUNNING dont need atomic
bit ops) - fix is to move THROTTLE bit into 'state' field, this one
being manipulated with SMP and IRQ safe operations.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-03-04T05:27:42Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-03-04T05:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a0e9ae1bd788bc19adc4d4ae08c98b233697402'/>
<id>urn:sha1:0a0e9ae1bd788bc19adc4d4ae08c98b233697402</id>
<content type='text'>
Conflicts:
	drivers/net/bnx2x/bnx2x.h
</content>
</entry>
<entry>
<title>net_sched: reduce fifo qdisc size</title>
<updated>2011-03-03T19:10:02Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-03-03T19:10:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d276055c4e90a7278cd5167ba9755c9b214bcff7'/>
<id>urn:sha1:d276055c4e90a7278cd5167ba9755c9b214bcff7</id>
<content type='text'>
Because of various alignements [SLUB / qdisc], we use 512 bytes of
memory for one {p|b}fifo qdisc, instead of 256 bytes on 64bit arches and
192 bytes on 32bit ones.

Move the "u32 limit" inside "struct Qdisc" (no impact on other qdiscs)

Change qdisc_alloc(), first trying a regular allocation before an
oversized one.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: long word align struct qdisc_skb_cb data</title>
<updated>2011-02-23T22:17:02Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-02-23T07:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9e924cf4078e377b84e2fd24ae11a61be7c6f5a3'/>
<id>urn:sha1:9e924cf4078e377b84e2fd24ae11a61be7c6f5a3</id>
<content type='text'>
netem_skb_cb() does :

return (struct netem_skb_cb *)qdisc_skb_cb(skb)-&gt;data;

Unfortunatly struct qdisc_skb_cb data is not long word aligned, so
access to psched_time_t time_to_send uses a non aligned access.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-01-24T22:09:35Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-01-24T22:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5bdc22a56549e7983c6b443298672641952ea035'/>
<id>urn:sha1:5bdc22a56549e7983c6b443298672641952ea035</id>
<content type='text'>
Conflicts:
	net/sched/sch_hfsc.c
	net/sched/sch_htb.c
	net/sched/sch_tbf.c
</content>
</entry>
<entry>
<title>net_sched: accurate bytes/packets stats/rates</title>
<updated>2011-01-21T07:31:33Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-01-21T07:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9190b3b3208d052d98cb601fcc192f3f71a5658b'/>
<id>urn:sha1:9190b3b3208d052d98cb601fcc192f3f71a5658b</id>
<content type='text'>
In commit 44b8288308ac9d (net_sched: pfifo_head_drop problem), we fixed
a problem with pfifo_head drops that incorrectly decreased
sch-&gt;bstats.bytes and sch-&gt;bstats.packets

Several qdiscs (CHOKe, SFQ, pfifo_head, ...) are able to drop a
previously enqueued packet, and bstats cannot be changed, so
bstats/rates are not accurate (over estimated)

This patch changes the qdisc_bstats updates to be done at dequeue() time
instead of enqueue() time. bstats counters no longer account for dropped
frames, and rates are more correct, since enqueue() bursts dont have
effect on dequeue() rate.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: RCU conversion of stab</title>
<updated>2011-01-21T00:59:32Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-01-20T03:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2da570d62fcb9e8816f6920e1ec02c706b289fa'/>
<id>urn:sha1:a2da570d62fcb9e8816f6920e1ec02c706b289fa</id>
<content type='text'>
This patch converts stab qdisc management to RCU, so that we can perform
the qdisc_calculate_pkt_len() call before getting qdisc lock.

This shortens the lock's held time in __dev_xmit_skb().

This permits more qdiscs to get TCQ_F_CAN_BYPASS status, avoiding lot of
cache misses and so reducing latencies.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Jesper Dangaard Brouer &lt;hawk@diku.dk&gt;
CC: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
CC: Jamal Hadi Salim &lt;hadi@cyberus.ca&gt;
CC: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: move TCQ_F_THROTTLED flag</title>
<updated>2011-01-21T00:59:32Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-01-20T05:27:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fd245a4adb5288eac37250875f237c40a20a1944'/>
<id>urn:sha1:fd245a4adb5288eac37250875f237c40a20a1944</id>
<content type='text'>
In commit 371121057607e (net: QDISC_STATE_RUNNING dont need atomic bit
ops) I moved QDISC_STATE_RUNNING flag to __state container, located in
the cache line containing qdisc lock and often dirtied fields.

I now move TCQ_F_THROTTLED bit too, so that we let first cache line read
mostly, and shared by all cpus. This should speedup HTB/CBQ for example.

Not using test_bit()/__clear_bit()/__test_and_set_bit allows to use an
"unsigned int" for __state container, reducing by 8 bytes Qdisc size.

Introduce helpers to hide implementation details.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Jesper Dangaard Brouer &lt;hawk@diku.dk&gt;
CC: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
CC: Jamal Hadi Salim &lt;hadi@cyberus.ca&gt;
CC: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
