summaryrefslogtreecommitdiff
path: root/net/openvswitch/vport.h
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-07-21 10:44:05 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-21 10:39:07 -0700
commitc9db965c524ea27451e60d5ddcd242f6c33a70fd (patch)
treec882141fdf3669ef625560b9faf31408b145d298 /net/openvswitch/vport.h
parentbe4ace6e6b1bc12e18b25fe764917e09a1f96d7b (diff)
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 <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport.h')
-rw-r--r--net/openvswitch/vport.h5
1 files changed, 5 insertions, 0 deletions
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);