<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/netfilter.h, branch v3.4-rc3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v3.4-rc3</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v3.4-rc3'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2012-02-24T09:05:59Z</updated>
<entry>
<title>static keys: Introduce 'struct static_key', static_key_true()/false() and static_key_slow_[inc|dec]()</title>
<updated>2012-02-24T09:05:59Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2012-02-24T07:31:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c5905afb0ee6550b42c49213da1c22d67316c194'/>
<id>urn:sha1:c5905afb0ee6550b42c49213da1c22d67316c194</id>
<content type='text'>
So here's a boot tested patch on top of Jason's series that does
all the cleanups I talked about and turns jump labels into a
more intuitive to use facility. It should also address the
various misconceptions and confusions that surround jump labels.

Typical usage scenarios:

        #include &lt;linux/static_key.h&gt;

        struct static_key key = STATIC_KEY_INIT_TRUE;

        if (static_key_false(&amp;key))
                do unlikely code
        else
                do likely code

Or:

        if (static_key_true(&amp;key))
                do likely code
        else
                do unlikely code

The static key is modified via:

        static_key_slow_inc(&amp;key);
        ...
        static_key_slow_dec(&amp;key);

The 'slow' prefix makes it abundantly clear that this is an
expensive operation.

I've updated all in-kernel code to use this everywhere. Note
that I (intentionally) have not pushed through the rename
blindly through to the lowest levels: the actual jump-label
patching arch facility should be named like that, so we want to
decouple jump labels from the static-key facility a bit.

On non-jump-label enabled architectures static keys default to
likely()/unlikely() branches.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Jason Baron &lt;jbaron@redhat.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: a.p.zijlstra@chello.nl
Cc: mathieu.desnoyers@efficios.com
Cc: davem@davemloft.net
Cc: ddaney.cavm@gmail.com
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: http://lkml.kernel.org/r/20120222085809.GA26397@elte.hu
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>netfilter: use jump_label for nf_hooks</title>
<updated>2011-11-21T21:38:08Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-11-18T17:32:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a2d7ec58ac09f30ab726f216827f7c7095b2a98f'/>
<id>urn:sha1:a2d7ec58ac09f30ab726f216827f7c7095b2a98f</id>
<content type='text'>
On configs where CONFIG_JUMP_LABEL=y, we can replace in fast path a
load/compare/conditional jump by a single jump with no dcache reference.

Jump target is modified as soon as nf_hooks[pf][hook] switches from
empty state to non empty states. jump_label state is kept outside of
nf_hooks array so has no cost on cpu caches.

This patch removes the test on CONFIG_NETFILTER_DEBUG : No need to call
nf_hook_slow() at all if nf_hooks[pf][hook] is empty, this didnt give
useful information, but slowed down things a lot.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add linux/sysctl.h includes where needed.</title>
<updated>2011-05-27T17:40:58Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-26T20:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=bee95250f015ffc3a6efb99516489e70d1b52da2'/>
<id>urn:sha1:bee95250f015ffc3a6efb99516489e70d1b52da2</id>
<content type='text'>
Several networking headers were depending upon the implicit
linux/sysctl.h include they get when including linux/net.h

Add explicit includes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: af_info: add 'strict' parameter to limit lookup to .oif</title>
<updated>2011-04-04T15:00:54Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2011-04-04T15:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=0fae2e7740aca7e384c5f337f458897e7e337d58'/>
<id>urn:sha1:0fae2e7740aca7e384c5f337f458897e7e337d58</id>
<content type='text'>
ipv6 fib lookup can set RT6_LOOKUP_F_IFACE flag to restrict search
to an interface, but this flag cannot be set via struct flowi.

Also, it cannot be set via ip6_route_output: this function uses the
passed sock struct to determine if this flag is required
(by testing for nonzero sk_bound_dev_if).

Work around this by passing in an artificial struct sk in case
'strict' argument is true.

