FINISH;
}
+static void *vl_api_sw_interface_set_rx_placement_t_print
+ (vl_api_sw_interface_set_rx_placement_t * mp, void *handle)
+{
+ u8 *s;
+ s = format (0, "SCRIPT: sw_interface_set_rx_placement ");
+
+ s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+
+ s = format (s, "queue %d ", ntohl (mp->queue_id));
+ if (mp->is_main)
+ s = format (s, "main ");
+ else
+ s = format (s, "worker %d ", ntohl (mp->worker_id));
+
+ FINISH;
+}
+
static void *vl_api_sw_interface_event_t_print
(vl_api_sw_interface_event_t * mp, void *handle)
{
FINISH;
}
+static void *vl_api_bd_ip_mac_dump_t_print
+ (vl_api_bd_ip_mac_dump_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: bd_ip_mac_dump ");
+
+ FINISH;
+}
+
static void *vl_api_tap_connect_t_print
(vl_api_tap_connect_t * mp, void *handle)
{
if (mp->is_add == 0)
s = format (s, "del ");
- if (mp->next_hop_sw_if_index)
+ if (mp->next_hop_sw_if_index != ~0)
s = format (s, "sw_if_index %d ", ntohl (mp->next_hop_sw_if_index));
if (mp->is_ipv6)
else
s = format (s, "%U/%d ", format_ip4_address, mp->dst_address,
mp->dst_address_length);
+
+ if (mp->table_id != 0)
+ s = format (s, "vrf %d ", ntohl (mp->table_id));
+
if (mp->is_local)
s = format (s, "local ");
else if (mp->is_drop)
s = format (s, "drop ");
else if (mp->is_classify)
s = format (s, "classify %d", ntohl (mp->classify_table_index));
+ else if (mp->next_hop_via_label != htonl (MPLS_LABEL_INVALID))
+ s = format (s, "via via_label %d ", ntohl (mp->next_hop_via_label));
else
{
if (mp->is_ipv6)
s = format (s, "via %U ", format_ip4_address, mp->next_hop_address);
}
- if (mp->table_id != 0)
- s = format (s, "vrf %d ", ntohl (mp->table_id));
-
if (mp->next_hop_weight != 1)
- s = format (s, "weight %d ", mp->next_hop_weight);
-
- if (mp->is_multipath)
- s = format (s, "multipath ");
+ s = format (s, "weight %d ", (u32) mp->next_hop_weight);
if (mp->is_multipath)
s = format (s, "multipath ");
if (mp->next_hop_table_id)
s = format (s, "lookup-in-vrf %d ", ntohl (mp->next_hop_table_id));
+ if (mp->next_hop_n_out_labels)
+ {
+ for (u8 i = 0; i < mp->next_hop_n_out_labels; i++)
+ {
+ s = format (s, "out-label %d ",
+ ntohl (mp->next_hop_out_label_stack[i].label));
+ }
+ }
+
+ FINISH;
+}
+
+static void *vl_api_mpls_route_add_del_t_print
+ (vl_api_mpls_route_add_del_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: mpls_route_add_del ");
+
+ if (mp->mr_is_add)
+ s = format (s, "add ");
+ else
+ s = format (s, "del ");
+
+ s = format (s, "%d ", ntohl (mp->mr_label));
+
+ if (mp->mr_eos)
+ s = format (s, "eos ");
+ else
+ s = format (s, "non-eos ");
+
+
+ if (mp->mr_next_hop_proto == DPO_PROTO_IP4)
+ {
+ ip4_address_t ip4_null = {.as_u32 = 0, };
+ if (memcmp (mp->mr_next_hop, &ip4_null, sizeof (ip4_null)))
+ s = format (s, "via %U ", format_ip4_address, mp->mr_next_hop);
+ else
+ s = format (s, "via lookup-in-ip4-table %d ",
+ ntohl (mp->mr_next_hop_table_id));
+ }
+ else if (mp->mr_next_hop_proto == DPO_PROTO_IP6)
+ {
+ ip6_address_t ip6_null = { {0}
+ };
+ if (memcmp (mp->mr_next_hop, &ip6_null, sizeof (ip6_null)))
+ s = format (s, "via %U ", format_ip6_address, mp->mr_next_hop);
+ else
+ s = format (s, "via lookup-in-ip6-table %d ",
+ ntohl (mp->mr_next_hop_table_id));
+ }
+ else if (mp->mr_next_hop_proto == DPO_PROTO_ETHERNET)
+ {
+ s = format (s, "via l2-input-on ");
+ }
+ else if (mp->mr_next_hop_proto == DPO_PROTO_MPLS)
+ {
+ if (mp->mr_next_hop_via_label != htonl (MPLS_LABEL_INVALID))
+ s =
+ format (s, "via via-label %d ", ntohl (mp->mr_next_hop_via_label));
+ else
+ s = format (s, "via next-hop-table %d ",
+ ntohl (mp->mr_next_hop_table_id));
+ }
+ if (mp->mr_next_hop_sw_if_index != ~0)
+ s = format (s, "sw_if_index %d ", ntohl (mp->mr_next_hop_sw_if_index));
+
+ if (mp->mr_next_hop_weight != 1)
+ s = format (s, "weight %d ", (u32) mp->mr_next_hop_weight);
+
+ if (mp->mr_is_multipath)
+ s = format (s, "multipath ");
+
+ if (mp->mr_is_classify)
+ s = format (s, "classify %d", ntohl (mp->mr_classify_table_index));
+
+ if (mp->mr_next_hop_n_out_labels)
+ {
+ for (u8 i = 0; i < mp->mr_next_hop_n_out_labels; i++)
+ {
+ s = format (s, "out-label %d ",
+ ntohl (mp->mr_next_hop_out_label_stack[i].label));
+ }
+ }
+
+ FINISH;
+}
+
+static void *vl_api_ip_table_add_del_t_print
+ (vl_api_ip_table_add_del_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: ip_table_add_del ");
+ if (mp->is_add)
+ s = format (s, "add ");
+ else
+ s = format (s, "del ");
+ if (mp->is_ipv6)
+ s = format (s, "ip6 ");
+ s = format (s, "table %d ", ntohl (mp->table_id));
+
+ FINISH;
+}
+
+static void *vl_api_mpls_table_add_del_t_print
+ (vl_api_mpls_table_add_del_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: mpls_table_add_del ");
+ if (mp->mt_is_add)
+ s = format (s, "add ");
+ else
+ s = format (s, "del ");
+ s = format (s, "table %d ", ntohl (mp->mt_table_id));
+
FINISH;
}
FINISH;
}
+static void *vl_api_sr_mpls_policy_add_t_print
+ (vl_api_sr_mpls_policy_add_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: sr_mpls_policy_add ");
+
+ s = format (s, "bsid %d ", ntohl (mp->bsid));
+
+ if (mp->weight != htonl ((u32) 1))
+ s = format (s, "%d ", ntohl (mp->weight));
+
+ if (mp->type)
+ s = format (s, "spray ");
+
+ if (mp->n_segments)
+ {
+ for (int i = 0; i < mp->n_segments; i++)
+ s = format (s, "next %d ", ntohl (mp->segments[i]));
+ }
+
+ FINISH;
+}
+
+static void *vl_api_sr_mpls_policy_del_t_print
+ (vl_api_sr_mpls_policy_del_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: sr_mpls_policy_del ");
+
+ s = format (s, "bsid %d ", ntohl (mp->bsid));
+
+ FINISH;
+}
+
static void *vl_api_sw_interface_set_unnumbered_t_print
(vl_api_sw_interface_set_unnumbered_t * mp, void *handle)
{
s = format (0, "SCRIPT: dhcp_client_config ");
- s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+ s = format (s, "sw_if_index %d ", ntohl (mp->client.sw_if_index));
- s = format (s, "hostname %s ", mp->hostname);
+ s = format (s, "hostname %s ", mp->client.hostname);
- s = format (s, "want_dhcp_event %d ", mp->want_dhcp_event);
+ s = format (s, "want_dhcp_event %d ", mp->client.want_dhcp_event);
- s = format (s, "pid %d ", ntohl (mp->pid));
+ s = format (s, "pid %d ", ntohl (mp->client.pid));
if (mp->is_add == 0)
s = format (s, "del ");
{
case SR_BEHAVIOR_END:
s = format (s, "Address: %U\nBehavior: End",
- format_ip6_address, (ip6_address_t *) mp->localsid_addr);
+ format_ip6_address, (ip6_address_t *) mp->localsid.addr);
s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
break;
case SR_BEHAVIOR_X:
format (s,
"Address: %U\nBehavior: X (Endpoint with Layer-3 cross-connect)"
"\nIface: %U\nNext hop: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid_addr,
+ (ip6_address_t *) mp->localsid.addr,
format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index),
- format_ip6_address, (ip6_address_t *) mp->nh_addr);
+ format_ip6_address, (ip6_address_t *) mp->nh_addr6);
s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
break;
case SR_BEHAVIOR_DX4:
format (s,
"Address: %U\nBehavior: DX4 (Endpoint with decapsulation with IPv4 cross-connect)"
"\nIface: %U\nNext hop: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid_addr,
+ (ip6_address_t *) mp->localsid.addr,
format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index),
- format_ip4_address, (ip4_address_t *) mp->nh_addr);
+ format_ip4_address, (ip4_address_t *) mp->nh_addr4);
break;
case SR_BEHAVIOR_DX6:
s =
format (s,
"Address: %U\nBehavior: DX6 (Endpoint with decapsulation with IPv6 cross-connect)"
"\nIface: %UNext hop: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid_addr,
+ (ip6_address_t *) mp->localsid.addr,
format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index),
- format_ip6_address, (ip6_address_t *) mp->nh_addr);
+ format_ip6_address, (ip6_address_t *) mp->nh_addr6);
break;
case SR_BEHAVIOR_DX2:
s =
format (s,
"Address: %U\nBehavior: DX2 (Endpoint with decapulation and Layer-2 cross-connect)"
"\nIface: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid_addr,
+ (ip6_address_t *) mp->localsid.addr,
format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index));
break;
case SR_BEHAVIOR_DT6:
format (s,
"Address: %U\nBehavior: DT6 (Endpoint with decapsulation and specific IPv6 table lookup)"
"\nTable: %u", format_ip6_address,
- (ip6_address_t *) mp->localsid_addr, ntohl (mp->fib_table));
+ (ip6_address_t *) mp->localsid.addr, ntohl (mp->fib_table));
break;
case SR_BEHAVIOR_DT4:
s =
format (s,
"Address: %U\nBehavior: DT4 (Endpoint with decapsulation and specific IPv4 table lookup)"
"\nTable: %u", format_ip6_address,
- (ip6_address_t *) mp->localsid_addr, ntohl (mp->fib_table));
+ (ip6_address_t *) mp->localsid.addr, ntohl (mp->fib_table));
break;
default:
if (mp->behavior >= SR_BEHAVIOR_LAST)
{
s = format (s, "Address: %U\n Behavior: %u",
- format_ip6_address, (ip6_address_t *) mp->localsid_addr,
+ format_ip6_address, (ip6_address_t *) mp->localsid.addr,
mp->behavior);
}
else
u8 *s;
ip6_address_t *segments = 0, *seg;
- ip6_address_t *this_address = (ip6_address_t *) mp->segments;
+ ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
int i;
- for (i = 0; i < mp->n_segments; i++)
+ for (i = 0; i < mp->sids.num_sids; i++)
{
vec_add2 (segments, seg, 1);
clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
u8 *s;
ip6_address_t *segments = 0, *seg;
- ip6_address_t *this_address = (ip6_address_t *) mp->segments;
+ ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
int i;
- for (i = 0; i < mp->n_segments; i++)
+ for (i = 0; i < mp->sids.num_sids; i++)
{
vec_add2 (segments, seg, 1);
clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
FINISH;
}
+static void *vl_api_vxlan_offload_rx_t_print
+ (vl_api_vxlan_offload_rx_t * mp, void *handle)
+{
+ u8 *s;
+ s = format (0, "SCRIPT: vxlan_offload_rx ");
+
+ s = format (s, "hw hw_if_index %d ", ntohl (mp->hw_if_index));
+ s = format (s, "rx sw_if_index %d ", ntohl (mp->sw_if_index));
+ if (!mp->enable)
+ s = format (s, "del ");
+
+ FINISH;
+}
+
static void *vl_api_vxlan_tunnel_dump_t_print
(vl_api_vxlan_tunnel_dump_t * mp, void *handle)
{
s = format (s, "server ");
if (mp->renumber)
s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance));
+ if (mp->disable_mrg_rxbuf)
+ s = format (s, "disable_mrg_rxbuf ");
+ if (mp->disable_indirect_desc)
+ s = format (s, "disable_indirect_desc ");
if (mp->tag[0])
s = format (s, "tag %s", mp->tag);
FINISH;
}
-static void *vl_api_sw_interface_set_mtu_t_print
- (vl_api_sw_interface_set_mtu_t * mp, void *handle)
+static void *vl_api_hw_interface_set_mtu_t_print
+ (vl_api_hw_interface_set_mtu_t * mp, void *handle)
{
u8 *s;
s = format (0, "SCRIPT: qos_record_enable_disable ");
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
- s = format (s, "input_source %U ", format_qos_source, mp->input_source);
+ s =
+ format (s, "input_source %U ", format_qos_source,
+ ntohl (mp->input_source));
if (!mp->enable)
s = format (s, "disable ");
_(TAP_DELETE_V2, tap_delete_v2) \
_(SW_INTERFACE_TAP_V2_DUMP, sw_interface_tap_v2_dump) \
_(IP_ADD_DEL_ROUTE, ip_add_del_route) \
+_(IP_TABLE_ADD_DEL, ip_table_add_del) \
+_(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \
+_(MPLS_TABLE_ADD_DEL, mpls_table_add_del) \
_(PROXY_ARP_ADD_DEL, proxy_arp_add_del) \
_(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable) \
_(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \
+_(SR_MPLS_POLICY_ADD, sr_mpls_policy_add) \
+_(SR_MPLS_POLICY_DEL, sr_mpls_policy_del) \
_(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \
_(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \
_(CREATE_VLAN_SUBIF, create_vlan_subif) \
_(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \
_(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \
_(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \
+_(VXLAN_OFFLOAD_RX, vxlan_offload_rx) \
_(GENEVE_ADD_DEL_TUNNEL, geneve_add_del_tunnel) \
_(GENEVE_TUNNEL_DUMP, geneve_tunnel_dump) \
_(GRE_ADD_DEL_TUNNEL, gre_add_del_tunnel) \
_(IP6_FIB_DUMP, ip6_fib_dump) \
_(FEATURE_ENABLE_DISABLE, feature_enable_disable) \
_(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del) \
-_(SW_INTERFACE_SET_MTU, sw_interface_set_mtu) \
+_(HW_INTERFACE_SET_MTU, hw_interface_set_mtu) \
_(P2P_ETHERNET_ADD, p2p_ethernet_add) \
_(P2P_ETHERNET_DEL, p2p_ethernet_del) \
_(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses) \