GTP: add support for flow based tunneling API
Following patch add support for flow based tunneling API to send and recv GTP tunnel packet over tunnel metadata API. This would allow this device integration with OVS or eBPF using flow based tunneling APIs. Signed-off-by: Pravin B Shelar <pbshelar@fb.com> Link: https://lore.kernel.org/r/20210110070021.26822-1-pbshelar@fb.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f4d133d86a
commit
9ab7e76aef
5 changed files with 398 additions and 144 deletions
|
|
@ -2,6 +2,8 @@
|
|||
#ifndef _UAPI_LINUX_GTP_H_
|
||||
#define _UAPI_LINUX_GTP_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define GTP_GENL_MCGRP_NAME "gtp"
|
||||
|
||||
enum gtp_genl_cmds {
|
||||
|
|
@ -34,4 +36,14 @@ enum gtp_attrs {
|
|||
};
|
||||
#define GTPA_MAX (__GTPA_MAX + 1)
|
||||
|
||||
enum {
|
||||
GTP_METADATA_V1
|
||||
};
|
||||
|
||||
struct gtpu_metadata {
|
||||
__u8 ver;
|
||||
__u8 flags;
|
||||
__u8 type;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_LINUX_GTP_H_ */
|
||||
|
|
|
|||
|
|
@ -809,6 +809,7 @@ enum {
|
|||
IFLA_GTP_FD1,
|
||||
IFLA_GTP_PDP_HASHSIZE,
|
||||
IFLA_GTP_ROLE,
|
||||
IFLA_GTP_COLLECT_METADATA,
|
||||
__IFLA_GTP_MAX,
|
||||
};
|
||||
#define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ enum {
|
|||
#define TUNNEL_VXLAN_OPT __cpu_to_be16(0x1000)
|
||||
#define TUNNEL_NOCACHE __cpu_to_be16(0x2000)
|
||||
#define TUNNEL_ERSPAN_OPT __cpu_to_be16(0x4000)
|
||||
#define TUNNEL_GTPU_OPT __cpu_to_be16(0x8000)
|
||||
|
||||
#define TUNNEL_OPTIONS_PRESENT \
|
||||
(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue