vm vhost

ip4

eth2p-ethicmpv4-ip4base-eth-2vhost-1vm-dev

IPv4 routing test cases with vhost user interface

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with VM and single links between nodes.

  • [Enc] Packet Encapsulations: Eth-IPv4-ICMPv4 for IPv4 routing on both links.

  • [Cfg] DUT configuration: DUT1 is configured with IPv4 routing and two static IPv4 /24 route entries. Qemu Guest is connected to VPP via vhost-user interfaces. Guest is running VPP ip4 interconnecting vhost-user interfaces.

  • [Ver] TG verification: Test ICMPv4 Echo Request packets are sent in one direction by TG on links to DUT1; on receive TG verifies packets for correctness and their IPv4 src-addr, dst-addr and MAC addresses.

  • [Ref] Applicable standard specifications: RFC791, RFC826, RFC792

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethicmp4-ip4base- 
eth-2vhost-1vm-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
cli_inband(cmd=’trace add dpdk-input 50’)
cli_inband(cmd=’trace add vhost-user-input 50’)
cli_inband(cmd=’trace add memif-input 50’)
cli_inband(cmd=’trace add avf-input 50’)
sw_interface_set_flags(sw_if_index=1,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
ip_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 101},is_add=1)
ip_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 102},is_add=1)
sw_interface_set_table(vrf_id=101,sw_if_index=1,is_ipv6=0)
sw_interface_set_table(vrf_id=102,sw_if_index=2,is_ipv6=0)
sw_interface_add_del_address(address_length=30,del_all=0,is_add=1,sw_if_index=1,address=’dx00x00x01’,is_ipv6=0)
sw_interface_add_del_address(address_length=30,del_all=0,is_add=1,sw_if_index=2,address=’xc8x00x00x01’,is_ipv6=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘100.0.0.2’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘200.0.0.2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘dx00x00x02’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 1, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 8, ‘address’: {‘un’: {‘ip4’: ‘nx00x00x00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 101},is_add=1,is_multipath=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘xc8x00x00x02’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 2, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 8, ‘address’: {‘un’: {‘ip4’: ‘x14x00x00x00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 102},is_add=1,is_multipath=0)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-1’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-2’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
ip_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 101},is_add=1)
ip_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 102},is_add=1)
sw_interface_set_table(vrf_id=101,sw_if_index=3,is_ipv6=0)
sw_interface_set_table(vrf_id=102,sw_if_index=4,is_ipv6=0)
sw_interface_add_del_address(address_length=30,del_all=0,is_add=1,sw_if_index=3,address=’x01x01x01x02’,is_ipv6=0)
sw_interface_add_del_address(address_length=30,del_all=0,is_add=1,sw_if_index=4,address=’x01x01x02x02’,is_ipv6=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘x01x01x01x01’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 3, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 8, ‘address’: {‘un’: {‘ip4’: ‘x14x00x00x00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 101},is_add=1,is_multipath=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘x01x01x02x01’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 4, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 8, ‘address’: {‘un’: {‘ip4’: ‘nx00x00x00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 102},is_add=1,is_multipath=0)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
show_threads()

ip6

eth2p-ethicmpv6-ip6base-eth-2vhost-1vm-dev

IPv4 routing test cases with vhost user interface

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with VM and single links between nodes.

  • [Enc] Packet Encapsulations: Eth-IPv6-ICMPv6 for IPv6 routing on both links.

  • [Cfg] DUT configuration: DUT1 is configured with IPv6 routing and two static IPv6 /64 route entries. Qemu Guest is connected to VPP via vhost-user interfaces. Guest is running VPP ip6 interconnecting vhost-user interfaces.

  • [Ver] TG verification: Test ICMPv6 Echo Request packets are sent in one direction by TG on links to DUT1; on receive TG verifies packets for correctness and their IPv6 src-addr, dst-addr and MAC addresses.

  • [Ref] Applicable standard specifications: RFC2460, RFC4443, RFC4861

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethicmpv6-ip6base- 
eth-2vhost-1vm-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
cli_inband(cmd=’trace add dpdk-input 50’)
cli_inband(cmd=’trace add vhost-user-input 50’)
cli_inband(cmd=’trace add memif-input 50’)
cli_inband(cmd=’trace add avf-input 50’)
ip_address_dump(sw_if_index=2,is_ipv6=1)
ip_address_dump(sw_if_index=1,is_ipv6=1)
sw_interface_set_flags(sw_if_index=1,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
ip_table_add_del(table={‘is_ip6’: 1, ‘table_id’: 101},is_add=1)
ip_table_add_del(table={‘is_ip6’: 1, ‘table_id’: 102},is_add=1)
sw_interface_set_table(vrf_id=101,sw_if_index=1,is_ipv6=1)
sw_interface_set_table(vrf_id=102,sw_if_index=2,is_ipv6=1)
sw_interface_add_del_address(address_length=64,del_all=0,is_add=1,sw_if_index=1,address=’ x01x01x00x00x00x00x00x00x00x00x00x00x00x00x01’,is_ipv6=1)
sw_interface_add_del_address(address_length=64,del_all=0,is_add=1,sw_if_index=2,address=’ x01x02x00x00x00x00x00x00x00x00x00x00x00x00x01’,is_ipv6=1)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘2001:100::2’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘2001:200::2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip6’: ‘ x01x01x00x00x00x00x00x00x00x00x00x00x00x00x02’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 1, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 1, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 64, ‘address’: {‘un’: {‘ip6’: ‘ x01x00x01x00x00x00x00x00x00x00x00x00x00x00x00’}, ‘af’: 1}}, ‘n_paths’: 1, ‘table_id’: 101},is_add=1,is_multipath=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip6’: ‘ x01x02x00x00x00x00x00x00x00x00x00x00x00x00x02’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 1, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 2, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 64, ‘address’: {‘un’: {‘ip6’: ‘ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x00’}, ‘af’: 1}}, ‘n_paths’: 1, ‘table_id’: 102},is_add=1,is_multipath=0)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-1’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-2’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
ip_table_add_del(table={‘is_ip6’: 1, ‘table_id’: 101},is_add=1)
ip_table_add_del(table={‘is_ip6’: 1, ‘table_id’: 102},is_add=1)
sw_interface_set_table(vrf_id=101,sw_if_index=3,is_ipv6=1)
sw_interface_set_table(vrf_id=102,sw_if_index=4,is_ipv6=1)
sw_interface_add_del_address(address_length=64,del_all=0,is_add=1,sw_if_index=3,address=’x00x01x00x01x00x00x00x00x00x00x00x00x00x00x00x02’,is_ipv6=1)
sw_interface_add_del_address(address_length=64,del_all=0,is_add=1,sw_if_index=4,address=’x00x01x00x02x00x00x00x00x00x00x00x00x00x00x00x02’,is_ipv6=1)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip6’: ‘x00x01x00x01x00x00x00x00x00x00x00x00x00x00x00x01’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 1, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 3, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 64, ‘address’: {‘un’: {‘ip6’: ‘ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x00’}, ‘af’: 1}}, ‘n_paths’: 1, ‘table_id’: 101},is_add=1,is_multipath=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip6’: ‘x00x01x00x02x00x00x00x00x00x00x00x00x00x00x00x01’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 1, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 4, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 64, ‘address’: {‘un’: {‘ip6’: ‘ x01x00x01x00x00x00x00x00x00x00x00x00x00x00x00’}, ‘af’: 1}}, ‘n_paths’: 1, ‘table_id’: 102},is_add=1,is_multipath=0)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
show_threads()

