<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/openvswitch/datapath.c, branch v3.16</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.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-07-01T03:47:15Z</updated>
<entry>
<title>openvswitch: Use exact lookup for flow_get and flow_del.</title>
<updated>2014-07-01T03:47:15Z</updated>
<author>
<name>Alex Wang</name>
<email>alexw@nicira.com</email>
</author>
<published>2014-07-01T03:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a46b24e147dfa9b858026da02cad0bdd4e149d2'/>
<id>urn:sha1:4a46b24e147dfa9b858026da02cad0bdd4e149d2</id>
<content type='text'>
Due to the race condition in userspace, there is chance that two
overlapping megaflows could be installed in datapath.  And this
causes userspace unable to delete the less inclusive megaflow flow
even after it timeout, since the flow_del logic will stop at the
first match of masked flow.

This commit fixes the bug by making the kernel flow_del and flow_get
logic check all masks in that case.

Introduced by 03f0d916a (openvswitch: Mega flow implementation).

Signed-off-by: Alex Wang &lt;alexw@nicira.com&gt;
Acked-by: Andy Zhou &lt;azhou@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&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>
<entry>
<title>openvswitch: Simplify genetlink code.</title>
<updated>2014-05-22T23:27:37Z</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2014-05-06T23:44:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c200ef94c9492205e18a18c25650cf27939889c'/>
<id>urn:sha1:0c200ef94c9492205e18a18c25650cf27939889c</id>
<content type='text'>
Following patch get rid of struct genl_family_and_ops which is
redundant due to changes to struct genl_family.

Signed-off-by: Kyle Mestery &lt;mestery@noironetworks.com&gt;
Acked-by: Kyle Mestery &lt;mestery@noironetworks.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Minimize ovs_flow_cmd_new|set critical sections.</title>
<updated>2014-05-22T23:27:36Z</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-05-05T22:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=893f139b9a6c00c097b9082a90f3041cfb3a0d20'/>
<id>urn:sha1:893f139b9a6c00c097b9082a90f3041cfb3a0d20</id>
<content type='text'>
Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Split ovs_flow_cmd_new_or_set().</title>
<updated>2014-05-22T23:27:36Z</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-05-05T21:53:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37bdc87ba00dadd0156db77ba48224d042202435'/>
<id>urn:sha1:37bdc87ba00dadd0156db77ba48224d042202435</id>
<content type='text'>
Following patch will be easier to reason about with separate
ovs_flow_cmd_new() and ovs_flow_cmd_set() functions.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Minimize ovs_flow_cmd_del critical section.</title>
<updated>2014-05-22T23:27:36Z</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-05-05T21:40:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aed067783e505bf66dcafa8647d08619eb5b1c55'/>
<id>urn:sha1:aed067783e505bf66dcafa8647d08619eb5b1c55</id>
<content type='text'>
ovs_flow_cmd_del() now allocates reply (if needed) after the flow has
already been removed from the flow table.  If the reply allocation
fails, a netlink error is signaled with netlink_set_err(), as is
already done in ovs_flow_cmd_new_or_set() in the similar situation.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Reduce locking requirements.</title>
<updated>2014-05-22T23:27:36Z</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-05-05T21:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e9796b4af9ef490e203158cb738a5a4986eb75c'/>
<id>urn:sha1:0e9796b4af9ef490e203158cb738a5a4986eb75c</id>
<content type='text'>
Reduce and clarify locking requirements for ovs_flow_cmd_alloc_info(),
ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info().

A datapath pointer is available only when holding a lock.  Change
ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info() to take a
dp_ifindex directly, rather than a datapath pointer that is then
(only) used to get the dp_ifindex.  This is useful, since the
dp_ifindex is available even when the datapath pointer is not, both
before and after taking a lock, which makes further critical section
reduction possible.

Make ovs_flow_cmd_alloc_info() take an 'acts' argument instead a
'flow' pointer.  This allows some future patches to do the allocation
before acquiring the flow pointer.

The locking requirements after this patch are:

ovs_flow_cmd_alloc_info(): May be called without locking, must not be
called while holding the RCU read lock (due to memory allocation).
If 'acts' belong to a flow in the flow table, however, then the
caller must hold ovs_mutex.

ovs_flow_cmd_fill_info(): Either ovs_mutex or RCU read lock must be held.

ovs_flow_cmd_build_info(): This calls both of the above, so the caller
must hold ovs_mutex.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Minimize dp and vport critical sections.</title>
<updated>2014-05-22T23:27:35Z</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-05-05T21:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6093ae9abac18871afd0bbc5cf093dff53112fcb'/>
<id>urn:sha1:6093ae9abac18871afd0bbc5cf093dff53112fcb</id>
<content type='text'>
Move most memory allocations away from the ovs_mutex critical
sections.  vport allocations still happen while the lock is taken, as
changing that would require major refactoring. Also, vports are
created very rarely so it should not matter.

Change ovs_dp_cmd_get() now only takes the rcu_read_lock(), rather
than ovs_lock(), as nothing need to be changed.  This was done by
ovs_vport_cmd_get() already.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Build flow cmd netlink reply only if needed.</title>
<updated>2014-05-22T23:27:34Z</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-05-05T20:13:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb5d1e9e127ad1542e5db20cd8620a1509baef69'/>
<id>urn:sha1:fb5d1e9e127ad1542e5db20cd8620a1509baef69</id>
<content type='text'>
Use netlink_has_listeners() and NLM_F_ECHO flag to determine if a
reply is needed or not for OVS_FLOW_CMD_NEW, OVS_FLOW_CMD_SET, or
OVS_FLOW_CMD_DEL.  Currently, OVS userspace does not request a reply
for OVS_FLOW_CMD_NEW, but usually does for OVS_FLOW_CMD_DEL, as stats
may have changed.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
<entry>
<title>openvswitch: Clarify locking.</title>
<updated>2014-05-22T23:27:34Z</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-05-05T18:32:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb6f9a708d4067713afae2e9eb2637f6b4c01ecb'/>
<id>urn:sha1:bb6f9a708d4067713afae2e9eb2637f6b4c01ecb</id>
<content type='text'>
Remove unnecessary locking from functions that are always called with
appropriate locking.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Thomas Graf &lt;tgraf@redhat.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
</entry>
</feed>