This is required to replace the rt6_lookup call in xt_addrtype.c with
nf_afinfo-&gt;route().

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: af_info: add network namespace parameter to route hook</title>
<updated>2011-04-04T14:56:29Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2011-04-04T14:56:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=31ad3dd64e689bc79dd819f8f134b9b025240eb8'/>
<id>urn:sha1:31ad3dd64e689bc79dd819f8f134b9b025240eb8</id>
<content type='text'>
This is required to eventually replace the rt6_lookup call in
xt_addrtype.c with nf_afinfo-&gt;route().

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: allow NFQUEUE bypass if no listener is available</title>
<updated>2011-01-18T15:08:30Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2011-01-18T15:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=94b27cc36123069966616670c3653cd6873babe9'/>
<id>urn:sha1:94b27cc36123069966616670c3653cd6873babe9</id>
<content type='text'>
If an skb is to be NF_QUEUE'd, but no program has opened the queue, the
packet is dropped.

This adds a v2 target revision of xt_NFQUEUE that allows packets to
continue through the ruleset instead.

Because the actual queueing happens outside of the target context, the
'bypass' flag has to be communicated back to the netfilter core.

Unfortunately the only choice to do this without adding a new function
argument is to use the target function return value (i.e. the verdict).

In the NF_QUEUE case, the upper 16bit already contain the queue number
to use.  The previous patch reduced NF_VERDICT_MASK to 0xff, i.e.
we now have extra room for a new flag.

If a hook issued a NF_QUEUE verdict, then the netfilter core will
continue packet processing if the queueing hook
returns -ESRCH (== "this queue does not exist") and the new
NF_VERDICT_FLAG_QUEUE_BYPASS flag is set in the verdict value.

Note: If the queue exists, but userspace does not consume packets fast
enough, the skb will still be dropped.

Signed-off-by: Florian Westphal &lt;fwestphal@astaro.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: reduce NF_VERDICT_MASK to 0xff</title>
<updated>2011-01-18T14:52:14Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2011-01-18T14:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f615df76ed862b7d3927ec5f55b805ca19be29d9'/>
<id>urn:sha1:f615df76ed862b7d3927ec5f55b805ca19be29d9</id>
<content type='text'>
NF_VERDICT_MASK is currently 0xffff. This is because the upper
16 bits are used to store errno (for NF_DROP) or the queue number
(NF_QUEUE verdict).

As there are up to 0xffff different queues available, there is no more
room to store additional flags.

At the moment there are only 6 different verdicts, i.e. we can reduce
NF_VERDICT_MASK to 0xff to allow storing additional flags in the 0xff00 space.

NF_VERDICT_BITS would then be reduced to 8, but because the value is
exported to userspace, this might cause breakage; e.g.:

e.g. 'queuenr = (1 &lt;&lt; NF_VERDICT_BITS) | NF_QUEUE'  would now break.

Thus, remove NF_VERDICT_BITS usage in the kernel and move the old value
to the 'userspace compat' section.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 into HEAD</title>
<updated>2011-01-13T01:29:21Z</updated>
<author>
<name>Simon Horman</name>
<email>horms@verge.net.au</email>
</author>
<published>2011-01-13T01:29:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=fee1cc0895fd7bde875a86bbc3a1e82089e540b8'/>
<id>urn:sha1:fee1cc0895fd7bde875a86bbc3a1e82089e540b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>netfilter: allow hooks to pass error code back up the stack</title>
<updated>2010-11-17T18:54:34Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-11-16T11:52:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=da6836500414ae734cd9873c2d553db594f831e9'/>
<id>urn:sha1:da6836500414ae734cd9873c2d553db594f831e9</id>
<content type='text'>
SELinux would like to pass certain fatal errors back up the stack.  This patch
implements the generic netfilter support for this functionality.

Based-on-patch-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: add __rcu annotations</title>
<updated>2010-11-15T17:17:21Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-11-15T17:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=0e60ebe04c51807db972d03665651ae6b5c26d7e'/>
<id>urn:sha1:0e60ebe04c51807db972d03665651ae6b5c26d7e</id>
<content type='text'>
Add some __rcu annotations and use helpers to reduce number of sparse
warnings (CONFIG_SPARSE_RCU_POINTER=y)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
</feed>
