hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/net/geneve.h
....@@ -4,6 +4,8 @@
44
55 #include <net/udp_tunnel.h>
66
7
+#define GENEVE_UDP_PORT 6081
8
+
79 /* Geneve Header:
810 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
911 * |Ver| Opt Len |O|C| Rsvd. | Protocol Type |
....@@ -60,6 +62,12 @@
6062 struct geneve_opt options[];
6163 };
6264
65
+static inline bool netif_is_geneve(const struct net_device *dev)
66
+{
67
+ return dev->rtnl_link_ops &&
68
+ !strcmp(dev->rtnl_link_ops->kind, "geneve");
69
+}
70
+
6371 #ifdef CONFIG_INET
6472 struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
6573 u8 name_assign_type, u16 dst_port);