github.com/datadog/cilium@v1.6.12/bpf/lxc_config.h (about) 1 /* 2 * Copyright (C) 2016-2019 Authors of Cilium 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 /* 19 * This is just a dummy header with dummy values to allow for test 20 * compilation without the full code generation engine backend. 21 */ 22 #include "lib/utils.h" 23 24 DEFINE_IPV6(LXC_IP, 0xbe, 0xef, 0, 0, 0, 0, 0, 0x1, 0, 0, 0, 0x1, 0x01, 0x65, 0x82, 0xbc); 25 DEFINE_U32(LXC_IPV4, 0x10203040); 26 #define LXC_IPV4 fetch_u32(LXC_IPV4) 27 DEFINE_U32(LXC_ID, 0x2A); 28 #define LXC_ID fetch_u32(LXC_ID) 29 DEFINE_U32(SECLABEL, 0xfffff); 30 #define SECLABEL fetch_u32(SECLABEL) 31 DEFINE_U32(SECLABEL_NB, 0xfffff); 32 #define SECLABEL_NB fetch_u32(SECLABEL_NB) 33 34 #define POLICY_MAP test_cilium_policy_65535 35 36 #ifndef SKIP_DEBUG 37 #define DEBUG 38 #endif 39 #define DROP_NOTIFY 40 #define TRACE_NOTIFY 41 #define CT_MAP_TCP6 test_cilium_ct_tcp6_65535 42 #define CT_MAP_ANY6 test_cilium_ct_any6_65535 43 #define CT_MAP_TCP4 test_cilium_ct_tcp4_65535 44 #define CT_MAP_ANY4 test_cilium_ct_any4_65535 45 #define CT_MAP_SIZE_TCP 4096 46 #define CT_MAP_SIZE_ANY 4096 47 #define CALLS_MAP test_cilium_calls_65535 48 #define LB_L3 49 #define LB_L4 50 #define LOCAL_DELIVERY_METRICS 51 #define CONNTRACK 52 #define CONNTRACK_ACCOUNTING 53 #define CONFIG_MAP test_cilium_ep_config_65535 54 55 /* It appears that we can support around the below number of prefixes in an 56 * unrolled loop for LPM CIDR handling in older kernels along with the rest of 57 * the logic in the datapath, hence the defines below. This number was arrived 58 * to by adjusting the number of prefixes and running: 59 * 60 * $ make -C bpf && sudo test/bpf/verifier-test.sh 61 * 62 * If you're from a future where all supported kernels include LPM map type, 63 * consider deprecating the hash-based CIDR lookup and removing the below. 64 */ 65 #define IPCACHE4_PREFIXES 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, \ 66 4, 3, 2, 1 67 #define IPCACHE6_PREFIXES 4, 3, 2, 1