mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 19:00:53 +07:00
371bd1061d
geneve_core module handles send and receive functionality. This way OVS could use the Geneve API. Now with use of tunnel meatadata mode OVS can directly use Geneve netdevice. So there is no need for separate module for Geneve. Following patch consolidates Geneve protocol processing in single module. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Reviewed-by: Jesse Gross <jesse@nicira.com> Acked-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
71 lines
1.7 KiB
C
71 lines
1.7 KiB
C
#ifndef __NET_GENEVE_H
|
|
#define __NET_GENEVE_H 1
|
|
|
|
#ifdef CONFIG_INET
|
|
#include <net/udp_tunnel.h>
|
|
#endif
|
|
|
|
|
|
/* Geneve Header:
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
* |Ver| Opt Len |O|C| Rsvd. | Protocol Type |
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
* | Virtual Network Identifier (VNI) | Reserved |
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
* | Variable Length Options |
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
*
|
|
* Option Header:
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
* | Option Class | Type |R|R|R| Length |
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
* | Variable Option Data |
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
*/
|
|
|
|
struct geneve_opt {
|
|
__be16 opt_class;
|
|
u8 type;
|
|
#ifdef __LITTLE_ENDIAN_BITFIELD
|
|
u8 length:5;
|
|
u8 r3:1;
|
|
u8 r2:1;
|
|
u8 r1:1;
|
|
#else
|
|
u8 r1:1;
|
|
u8 r2:1;
|
|
u8 r3:1;
|
|
u8 length:5;
|
|
#endif
|
|
u8 opt_data[];
|
|
};
|
|
|
|
#define GENEVE_CRIT_OPT_TYPE (1 << 7)
|
|
|
|
struct genevehdr {
|
|
#ifdef __LITTLE_ENDIAN_BITFIELD
|
|
u8 opt_len:6;
|
|
u8 ver:2;
|
|
u8 rsvd1:6;
|
|
u8 critical:1;
|
|
u8 oam:1;
|
|
#else
|
|
u8 ver:2;
|
|
u8 opt_len:6;
|
|
u8 oam:1;
|
|
u8 critical:1;
|
|
u8 rsvd1:6;
|
|
#endif
|
|
__be16 proto_type;
|
|
u8 vni[3];
|
|
u8 rsvd2;
|
|
struct geneve_opt options[];
|
|
};
|
|
|
|
#ifdef CONFIG_INET
|
|
struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
|
|
u8 name_assign_type, u16 dst_port);
|
|
#endif /*ifdef CONFIG_INET */
|
|
|
|
#endif /*ifdef__NET_GENEVE_H */
|