Skip to content

Commit

Permalink
Merge branch 'ovs-cleanups'
Browse files Browse the repository at this point in the history
Jean Sacren says:

====================
Trivial fix-ups for openvswitch

This series does trivial fix-ups for openvswitch as follows:

1) Clean up the leftover of the unused function.

2) Fix up the twisted struct geneve_port member name.

3) Update the kernel doc to reflect the changes in struct vport.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 11, 2016
2 parents 3c6396d + c5420eb commit 50ee638
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
6 changes: 3 additions & 3 deletions net/openvswitch/vport-geneve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down
23 changes: 2 additions & 21 deletions net/openvswitch/vport.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ 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.
* @hash_node: Element in @dev_table hash table in vport.c.
* @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;
Expand Down Expand Up @@ -204,26 +205,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 */

0 comments on commit 50ee638

Please sign in to comment.