net: add netif_is_geneve()
[linux-2.6-microblaze.git] / include / net / geneve.h
index a7600ed..fc6a7e0 100644 (file)
@@ -60,6 +60,12 @@ struct genevehdr {
        struct geneve_opt options[];
 };
 
+static inline bool netif_is_geneve(const struct net_device *dev)
+{
+       return dev->rtnl_link_ops &&
+              !strcmp(dev->rtnl_link_ops->kind, "geneve");
+}
+
 #ifdef CONFIG_INET
 struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
                                        u8 name_assign_type, u16 dst_port);