l2bd

eth2p-ethicmpv4-l2bdbasemaclrn-eth-2vhost-1vm-dev

L2 bridge-domain test cases with vhost user interface

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with VM and single links between nodes.

  • [Enc] Packet Encapsulations: Eth-IPv4-ICMPv4 for L2 switching of IPv4.

  • [Cfg] DUT configuration: DUT1 is configured with two L2 bridge-domains (L2BD) switching combined with MAC learning enabled. Qemu Guest is connected to VPP via vhost-user interfaces. Guest is configured with VPP l2 cross-connect interconnecting vhost-user interfaces.

  • [Ver] TG verification: Test ICMPv4 Echo Request packets are sent in both directions by TG on links to DUT1 via VM; on receive TG verifies packets for correctness and their IPv4 src-addr, dst-addr and MAC addresses.

  • [Ref] Applicable standard specifications: RFC792

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethicmpv4-l2bdbasemaclrn- 
eth-2vhost-1vm-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
cli_inband(cmd=’trace add dpdk-input 50’)
cli_inband(cmd=’trace add vhost-user-input 50’)
cli_inband(cmd=’trace add memif-input 50’)
cli_inband(cmd=’trace add avf-input 50’)
sw_interface_set_flags(sw_if_index=1,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_set_flags(sw_if_index=1,admin_up_down=1)
sw_interface_set_l2_bridge(rx_sw_if_index=1,enable=1,shg=0,port_type=0,bd_id=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
sw_interface_set_l2_bridge(rx_sw_if_index=2,enable=1,shg=0,port_type=0,bd_id=2)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-1’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-2’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_l2_bridge(rx_sw_if_index=3,enable=1,shg=0,port_type=0,bd_id=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
sw_interface_set_l2_bridge(rx_sw_if_index=4,enable=1,shg=0,port_type=0,bd_id=2)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
show_threads()

l2xc

eth2p-ethicmpv4-l2xcbase-eth-2vhost-1vm-dev

L2 cross-connect test cases with vhost user interface

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with VM and single links between nodes.

  • [Enc] Packet Encapsulations: Eth-IPv4-ICMPv4 for L2 switching of IPv4.

  • [Cfg] DUT configuration: DUT1 is configured with L2 cross-connect (L2XC) switching. Qemu Guest is connected to VPP via vhost-user interfaces. Guest is configured with VPP l2 cross-connect interconnecting vhost-user interfaces.

  • [Ver] TG verification: Test ICMPv4 Echo Request packets are sent in both directions by TG on links to DUT1 via VM; on receive TG verifies packets for correctness and their IPv4 src-addr, dst-addr and MAC addresses.

  • [Ref] Applicable standard specifications: RFC792

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethicmpv4-l2xcbase- 
eth-2vhost-1vm-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
cli_inband(cmd=’trace add dpdk-input 50’)
cli_inband(cmd=’trace add vhost-user-input 50’)
cli_inband(cmd=’trace add memif-input 50’)
cli_inband(cmd=’trace add avf-input 50’)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-1’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
create_vhost_user_if(sock_filename=’/var/run/vpp/sock-1-2’)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
sw_interface_set_flags(sw_if_index=1,admin_up_down=1)
sw_interface_set_flags(sw_if_index=3,admin_up_down=1)
sw_interface_set_l2_xconnect(rx_sw_if_index=1,enable=1,tx_sw_if_index=3)
sw_interface_set_l2_xconnect(rx_sw_if_index=3,enable=1,tx_sw_if_index=1)
sw_interface_set_flags(sw_if_index=4,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
sw_interface_set_l2_xconnect(rx_sw_if_index=4,enable=1,tx_sw_if_index=2)
sw_interface_set_l2_xconnect(rx_sw_if_index=2,enable=1,tx_sw_if_index=4)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
show_threads()