aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-11-07 23:00:24 -0800
committerDavid S. Miller <davem@davemloft.net>2018-11-07 23:00:24 -0800
commitbe08989c4d900d5388be1a7d002cd7c2942d69cd (patch)
treeaca63716df3fdd8a81fac9ae6c7985cedf870b91 /include
parentsfc: add missing NVRAM partition types for EF10 (diff)
parentnfp: flower: include geneve as supported offload tunnel type (diff)
downloadwireguard-linux-be08989c4d900d5388be1a7d002cd7c2942d69cd.tar.xz
wireguard-linux-be08989c4d900d5388be1a7d002cd7c2942d69cd.zip
Merge branch 'nfp-add-and-use-tunnel-netdev-helpers'
John Hurley says: ==================== nfp: add and use tunnel netdev helpers A recent patch introduced the function netif_is_vxlan() to verify the tunnel type of a given netdev as vxlan. Add a similar function to detect geneve netdevs and make use of this function in the NFP driver. Also make use of the vxlan helper where applicable. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/geneve.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/geneve.h b/include/net/geneve.h
index a7600ed55ea3..fc6a7e0a874a 100644
--- a/include/net/geneve.h
+++ b/include/net/geneve.h
@@ -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);