From c9db965c524ea27451e60d5ddcd242f6c33a70fd Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Tue, 21 Jul 2015 10:44:05 +0200 Subject: openvswitch: Abstract vport name through ovs_vport_name() This allows to get rid of the get_name() vport ops later on. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- net/openvswitch/vport.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net/openvswitch/vport.h') diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h index e05ec68439d1..1a689c28b5a6 100644 --- a/net/openvswitch/vport.h +++ b/net/openvswitch/vport.h @@ -237,6 +237,11 @@ static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb, skb->csum = csum_add(skb->csum, csum_partial(start, len, 0)); } +static inline const char *ovs_vport_name(struct vport *vport) +{ + return vport->dev ? vport->dev->name : vport->ops->get_name(vport); +} + int ovs_vport_ops_register(struct vport_ops *ops); void ovs_vport_ops_unregister(struct vport_ops *ops); -- cgit v1.2.3