<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sched/act_api.c, branch linux-4.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-11-15T06:48:51Z</updated>
<entry>
<title>net_sched: reorder pernet ops and act ops registrations</title>
<updated>2016-11-15T06:48:51Z</updated>
<author>
<name>WANG Cong</name>
</author>
<published>2016-10-11T17:56:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50b43ad1dce67ac96e3955b57d370461ac34d6c1'/>
<id>urn:sha1:50b43ad1dce67ac96e3955b57d370461ac34d6c1</id>
<content type='text'>
[ Upstream commit ab102b80cef28c20b3ef7794806c3a982c6444fc ]

Krister reported a kernel NULL pointer dereference after
tcf_action_init_1() invokes a_o-&gt;init(), it is a race condition
where one thread calling tcf_register_action() to initialize
the netns data after putting act ops in the global list and
the other thread searching the list and then calling
a_o-&gt;init(net, ...).

Fix this by moving the pernet ops registration before making
the action ops visible. This is fine because: a) we don't
rely on act_base in pernet ops-&gt;init(), b) in the worst case we
have a fully initialized netns but ops is still not ready so
new actions still can't be created.

Reported-by: Krister Johansen &lt;kjlx@templeofstupid.com&gt;
Tested-by: Krister Johansen &lt;kjlx@templeofstupid.com&gt;
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.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_sched: convert tcf_exts from list to pointer array</title>
<updated>2016-08-17T23:27:51Z</updated>
<author>
<name>WANG Cong</name>
</author>
<published>2016-08-14T05:35:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22dc13c837c33207548c8ee5116b64e2930a6e23'/>
<id>urn:sha1:22dc13c837c33207548c8ee5116b64e2930a6e23</id>
<content type='text'>
As pointed out by Jamal, an action could be shared by
multiple filters, so we can't use list to chain them
any more after we get rid of the original tc_action.
Instead, we could just save pointers to these actions
in tcf_exts, since they are refcount'ed, so convert
the list to an array of pointers.

The "ugly" part is the action API still accepts list
as a parameter, I just introduce a helper function to
convert the array of pointers to a list, instead of
relying on the C99 feature to iterate the array.

Fixes: a85a970af265 ("net_sched: move tc_action into tcf_common")
Reported-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: remove an unnecessary list_del()</title>
<updated>2016-08-17T23:27:51Z</updated>
<author>
<name>WANG Cong</name>
</author>
<published>2016-08-14T05:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=824a7e8863b3eb283343f891b11a782b4ec0d0de'/>
<id>urn:sha1:824a7e8863b3eb283343f891b11a782b4ec0d0de</id>
<content type='text'>
This list_del() for tc action is not needed actually,
because we only use this list to chain bulk operations,
therefore should not be carried for latter operations.

Fixes: ec0595cc4495 ("net_sched: get rid of struct tcf_common")
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: remove the leftover cleanup_a()</title>
<updated>2016-08-17T23:27:51Z</updated>
<author>
<name>WANG Cong</name>
</author>
<published>2016-08-14T05:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f07fed82ad7994cc4d779ee79bdf7a46848c4b8f'/>
<id>urn:sha1:f07fed82ad7994cc4d779ee79bdf7a46848c4b8f</id>
<content type='text'>
After refactoring tc_action into tcf_common, we no
longer need to cleanup temporary "actions" in list,
they are permanently stored in the hashtable.

