1 /* Generated by ./xlat/gen.sh from ./xlat/sock_xdp_options.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(XDP_MMAP_OFFSETS) || (defined(HAVE_DECL_XDP_MMAP_OFFSETS) && HAVE_DECL_XDP_MMAP_OFFSETS) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((XDP_MMAP_OFFSETS) == (1), "XDP_MMAP_OFFSETS != 1"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define XDP_MMAP_OFFSETS 1 12 #endif 13 #if defined(XDP_RX_RING) || (defined(HAVE_DECL_XDP_RX_RING) && HAVE_DECL_XDP_RX_RING) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((XDP_RX_RING) == (2), "XDP_RX_RING != 2"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define XDP_RX_RING 2 19 #endif 20 #if defined(XDP_TX_RING) || (defined(HAVE_DECL_XDP_TX_RING) && HAVE_DECL_XDP_TX_RING) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((XDP_TX_RING) == (3), "XDP_TX_RING != 3"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define XDP_TX_RING 3 26 #endif 27 #if defined(XDP_UMEM_REG) || (defined(HAVE_DECL_XDP_UMEM_REG) && HAVE_DECL_XDP_UMEM_REG) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((XDP_UMEM_REG) == (4), "XDP_UMEM_REG != 4"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define XDP_UMEM_REG 4 33 #endif 34 #if defined(XDP_UMEM_FILL_RING) || (defined(HAVE_DECL_XDP_UMEM_FILL_RING) && HAVE_DECL_XDP_UMEM_FILL_RING) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((XDP_UMEM_FILL_RING) == (5), "XDP_UMEM_FILL_RING != 5"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define XDP_UMEM_FILL_RING 5 40 #endif 41 #if defined(XDP_UMEM_COMPLETION_RING) || (defined(HAVE_DECL_XDP_UMEM_COMPLETION_RING) && HAVE_DECL_XDP_UMEM_COMPLETION_RING) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((XDP_UMEM_COMPLETION_RING) == (6), "XDP_UMEM_COMPLETION_RING != 6"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define XDP_UMEM_COMPLETION_RING 6 47 #endif 48 #if defined(XDP_STATISTICS) || (defined(HAVE_DECL_XDP_STATISTICS) && HAVE_DECL_XDP_STATISTICS) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((XDP_STATISTICS) == (7), "XDP_STATISTICS != 7"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define XDP_STATISTICS 7 54 #endif 55 56 #ifndef XLAT_MACROS_ONLY 57 58 # ifdef IN_MPERS 59 60 # error static const struct xlat sock_xdp_options in mpers mode 61 62 # else 63 64 static 65 const struct xlat sock_xdp_options[] = { 66 [XDP_MMAP_OFFSETS] = XLAT(XDP_MMAP_OFFSETS), 67 [XDP_RX_RING] = XLAT(XDP_RX_RING), 68 [XDP_TX_RING] = XLAT(XDP_TX_RING), 69 [XDP_UMEM_REG] = XLAT(XDP_UMEM_REG), 70 [XDP_UMEM_FILL_RING] = XLAT(XDP_UMEM_FILL_RING), 71 [XDP_UMEM_COMPLETION_RING] = XLAT(XDP_UMEM_COMPLETION_RING), 72 [XDP_STATISTICS] = XLAT(XDP_STATISTICS), 73 XLAT_END 74 }; 75 76 # endif /* !IN_MPERS */ 77 78 #endif /* !XLAT_MACROS_ONLY */ 79