29 "[%d] %U (src) %U (dst) outer_fib_index %d",
45 u32 hw_if_index, sw_if_index;
57 return VNET_API_ERROR_INVALID_VALUE;
61 return VNET_API_ERROR_NO_SUCH_FIB;
63 outer_fib_index = p[0];
66 memset (t, 0,
sizeof (*t));
128 return VNET_API_ERROR_NO_SUCH_ENTRY;
144 *sw_if_indexp = sw_if_index;
158 u32 outer_fib_id = 0;
174 else if (
unformat (line_input,
"outer-fib-id %d", &outer_fib_id))
185 if (memcmp (&src, &dst,
sizeof(src)) == 0)
188 memset (a, 0,
sizeof (*a));
200 case VNET_API_ERROR_INVALID_VALUE:
202 case VNET_API_ERROR_NO_SUCH_FIB:
213 .path =
"create gre tunnel",
214 .short_help =
"create gre tunnel src <addr> dst <addr> " 215 "[outer-fib-id <fib>] [del]",
232 vlib_cli_output (vm,
"%U", format_gre_tunnel, t);
239 .path =
"show gre tunnel",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
#define hash_set(h, key, value)
#define hash_unset(h, key)
vnet_interface_main_t interface_main
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
u32 * free_vxlan_tunnel_hw_if_indices
u32 * fib_index_by_sw_if_index
u32 * tunnel_index_by_sw_if_index
#define pool_foreach(VAR, POOL, BODY)
#define VLIB_INIT_FUNCTION(x)
u8 * format_gre_tunnel(u8 *s, va_list *args)
vlib_combined_counter_main_t * combined_sw_if_counters
clib_error_t * gre_interface_init(vlib_main_t *vm)
always_inline uword pool_elts(void *v)
u32 vnet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, u32 hw_class_index, u32 hw_instance)
static clib_error_t * create_gre_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define pool_elt_at_index(p, i)
uword * fib_index_by_table_id
vlib_simple_counter_main_t * sw_if_counters
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define pool_get_aligned(P, E, A)
static clib_error_t * show_gre_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_memcpy(a, b, c)
static void vnet_interface_counter_unlock(vnet_interface_main_t *im)
always_inline vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
#define VLIB_CLI_COMMAND(x,...)
static void vnet_interface_counter_lock(vnet_interface_main_t *im)
u32 max_l3_packet_bytes[VLIB_N_RX_TX]
vnet_hw_interface_class_t gre_hw_interface_class
always_inline void vlib_zero_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
vnet_device_class_t gre_device_class
#define GRE_OUTPUT_NEXT_LOOKUP
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
always_inline void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
u32 per_packet_overhead_bytes
#define clib_error_return(e, args...)
uword vlib_node_add_named_next_with_slot(vlib_main_t *vm, uword node, char *name, uword slot)
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
#define CLIB_CACHE_LINE_BYTES
int vnet_gre_add_del_tunnel(vnet_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)