Fixes: a85a970af265 ("net_sched: move tc_action into tcf_common")
Reported-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: get rid of struct tcf_common</title>
<updated>2016-07-26T04:49:20Z</updated>
<author>
<name>WANG Cong</name>
</author>
<published>2016-07-25T23:09:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec0595cc4495be579309b4bfd5e997af0f2ae6f9'/>
<id>urn:sha1:ec0595cc4495be579309b4bfd5e997af0f2ae6f9</id>
<content type='text'>
After the previous patch, struct tc_action should be enough
to represent the generic tc action, tcf_common is not necessary
any more. This patch gets rid of it to make tc action code
more readable.

Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: move tc_action into tcf_common</title>
<updated>2016-07-26T04:49:19Z</updated>
<author>
<name>WANG Cong</name>
</author>
<published>2016-07-25T23:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a85a970af265f156740977168b542234511b28a8'/>
<id>urn:sha1:a85a970af265f156740977168b542234511b28a8</id>
<content type='text'>
struct tc_action is confusing, currently we use it for two purposes:
1) Pass in arguments and carry out results from helper functions
2) A generic representation for tc actions

The first one is error-prone, since we need to make sure we don't
miss anything. This patch aims to get rid of this use, by moving
tc_action into tcf_common, so that they are allocated together
in hashtable and can be cast'ed easily.

And together with the following patch, we could really make
tc_action a generic representation for all tc actions and each
type of action can inherit from it.

Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-06-30T09:03:36Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2016-06-30T09:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee58b57100ca953da7320c285315a95db2f7053d'/>
<id>urn:sha1:ee58b57100ca953da7320c285315a95db2f7053d</id>
<content type='text'>
Several cases of overlapping changes, except the packet scheduler
conflicts which deal with the addition of the free list parameter
to qdisc_enqueue().

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net sched actions: bug fix dumping actions directly didnt produce NLMSG_DONE</title>
<updated>2016-06-15T21:02:53Z</updated>
<author>
<name>Jamal Hadi Salim</name>
</author>
<published>2016-06-13T22:08:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebecaa6662b0a9c3590bd644a4cec6f9d96818b7'/>
<id>urn:sha1:ebecaa6662b0a9c3590bd644a4cec6f9d96818b7</id>
<content type='text'>
This refers to commands to direct action access as follows:

sudo tc actions add action drop index 12
sudo tc actions add action pipe index 10

And then dumping them like so:
sudo tc actions ls action gact

iproute2 worked because it depended on absence of TCA_ACT_TAB TLV
as end of message.
This fix has been tested with iproute2 and is backward compatible.

Signed-off-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Acked-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: make tcf_hash_check() boolean</title>
<updated>2016-06-15T19:43:35Z</updated>
<author>
<name>WANG Cong</name>
</author>
<published>2016-06-13T20:46:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2313077ed0db35ee186905d8076a737248edd24'/>
<id>urn:sha1:b2313077ed0db35ee186905d8076a737248edd24</id>
<content type='text'>
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sched: do not acquire qdisc spinlock in qdisc/class stats dump</title>
<updated>2016-06-07T23:37:14Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-06-06T16:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edb09eb17ed89eaa82a52dd306beac93e292b485'/>
<id>urn:sha1:edb09eb17ed89eaa82a52dd306beac93e292b485</id>
<content type='text'>
Large tc dumps (tc -s {qdisc|class} sh dev ethX) done by Google BwE host
agent [1] are problematic at scale :

For each qdisc/class found in the dump, we currently lock the root qdisc
spinlock in order to get stats. Sampling stats every 5 seconds from
thousands of HTB classes is a challenge when the root qdisc spinlock is
under high pressure. Not only the dumps take time, they also slow
down the fast path (queue/dequeue packets) by 10 % to 20 % in some cases.

An audit of existing qdiscs showed that sch_fq_codel is the only qdisc
that might need the qdisc lock in fq_codel_dump_stats() and
fq_codel_dump_class_stats()

In v2 of this patch, I now use the Qdisc running seqcount to provide
consistent reads of packets/bytes counters, regardless of 32/64 bit arches.

I also changed rate estimators to use the same infrastructure
so that they no longer need to lock root qdisc lock.

[1]
http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43838.pdf

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Cc: John Fastabend &lt;john.fastabend@gmail.com&gt;
Cc: Kevin Athey &lt;kda@google.com&gt;
Cc: Xiaotian Pei &lt;xiaotian@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
