Commit 9ab7e76a authored by Pravin B Shelar's avatar Pravin B Shelar Committed by Jakub Kicinski

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: default avatarPravin B Shelar <pbshelar@fb.com>
Link: https://lore.kernel.org/r/20210110070021.26822-1-pbshelar@fb.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f4d133d8
This diff is collapsed.
......@@ -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)
......
......@@ -617,6 +617,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment