<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/openvswitch/flow.c, branch v3.18</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-10-18T03:54:02Z</updated>
<entry>
<title>openvswitch: Set flow-key members.</title>
<updated>2014-10-18T03:54:02Z</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2014-10-17T20:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=25ef1328a03c72a7285883d5b337c4b602476ecd'/>
<id>urn:sha1:25ef1328a03c72a7285883d5b337c4b602476ecd</id>
<content type='text'>
This patch adds missing memset which are required to initialize
flow key member. For example for IP flow we need to initialize
ip.frag for all cases.

Found by inspection.

This bug is introduced by commit 0714812134d7dcadeb7ecfbfeb18788aa7e1eaac
("openvswitch: Eliminate memset() from flow_extract").

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: fix a use after free</title>
<updated>2014-10-17T20:21:53Z</updated>
<author>
<name>Li RongQing</name>
<email>roy.qing.li@gmail.com</email>
</author>
<published>2014-10-17T06:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=389f48947a5a37ea283de520abb742d42174edb0'/>
<id>urn:sha1:389f48947a5a37ea283de520abb742d42174edb0</id>
<content type='text'>
pskb_may_pull() called by arphdr_ok can change skb-&gt;data, so put the arp
setting after arphdr_ok to avoid the use the freed memory

Fixes: 0714812134d7d ("openvswitch: Eliminate memset() from flow_extract.")
Cc: Jesse Gross &lt;jesse@nicira.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.com&gt;
Acked-by: Jesse Gross &lt;jesse@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: Add support for Geneve tunneling.</title>
<updated>2014-10-06T04:32:21Z</updated>
<author>
<name>Jesse Gross</name>
<email>jesse@nicira.com</email>
</author>
<published>2014-10-03T22:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5796684069e0c71c65bce6a6d4766114aec1396'/>
<id>urn:sha1:f5796684069e0c71c65bce6a6d4766114aec1396</id>
<content type='text'>
The Openvswitch implementation is completely agnostic to the options
that are in use and can handle newly defined options without
further work. It does this by simply matching on a byte array
of options and allowing userspace to setup flows on this array.

Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
Singed-off-by: Ansis Atteka &lt;aatteka@nicira.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Thomas Graf &lt;tgraf@noironetworks.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: Wrap struct ovs_key_ipv4_tunnel in a new structure.</title>
<updated>2014-10-06T04:32:20Z</updated>
<author>
<name>Jesse Gross</name>
<email>jesse@nicira.com</email>
</author>
<published>2014-10-03T22:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0b128c1e2cc33ad104daf0f51a51e34f7763c5f'/>
<id>urn:sha1:f0b128c1e2cc33ad104daf0f51a51e34f7763c5f</id>
<content type='text'>
Currently, the flow information that is matched for tunnels and
the tunnel data passed around with packets is the same. However,
as additional information is added this is not necessarily desirable,
as in the case of pointers.

This adds a new structure for tunnel metadata which currently contains
only the existing struct. This change is purely internal to the kernel
since the current OVS_KEY_ATTR_IPV4_TUNNEL is simply a compressed version
of OVS_KEY_ATTR_TUNNEL that is translated at flow setup.

Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: Eliminate memset() from flow_extract.</title>
<updated>2014-10-06T04:32:20Z</updated>
<author>
<name>Jesse Gross</name>
<email>jesse@nicira.com</email>
</author>
<published>2014-10-03T22:35:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0714812134d7dcadeb7ecfbfeb18788aa7e1eaac'/>
<id>urn:sha1:0714812134d7dcadeb7ecfbfeb18788aa7e1eaac</id>
<content type='text'>
As new protocols are added, the size of the flow key tends to
increase although few protocols care about all of the fields. In
order to optimize this for hashing and matching, OVS uses a variable
length portion of the key. However, when fields are extracted from
the packet we must still zero out the entire key.

This is no longer necessary now that OVS implements masking. Any
fields (or holes in the structure) which are not part of a given
protocol will be by definition not part of the mask and zeroed out
during lookup. Furthermore, since masking already uses variable
length keys this zeroing operation automatically benefits as well.

In principle, the only thing that needs to be done at this point
is remove the memset() at the beginning of flow. However, some
fields assume that they are initialized to zero, which now must be
done explicitly. In addition, in the event of an error we must also
zero out corresponding fields to signal that there is no valid data
present. These increase the total amount of code but very little of
it is executed in non-error situations.

Removing the memset() reduces the profile of ovs_flow_extract()
from 0.64% to 0.56% when tested with large packets on a 10G link.

Suggested-by: Pravin Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: Add recirc and hash action.</title>
<updated>2014-09-16T06:28:14Z</updated>
<author>
<name>Andy Zhou</name>
<email>azhou@nicira.com</email>
</author>
<published>2014-09-16T02:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=971427f353f3c42c8dcef62e7124440df68eb809'/>
<id>urn:sha1:971427f353f3c42c8dcef62e7124440df68eb809</id>
<content type='text'>
Recirc action allows a packet to reenter openvswitch processing.
currently openvswitch lookup flow for packet received and execute
set of actions on that packet, with help of recirc action we can
process/modify the packet and recirculate it back in openvswitch
for another pass.

OVS hash action calculates 5-tupple hash and set hash in flow-key
hash. This can be used along with recirculation for distributing
packets among different ports for bond devices.
For example:
OVS bonding can use following actions:
Match on: bond flow; Action: hash, recirc(id)
Match on: recirc-id == id and hash lower bits == a;
          Action: output port_bond_a

Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Jesse Gross &lt;jesse@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Use tun_key only for egress tunnel path.</title>
<updated>2014-09-16T06:28:13Z</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2014-09-16T02:28:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c8b1b83fcdd0f05e1f66ed6f8a2e831d5d374a2'/>
<id>urn:sha1:8c8b1b83fcdd0f05e1f66ed6f8a2e831d5d374a2</id>
<content type='text'>
Currently tun_key is used for passing tunnel information
on ingress and egress path, this cause confusion.  Following
patch removes its use on ingress path make it egress only parameter.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Acked-by: Andy Zhou &lt;azhou@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: refactor ovs flow extract API.</title>
<updated>2014-09-16T06:28:13Z</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2014-09-16T02:20:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=83c8df26a3b654871c0503fcf6eac61777e12ea1'/>
<id>urn:sha1:83c8df26a3b654871c0503fcf6eac61777e12ea1</id>
<content type='text'>
OVS flow extract is called on packet receive or packet
execute code path.  Following patch defines separate API
for extracting flow-key in packet execute code path.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Acked-by: Andy Zhou &lt;azhou@nicira.com&gt;
</content>
</entry>
<entry>
<title>net/openvswitch/flow.c: Replace rcu_dereference() with rcu_access_pointer()</title>
<updated>2014-08-22T19:23:10Z</updated>
<author>
<name>Andreea-Cristina Bernat</name>
<email>bernat.ada@gmail.com</email>
</author>
<published>2014-08-17T13:29:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c6b00c816191ded80d1ccd5164b53168255ec15'/>
<id>urn:sha1:8c6b00c816191ded80d1ccd5164b53168255ec15</id>
<content type='text'>
The "rcu_dereference()" call is used directly in a condition.
Since its return value is never dereferenced it is recommended to use
"rcu_access_pointer()" instead of "rcu_dereference()".
Therefore, this patch makes the replacement.

The following Coccinelle semantic patch was used:
@@
@@

(
 if(
 (&lt;+...
- rcu_dereference
+ rcu_access_pointer
  (...)
  ...+&gt;)) {...}
|
 while(
 (&lt;+...
- rcu_dereference
+ rcu_access_pointer
  (...)
  ...+&gt;)) {...}
)

Signed-off-by: Andreea-Cristina Bernat &lt;bernat.ada@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: Fix tracking of flags seen in TCP flows.</title>
<updated>2014-06-29T21:10:51Z</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@nicira.com</email>
</author>
<published>2014-05-06T23:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad55200734c65a3ec5d0c39d6ea904008baea536'/>
<id>urn:sha1:ad55200734c65a3ec5d0c39d6ea904008baea536</id>
<content type='text'>
Flow statistics need to take into account the TCP flags from the packet
currently being processed (in 'key'), not the TCP flags matched by the
flow found in the kernel flow table (in 'flow').

This bug made the Open vSwitch userspace fin_timeout action have no effect
in many cases.
This bug is introduced by commit 88d73f6c411ac2f0578 (openvswitch: Use
TCP flags in the flow key for stats.)

Reported-by: Len Gao &lt;leng@vmware.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@nicira.com&gt;
Acked-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Acked-by: Jesse Gross &lt;jesse@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
</feed>
