1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2 /* 3 * Copyright (c) 2016, Amir Vadai <amir@vadai.me> 4 * Copyright (c) 2016, Mellanox Technologies. All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 */ 11 12 #ifndef __LINUX_TC_TUNNEL_KEY_H 13 #define __LINUX_TC_TUNNEL_KEY_H 14 15 #include <linux/pkt_cls.h> 16 17 #define TCA_ACT_TUNNEL_KEY 17 18 19 #define TCA_TUNNEL_KEY_ACT_SET 1 20 #define TCA_TUNNEL_KEY_ACT_RELEASE 2 21 22 struct tc_tunnel_key { 23 tc_gen; 24 int t_action; 25 }; 26 27 enum { 28 TCA_TUNNEL_KEY_UNSPEC, 29 TCA_TUNNEL_KEY_TM, 30 TCA_TUNNEL_KEY_PARMS, 31 TCA_TUNNEL_KEY_ENC_IPV4_SRC, /* be32 */ 32 TCA_TUNNEL_KEY_ENC_IPV4_DST, /* be32 */ 33 TCA_TUNNEL_KEY_ENC_IPV6_SRC, /* struct in6_addr */ 34 TCA_TUNNEL_KEY_ENC_IPV6_DST, /* struct in6_addr */ 35 TCA_TUNNEL_KEY_ENC_KEY_ID, /* be64 */ 36 TCA_TUNNEL_KEY_PAD, 37 TCA_TUNNEL_KEY_ENC_DST_PORT, /* be16 */ 38 TCA_TUNNEL_KEY_NO_CSUM, /* u8 */ 39 TCA_TUNNEL_KEY_ENC_OPTS, /* Nested TCA_TUNNEL_KEY_ENC_OPTS_ 40 * attributes 41 */ 42 TCA_TUNNEL_KEY_ENC_TOS, /* u8 */ 43 TCA_TUNNEL_KEY_ENC_TTL, /* u8 */ 44 __TCA_TUNNEL_KEY_MAX, 45 }; 46 47 #define TCA_TUNNEL_KEY_MAX (__TCA_TUNNEL_KEY_MAX - 1) 48 49 enum { 50 TCA_TUNNEL_KEY_ENC_OPTS_UNSPEC, 51 TCA_TUNNEL_KEY_ENC_OPTS_GENEVE, /* Nested 52 * TCA_TUNNEL_KEY_ENC_OPTS_ 53 * attributes 54 */ 55 __TCA_TUNNEL_KEY_ENC_OPTS_MAX, 56 }; 57 58 #define TCA_TUNNEL_KEY_ENC_OPTS_MAX (__TCA_TUNNEL_KEY_ENC_OPTS_MAX - 1) 59 60 enum { 61 TCA_TUNNEL_KEY_ENC_OPT_GENEVE_UNSPEC, 62 TCA_TUNNEL_KEY_ENC_OPT_GENEVE_CLASS, /* be16 */ 63 TCA_TUNNEL_KEY_ENC_OPT_GENEVE_TYPE, /* u8 */ 64 TCA_TUNNEL_KEY_ENC_OPT_GENEVE_DATA, /* 4 to 128 bytes */ 65 66 __TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX, 67 }; 68 69 #define TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX \ 70 (__TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX - 1) 71 72 #endif 73