From 5ea030429fed07ea47e45152202d6ecb24133374 Mon Sep 17 00:00:00 2001 From: Jean Sacren Date: Sat, 9 Jan 2016 16:07:09 -0700 Subject: [PATCH 1/3] openvswitch: clean up unused function commit 6b001e682e90 ("openvswitch: Use Geneve device.") The commit above deleted the only call site of ovs_tunnel_route_lookup() and now that function is not used any more. So let's delete the function definition as well. Signed-off-by: Jean Sacren Acked-by: Thomas Graf Signed-off-by: David S. Miller --- net/openvswitch/vport.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h index 8ea3a96980acf..f00bb153ad131 100644 --- a/net/openvswitch/vport.h +++ b/net/openvswitch/vport.h @@ -204,26 +204,6 @@ int __ovs_vport_ops_register(struct vport_ops *ops); }) void ovs_vport_ops_unregister(struct vport_ops *ops); - -static inline struct rtable *ovs_tunnel_route_lookup(struct net *net, - const struct ip_tunnel_key *key, - u32 mark, - struct flowi4 *fl, - u8 protocol) -{ - struct rtable *rt; - - memset(fl, 0, sizeof(*fl)); - fl->daddr = key->u.ipv4.dst; - fl->saddr = key->u.ipv4.src; - fl->flowi4_tos = RT_TOS(key->tos); - fl->flowi4_mark = mark; - fl->flowi4_proto = protocol; - - rt = ip_route_output_key(net, fl); - return rt; -} - void ovs_vport_send(struct vport *vport, struct sk_buff *skb); #endif /* vport.h */ From 2f7066ada15c865eeab5a3f6c69dcf58d196e349 Mon Sep 17 00:00:00 2001 From: Jean Sacren Date: Sat, 9 Jan 2016 16:07:10 -0700 Subject: [PATCH 2/3] openvswitch: fix struct geneve_port member name commit 6b001e682e90 ("openvswitch: Use Geneve device.") The commit above introduced 'port_no' as the name for the member of struct geneve_port. The correct name should be 'dst_port' as described in the kernel doc. Let's fix that member name and all the pertinent instances so that both doc and code would be consistent. Signed-off-by: Jean Sacren Acked-by: Thomas Graf Signed-off-by: David S. Miller --- net/openvswitch/vport-geneve.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c index e41cd12d9b2d1..30ab8e127288d 100644 --- a/net/openvswitch/vport-geneve.c +++ b/net/openvswitch/vport-geneve.c @@ -34,7 +34,7 @@ static struct vport_ops ovs_geneve_vport_ops; * @dst_port: destination port. */ struct geneve_port { - u16 port_no; + u16 dst_port; }; static inline struct geneve_port *geneve_vport(const struct vport *vport) @@ -47,7 +47,7 @@ static int geneve_get_options(const struct vport *vport, { struct geneve_port *geneve_port = geneve_vport(vport); - if (nla_put_u16(skb, OVS_TUNNEL_ATTR_DST_PORT, geneve_port->port_no)) + if (nla_put_u16(skb, OVS_TUNNEL_ATTR_DST_PORT, geneve_port->dst_port)) return -EMSGSIZE; return 0; } @@ -83,7 +83,7 @@ static struct vport *geneve_tnl_create(const struct vport_parms *parms) return vport; geneve_port = geneve_vport(vport); - geneve_port->port_no = dst_port; + geneve_port->dst_port = dst_port; rtnl_lock(); dev = geneve_dev_create_fb(net, parms->name, NET_NAME_USER, dst_port); From c5420eb12f8e26dd2951c5acc954ca4848f488cb Mon Sep 17 00:00:00 2001 From: Jean Sacren Date: Sat, 9 Jan 2016 16:07:11 -0700 Subject: [PATCH 3/3] openvswitch: update kernel doc for struct vport commit be4ace6e6b1b ("openvswitch: Move dev pointer into vport itself") The commit above added @dev and moved @rcu to the bottom of struct vport, but the change was not reflected in the kernel doc. So let's update the kernel doc as well. Signed-off-by: Jean Sacren Cc: Thomas Graf Acked-by: Thomas Graf Signed-off-by: David S. Miller --- net/openvswitch/vport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h index f00bb153ad131..c10899cb90408 100644 --- a/net/openvswitch/vport.h +++ b/net/openvswitch/vport.h @@ -70,7 +70,7 @@ struct vport_portids { /** * struct vport - one port within a datapath - * @rcu: RCU callback head for deferred destruction. + * @dev: Pointer to net_device. * @dp: Datapath to which this port belongs. * @upcall_portids: RCU protected 'struct vport_portids'. * @port_no: Index into @dp's @ports array. @@ -78,6 +78,7 @@ struct vport_portids { * @dp_hash_node: Element in @datapath->ports hash table in datapath.c. * @ops: Class structure. * @detach_list: list used for detaching vport in net-exit call. + * @rcu: RCU callback head for deferred destruction. */ struct vport { struct net_device *dev;