Open vSwitch
Subsystems (3)
Three bug fixes that are fairly small either way but resolve obviously incorrect code. For net/3.11.
The following changes since commit ad81f0545ef01ea651886dddac4bef6cec930092:
Linux 3.11-rc1 (2013-07-14 15:18:27 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch.git fixes
for you to fetch changes up to 36bf5cc66d60868bcc10aff209defed5a7b71c1d:
openvswitch: Reset tunnel key between input and output. (2013-08-14 15:50:36 -0700)
----------------------------------------------------------------
Jesse Gross (2):
openvswitch: Fix bad merge resolution.
openvswitch: Reset tunnel key between input and output.
Pravin B Shelar (1):
openvswitch: Use correct type while allocating flex array.
net/openvswitch/actions.c | 1 + net/openvswitch/datapath.c | 3 --- net/openvswitch/flow.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
PATCH 1/3 openvswitch: Fix bad merge resolution.
In reply to a message not in the archivegit silently included an extra hunk in vport_cmd_set() during automatic merging. This code is unreachable so it does not actually introduce a problem but it is clearly incorrect.
--- net/openvswitch/datapath.c | 3 --- 1 file changed, 3 deletions(-)
net/openvswitch/datapath.c +0 -3
@@ -2076,9 +2076,6 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info)ovs_notify (reply, info, &ovs_dp_vport_multicast_group);return 0 ; -rtnl_unlock (); -return 0 ; - exit_free:kfree_skb (reply); exit_unlock:
Signature · 1 line
1.8.1.2
PATCH 3/3 openvswitch: Reset tunnel key between input and output.
In reply to a message not in the archiveIt doesn't make sense to output a tunnel packet using the same parameters that it was received with since that will generally just result in the packet going back to us. As a result, userspace assumes that the tunnel key is cleared when transitioning through the switch. In the majority of cases this doesn't matter since a packet is either going to a tunnel port (in which the key is overwritten with new values) or to a non-tunnel port (in which case the key is ignored). However, it's theoreticaly possible that userspace could rely on the documented behavior, so this corrects it.
--- net/openvswitch/actions.c | 1 + 1 file changed, 1 insertion(+)
net/openvswitch/actions.c +1 -0
@@ -535,6 +535,7 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb) {struct sw_flow_actions *acts =rcu_dereference (OVS_CB (skb)->flow->sf_acts); +OVS_CB (skb)->tun_key =NULL ;return do_execute_actions (dp, skb, acts->actions, acts->actions_len, false); }
Signature · 1 line
1.8.1.2
PATCH 2/3 openvswitch: Use correct type while allocating flex array.
In reply to Jesse GrossFrom: Pravin B Shelar <[email protected]>
Flex array is used to allocate hash buckets which is type struct hlist_head, but we use struct hlist_head * to calculate array size. Since hlist_head is of size pointer it works fine.
Following patch use correct type.
--- net/openvswitch/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/openvswitch/flow.c +1 -1
@@ -240,7 +240,7 @@ static struct flex_array *alloc_buckets(unsigned int n_buckets)struct flex_array *buckets;int i, err; - buckets =flex_array_alloc (sizeof (struct hlist_head *), + buckets =flex_array_alloc (sizeof (struct hlist_head ), n_buckets,GFP_KERNEL );if (!buckets)return NULL ;
Signature · 1 line
1.8.1.2
David Miller
maintainerFrom: Jesse Gross <[email protected]>
Date: Wed, 14 Aug 2013 16:19:04 -0700
Quoted 2 lines
Three bug fixes that are fairly small either way but resolve obviously incorrect code. For
net/3.11.
Pulled, thanks Jesse.