<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/net/flow_keys.h, branch v3.3.5</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>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>
