|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
42 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
49 #define foreach_vpe_api_msg \
50 _(SW_INTERFACE_SET_VXLAN_GPE_BYPASS, sw_interface_set_vxlan_gpe_bypass) \
51 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
52 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump)
58 vl_api_sw_interface_set_vxlan_gpe_bypass_reply_t *rmp;
67 REPLY_MACRO (VL_API_SW_INTERFACE_SET_VXLAN_GPE_BYPASS_REPLY);
77 u32 encap_fib_index, decap_fib_index;
86 rv = VNET_API_ERROR_NO_SUCH_FIB;
89 encap_fib_index = p[0];
94 if (
protocol == VXLAN_GPE_INPUT_NEXT_IP4_INPUT)
99 rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
102 decap_fib_index = p[0];
119 rv = VNET_API_ERROR_SAME_SRC_DST;
125 a->encap_fib_index = encap_fib_index;
126 a->decap_fib_index = decap_fib_index;
128 a->vni = ntohl (mp->
vni);
150 rmp->_vl_msg_id =
ntohs (VL_API_VXLAN_GPE_TUNNEL_DETAILS);
168 rmp->
vni = htonl (t->
vni);
219 #define vl_msg_name_crc_list
221 #undef vl_msg_name_crc_list
226 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
227 foreach_vl_msg_name_crc_vxlan_gpe;
237 vl_msg_api_set_handlers(VL_API_##N, #n, \
238 vl_api_##n##_t_handler, \
240 vl_api_##n##_t_endian, \
241 vl_api_##n##_t_print, \
242 sizeof(vl_api_##n##_t), 1);
246 am->api_trace_cfg[VL_API_VXLAN_GPE_ADD_DEL_TUNNEL].size +=
u32 decap_fib_index
FIB indices - inner IP packet lookup here.
vl_api_interface_index_t mcast_sw_if_index
vnet_interface_main_t * im
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
bool is_add[default=true]
#define REPLY_MACRO2(t, body)
static clib_error_t * vxlan_gpe_api_hookup(vlib_main_t *vm)
static void setup_message_id_table(api_main_t *am)
ip4_main_t ip4_main
Global ip4 main structure.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
vl_api_ip_proto_t protocol
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
VLIB_API_INIT_FUNCTION(vxlan_gpe_api_hookup)
vl_api_ip_proto_t protocol
Struct for VXLAN GPE node state.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u8 protocol
encapsulated protocol
u32 encap_fib_index
FIB indices - tunnel partner lookup here.
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
#define pool_foreach(VAR, POOL)
Iterate through pool.
u32 vni
VXLAN GPE VNI in HOST byte order, shifted left 8 bits.
vl_api_interface_index_t mcast_sw_if_index
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static u8 ip46_address_is_equal(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
#define VXLAN_GPE_TUNNEL_IS_IPV4
Flags for vxlan_gpe_tunnel_t.
vxlan_gpe_main_t vxlan_gpe_main
vl_api_interface_index_t sw_if_index
u32 ft_table_id
Table ID (hash key) for this FIB.
An API client registration, only in vpp/vlib.
ip46_address_t local
tunnel local address
static api_main_t * vlibapi_get_main(void)
Struct for VXLAN GPE tunnel.
Struct for VXLAN GPE add/del args.
struct fib_table_t_ * fibs
Interface set vxlan-gpe-bypass request.
vxlan_gpe_tunnel_t * tunnels
vector of encap tunnel instances
#define foreach_vpe_api_msg
#define BAD_SW_IF_INDEX_LABEL
void vnet_int_vxlan_gpe_bypass_mode(u32 sw_if_index, u8 is_ip6, u8 is_enable)
API main structure, used by both vpp and binary API clients.
vl_api_interface_index_t sw_if_index
static void vl_api_vxlan_gpe_add_del_tunnel_t_handler(vl_api_vxlan_gpe_add_del_tunnel_t *mp)
static void vl_api_vxlan_gpe_tunnel_dump_t_handler(vl_api_vxlan_gpe_tunnel_dump_t *mp)
u32 sw_if_index
vnet intfc sw_if_index
ip46_address_t remote
tunnel remote address
vl_api_ip_proto_t protocol
vl_api_interface_index_t sw_if_index
struct fib_table_t_ * fibs
Vector of FIBs.
vl_api_interface_index_t sw_if_index
static void send_vxlan_gpe_tunnel_details(vxlan_gpe_tunnel_t *t, vl_api_registration_t *reg, u32 context)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
static void vl_api_sw_interface_set_vxlan_gpe_bypass_t_handler(vl_api_sw_interface_set_vxlan_gpe_bypass_t *mp)
u32 * tunnel_index_by_sw_if_index
Mapping from sw_if_index to tunnel index.
bool enable[default=true]
vl_api_interface_index_t sw_if_index
int vnet_vxlan_gpe_add_del_tunnel(vnet_vxlan_gpe_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
Add or Del a VXLAN GPE tunnel.
void * vl_msg_api_alloc(int nbytes)