container memif

eth2p-ethicmpv4-ip4base-eth-2memif-1dcr-dev

IPv4 routing test cases with memif interface

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with 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. Container is connected to VPP via Memif interface. Container is running same VPP version as running on DUT.

  • [Ver] TG verification: Test ICMPv4 Echo Request packets are sent in one direction by TG on links to DUT1 and via container; 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-ethicmpv4-ip4base- 
eth-2memif-1dcr-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_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 10},is_add=1)
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’: 1, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 24, ‘address’: {‘un’: {‘ip4’: ‘nnnx00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 10},is_add=1,is_multipath=1)
sw_interface_set_table(vrf_id=10,sw_if_index=1,is_ipv6=0)
sw_interface_add_del_address(address_length=30,del_all=0,is_add=1,sw_if_index=1,address=’x01x01x01x02’,is_ipv6=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘1.1.1.1’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 11},is_add=1)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘x02x02x02x02’}}, ‘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’: 24, ‘address’: {‘un’: {‘ip4’: ‘x14x14x14x00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 11},is_add=1,is_multipath=1)
sw_interface_set_table(vrf_id=11,sw_if_index=2,is_ipv6=0)
sw_interface_add_del_address(address_length=30,del_all=0,is_add=1,sw_if_index=2,address=’x02x02x02x01’,is_ipv6=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘2.2.2.2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-1’,socket_id=1,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=1)
memif_dump()
memif_dump()
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-2’,socket_id=2,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=2)
memif_dump()
memif_dump()
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_table(vrf_id=10,sw_if_index=3,is_ipv6=0)
sw_interface_set_table(vrf_id=11,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=’x1fx1fx1fx01’,is_ipv6=0)
sw_interface_add_del_address(address_length=30,del_all=0,is_add=1,sw_if_index=4,address=’ x01’,is_ipv6=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘ x01’}}, ‘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’: 24, ‘address’: {‘un’: {‘ip4’: ‘x14x14x14x00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 10},is_add=1,is_multipath=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘x1fx1fx1fx01’}}, ‘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’: 24, ‘address’: {‘un’: {‘ip4’: ‘nnnx00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 11},is_add=1,is_multipath=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘32.32.32.1’, ‘flags’: 0, ‘sw_if_index’: 3, ‘mac_address’: ‘02:fe:c2:d8:fb:ed’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘31.31.31.1’, ‘flags’: 0, ‘sw_if_index’: 4, ‘mac_address’: ‘02:fe:bf:90:a2:37’})
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_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
memif_dump()
show_threads()

eth2p-ethicmpv4-l2bdbasemaclrn-eth-2memif-1dcr-dev

L2 bridge-domain test cases with memif interface

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

  • [Enc] Packet Encapsulations: Eth-IPv4-ICMPv4 for L2 switching of IPv4. Both apply to all links.

  • [Cfg] DUT configuration: DUT1 is configured with L2 bridge-domain switching. Container is connected to VPP via Memif interface. Container is running same VPP version as running on DUT.

  • [Ver] TG verification: Test ICMPv4 Echo Request packets are sent in both directions by TG on links to DUT1 and via container; 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-2memif-1dcr-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_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)
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-1’,socket_id=1,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=1)
memif_dump()
memif_dump()
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-2’,socket_id=2,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=2)
memif_dump()
memif_dump()
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)

eth2p-ethicmpv4-l2xcbase-eth-2memif-1dcr-dev

L2 cross-connect test cases with memif interface

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with 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. Container is connected to VPP via Memif interface. Container is running same VPP version as running on DUT.

  • [Ver] TG verification: Test ICMPv4 Echo Request packets are sent in both directions by TG on links to DUT1 and via container; 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-2memif-1dcr-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’)
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-1’,socket_id=1,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=1)
memif_dump()
memif_dump()
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-2’,socket_id=2,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=2)
memif_dump()
memif_dump()
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)
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)
memif_dump()
show_threads()

eth2p-ethicmpv6-ip6base-eth-2memif-1dcr-dev

IPv4 routing test cases with memif interface

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with 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. Container is connected to VPP via Memif interface. Container is running same VPP version as running on DUT.

  • [Ver] TG verification: Test ICMPv6 Echo Request packets are sent in one direction by TG on links to DUT1 and via container; on receive TG verifies packets for correctness and their IPv6 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 

 78b-ethicmpv6-ip6base- 
eth-2memif-1dcr-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_dump(name_filter=’’,name_filter_valid=0)
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-1’,socket_id=1,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=1)
memif_dump()
memif_dump()
memif_socket_filename_add_del(socket_filename=’/tmp/memif-DUT1_CNF1b208df6352b55115b19b2c8cf9871ad2ad20d78918270989a22927864ab90821-2’,socket_id=2,is_add=1)
memif_create(role=1,rx_queues=1,id=1,tx_queues=1,socket_id=2)
memif_dump()
memif_dump()
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’: 20},is_add=1)
sw_interface_set_table(vrf_id=20,sw_if_index=4,is_ipv6=1)
sw_interface_set_table(vrf_id=20,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=’ x01x00x01x00x00x00x00x00x00x00x00x00x00x00x01’,is_ipv6=1)
sw_interface_add_del_address(address_length=64,del_all=0,is_add=1,sw_if_index=3,address=’ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x01’,is_ipv6=1)
sw_interface_add_del_address(address_length=64,del_all=0,is_add=1,sw_if_index=4,address=’ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x02’,is_ipv6=1)
sw_interface_add_del_address(address_length=64,del_all=0,is_add=1,sw_if_index=2,address=’ x01x00x03x00x00x00x00x00x00x00x00x00x00x00x01’,is_ipv6=1)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip6’: ‘ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x02’}}, ‘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’: ‘ x01x00x03x00x00x00x00x00x00x00x00x00x00x00x00’}, ‘af’: 1}}, ‘n_paths’: 1, ‘table_id’: 0},is_add=1,is_multipath=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip6’: ‘ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x02’}}, ‘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’: 20},is_add=1,is_multipath=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘2001:2::2’, ‘flags’: 0, ‘sw_if_index’: 3, ‘mac_address’: ‘02:fe:f0:46:43:51’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘2001:3::2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})