<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/core/flow_dissector.c, branch v3.7</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>ipv6: add ipv6_addr_hash() helper</title>
<updated>2012-07-18T18:28:46+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-07-18T08:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ddbe503203855939946430e39bae58de11b70b69'/>
<id>ddbe503203855939946430e39bae58de11b70b69</id>
<content type='text'>
Introduce ipv6_addr_hash() helper doing a XOR on all bits
of an IPv6 address, with an optimized x86_64 version.

Use it in flow dissector, as suggested by Andrew McGregor,
to reduce hash collision probabilities in fq_codel (and other
users of flow dissector)

Use it in ip6_tunnel.c and use more bit shuffling, as suggested
by David Laight, as existing hash was ignoring most of them.

Use it in sunrpc and use more bit shuffling, using hash_32().

Use it in net/ipv6/addrconf.c, using hash_32() as well.

As a cleanup, use it in net/ipv4/tcp_metrics.c

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Andrew McGregor &lt;andrewmcgr@gmail.com&gt;
Cc: Dave Taht &lt;dave.taht@gmail.com&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Cc: David Laight &lt;David.Laight@ACULAB.COM&gt;
Cc: Joe Perches &lt;joe@perches.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>
Introduce ipv6_addr_hash() helper doing a XOR on all bits
of an IPv6 address, with an optimized x86_64 version.

Use it in flow dissector, as suggested by Andrew McGregor,
to reduce hash collision probabilities in fq_codel (and other
users of flow dissector)

Use it in ip6_tunnel.c and use more bit shuffling, as suggested
by David Laight, as existing hash was ignoring most of them.

Use it in sunrpc and use more bit shuffling, using hash_32().

Use it in net/ipv6/addrconf.c, using hash_32() as well.

As a cleanup, use it in net/ipv4/tcp_metrics.c

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Andrew McGregor &lt;andrewmcgr@gmail.com&gt;
Cc: Dave Taht &lt;dave.taht@gmail.com&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Cc: David Laight &lt;David.Laight@ACULAB.COM&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: flow_dissector.c missing include linux/export.h</title>
<updated>2012-01-24T21:03:33+00:00</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>hawk@comx.dk</email>
</author>
<published>2012-01-24T21:03:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c452ed70771cea3af73d21a5914989137fbd28b8'/>
<id>c452ed70771cea3af73d21a5914989137fbd28b8</id>
<content type='text'>
The file net/core/flow_dissector.c seems to be missing
including linux/export.h.

Signed-off-by: Jesper Dangaard Brouer &lt;hawk@comx.dk&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>
The file net/core/flow_dissector.c seems to be missing
including linux/export.h.

Signed-off-by: Jesper Dangaard Brouer &lt;hawk@comx.dk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>flow_dissector: use a 64bit load/store</title>
<updated>2011-11-29T18:17:03+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-11-28T20:30:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4d77d2b567ec66a443792d99e96ac760991d80d0'/>
<id>4d77d2b567ec66a443792d99e96ac760991d80d0</id>
<content type='text'>
Le lundi 28 novembre 2011 à 19:06 -0500, David Miller a écrit :
&gt; From: Dimitris Michailidis &lt;dm@chelsio.com&gt;
&gt; Date: Mon, 28 Nov 2011 08:25:39 -0800
&gt;
&gt; &gt;&gt; +bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys
&gt; &gt;&gt; *flow)
&gt; &gt;&gt; +{
&gt; &gt;&gt; +	int poff, nhoff = skb_network_offset(skb);
&gt; &gt;&gt; +	u8 ip_proto;
&gt; &gt;&gt; +	u16 proto = skb-&gt;protocol;
&gt; &gt;
&gt; &gt; __be16 instead of u16 for proto?
&gt;
&gt; I'll take care of this when I apply these patches.

( CC trimmed )

Thanks David !

Here is a small patch to use one 64bit load/store on x86_64 instead of
two 32bit load/stores.

[PATCH net-next] flow_dissector: use a 64bit load/store

gcc compiler is smart enough to use a single load/store if we
memcpy(dptr, sptr, 8) on x86_64, regardless of
CONFIG_CC_OPTIMIZE_FOR_SIZE

In IP header, daddr immediately follows saddr, this wont change in the
future. We only need to make sure our flow_keys (src,dst) fields wont
break the rule.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@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>
Le lundi 28 novembre 2011 à 19:06 -0500, David Miller a écrit :
&gt; From: Dimitris Michailidis &lt;dm@chelsio.com&gt;
&gt; Date: Mon, 28 Nov 2011 08:25:39 -0800
&gt;
&gt; &gt;&gt; +bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys
&gt; &gt;&gt; *flow)
&gt; &gt;&gt; +{
&gt; &gt;&gt; +	int poff, nhoff = skb_network_offset(skb);
&gt; &gt;&gt; +	u8 ip_proto;
&gt; &gt;&gt; +	u16 proto = skb-&gt;protocol;
&gt; &gt;
&gt; &gt; __be16 instead of u16 for proto?
&gt;
&gt; I'll take care of this when I apply these patches.

( CC trimmed )

Thanks David !

Here is a small patch to use one 64bit load/store on x86_64 instead of
two 32bit load/stores.

[PATCH net-next] flow_dissector: use a 64bit load/store

gcc compiler is smart enough to use a single load/store if we
memcpy(dptr, sptr, 8) on x86_64, regardless of
CONFIG_CC_OPTIMIZE_FOR_SIZE

In IP header, daddr immediately follows saddr, this wont change in the
future. We only need to make sure our flow_keys (src,dst) fields wont
break the rule.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: introduce skb_flow_dissect()</title>
<updated>2011-11-29T00:09:07+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-11-28T05:22:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0744dd00c1b1be99a25b62b1b48df440e82e57e0'/>
<id>0744dd00c1b1be99a25b62b1b48df440e82e57e0</id>
<content type='text'>
We use at least two flow dissectors in network stack, with known
limitations and code duplication.

Introduce skb_flow_dissect() to factorize this, highly inspired from
existing dissector from __skb_get_rxhash()

Note : We extensively use skb_header_pointer(), this permits us to not
touch skb at all.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@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>
We use at least two flow dissectors in network stack, with known
limitations and code duplication.

Introduce skb_flow_dissect() to factorize this, highly inspired from
existing dissector from __skb_get_rxhash()

Note : We extensively use skb_header_pointer(), this permits us to not
touch skb at all.

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