container memif

eth2p-ethipv4-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 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 IPv4 packets with IP protocol=61 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-ethipv4-ip4base- 
eth-2memif-1dcr-dev

 DUT1:  
cli_inband(cmd=’show logging’)
show_version()
sw_interface_dump(name_filter_valid=False,name_filter=’’)
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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
ip_table_add_del(table={‘table_id’: 10, ‘is_ip6’: False},is_add=True)
ip_route_add_del(is_add=True,is_multipath=True,route={‘table_id’: 10, ‘prefix’: {‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 2, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’x01x01x01x01’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
sw_interface_set_table(sw_if_index=2,is_ipv6=False,vrf_id=10)
sw_interface_add_del_address(sw_if_index=2,is_add=True,del_all=False,prefix={‘len’: 30, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x01x01x01x02’}}})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 2, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:05’, ‘ip_address’: ‘1.1.1.1’})
ip_table_add_del(table={‘table_id’: 11, ‘is_ip6’: False},is_add=True)
ip_route_add_del(is_add=True,is_multipath=True,route={‘table_id’: 11, ‘prefix’: {‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 1, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’x02x02x02x02’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
sw_interface_set_table(sw_if_index=1,is_ipv6=False,vrf_id=11)
sw_interface_add_del_address(sw_if_index=1,is_add=True,del_all=False,prefix={‘len’: 30, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x02x02x02x01’}}})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 1, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:04’, ‘ip_address’: ‘2.2.2.2’})
memif_socket_filename_add_del(is_add=True,socket_id=1,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-1’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=1,id=1,secret=’’)
memif_dump()
memif_dump()
memif_socket_filename_add_del(is_add=True,socket_id=2,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-2’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=2,id=1,secret=’’)
memif_dump()
memif_dump()
sw_interface_set_flags(sw_if_index=3,flags=1)
sw_interface_set_flags(sw_if_index=4,flags=1)
sw_interface_set_table(sw_if_index=3,is_ipv6=False,vrf_id=10)
sw_interface_set_table(sw_if_index=4,is_ipv6=False,vrf_id=11)
sw_interface_add_del_address(sw_if_index=3,is_add=True,del_all=False,prefix={‘len’: 30, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x1fx1fx1fx01’}}})
sw_interface_add_del_address(sw_if_index=4,is_add=True,del_all=False,prefix={‘len’: 30, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’ x01’}}})
ip_route_add_del(is_add=True,is_multipath=False,route={‘table_id’: 10, ‘prefix’: {‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 3, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’ x01’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
ip_route_add_del(is_add=True,is_multipath=False,route={‘table_id’: 11, ‘prefix’: {‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 4, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’x1fx1fx1fx01’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 3, ‘flags’: 0, ‘mac_address’: ‘02:fe:a0:3e:f5:81’, ‘ip_address’: ‘32.32.32.1’})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 4, ‘flags’: 0, ‘mac_address’: ‘02:fe:74:8d:7b:ee’, ‘ip_address’: ‘31.31.31.1’})
sw_interface_set_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
memif_dump()
show_threads()

eth2p-ethipv4-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 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 IPv4 packets with IP protocol=61 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-ethipv4-l2bdbasemaclrn- 
eth-2memif-1dcr-dev

 DUT1:  
cli_inband(cmd=’show logging’)
show_version()
sw_interface_dump(name_filter_valid=False,name_filter=’’)
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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=2,flags=1)
sw_interface_set_l2_bridge(rx_sw_if_index=2,bd_id=1,shg=0,port_type=0,enable=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
sw_interface_set_l2_bridge(rx_sw_if_index=1,bd_id=2,shg=0,port_type=0,enable=1)
memif_socket_filename_add_del(is_add=True,socket_id=1,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-1’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=1,id=1,secret=’’)
memif_dump()
memif_dump()
memif_socket_filename_add_del(is_add=True,socket_id=2,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-2’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=2,id=1,secret=’’)
memif_dump()
memif_dump()
sw_interface_set_flags(sw_if_index=3,flags=1)
sw_interface_set_flags(sw_if_index=4,flags=1)
sw_interface_set_flags(sw_if_index=3,flags=1)
sw_interface_set_l2_bridge(rx_sw_if_index=3,bd_id=1,shg=0,port_type=0,enable=1)
sw_interface_set_flags(sw_if_index=4,flags=1)
sw_interface_set_l2_bridge(rx_sw_if_index=4,bd_id=2,shg=0,port_type=0,enable=1)

eth2p-ethipv4-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 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 IPv4 packets with IP protocol=61 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-ethipv4-l2xcbase- 
eth-2memif-1dcr-dev

 DUT1:  
cli_inband(cmd=’show logging’)
show_version()
sw_interface_dump(name_filter_valid=False,name_filter=’’)
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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
memif_socket_filename_add_del(is_add=True,socket_id=1,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-1’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=1,id=1,secret=’’)
memif_dump()
memif_dump()
memif_socket_filename_add_del(is_add=True,socket_id=2,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-2’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=2,id=1,secret=’’)
memif_dump()
memif_dump()
sw_interface_set_flags(sw_if_index=3,flags=1)
sw_interface_set_flags(sw_if_index=4,flags=1)
sw_interface_set_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=3,flags=1)
sw_interface_set_l2_xconnect(rx_sw_if_index=2,tx_sw_if_index=3,enable=1)
sw_interface_set_l2_xconnect(rx_sw_if_index=3,tx_sw_if_index=2,enable=1)
sw_interface_set_flags(sw_if_index=4,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
sw_interface_set_l2_xconnect(rx_sw_if_index=4,tx_sw_if_index=1,enable=1)
sw_interface_set_l2_xconnect(rx_sw_if_index=1,tx_sw_if_index=4,enable=1)
sw_interface_set_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
memif_dump()
show_threads()

eth2p-ethipv6-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 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 IPv6 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-ethipv6-ip6base- 
eth-2memif-1dcr-dev

 DUT1:  
cli_inband(cmd=’show logging’)
show_version()
sw_interface_dump(name_filter_valid=False,name_filter=’’)
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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
memif_socket_filename_add_del(is_add=True,socket_id=1,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-1’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=1,id=1,secret=’’)
memif_dump()
memif_dump()
memif_socket_filename_add_del(is_add=True,socket_id=2,socket_filename=’/tmp/memif-DUT1_CNF1fe8c8b7452ac7522bf9ba7f9b59d4ae64ccf1bd4898a44574ac5ba583e564b79-2’)
memif_create(role=1,rx_queues=1,tx_queues=1,socket_id=2,id=1,secret=’’)
memif_dump()
memif_dump()
sw_interface_set_flags(sw_if_index=3,flags=1)
sw_interface_set_flags(sw_if_index=4,flags=1)
ip_table_add_del(table={‘table_id’: 20, ‘is_ip6’: True},is_add=True)
sw_interface_set_table(sw_if_index=4,is_ipv6=True,vrf_id=20)
sw_interface_set_table(sw_if_index=1,is_ipv6=True,vrf_id=20)
sw_interface_add_del_address(sw_if_index=2,is_add=True,del_all=False,prefix={‘len’: 64, ‘address’: {‘af’: 1, ‘un’: {‘ip6’: b’ x01x00x01x00x00x00x00x00x00x00x00x00x00x00x01’}}})
sw_interface_add_del_address(sw_if_index=3,is_add=True,del_all=False,prefix={‘len’: 64, ‘address’: {‘af’: 1, ‘un’: {‘ip6’: b’ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x01’}}})
sw_interface_add_del_address(sw_if_index=4,is_add=True,del_all=False,prefix={‘len’: 64, ‘address’: {‘af’: 1, ‘un’: {‘ip6’: b’ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x02’}}})
sw_interface_add_del_address(sw_if_index=1,is_add=True,del_all=False,prefix={‘len’: 64, ‘address’: {‘af’: 1, ‘un’: {‘ip6’: b’ x01x00x03x00x00x00x00x00x00x00x00x00x00x00x01’}}})
ip_route_add_del(is_add=True,is_multipath=False,route={‘table_id’: 0, ‘prefix’: {‘len’: 64, ‘address’: {‘af’: 1, ‘un’: {‘ip6’: b’ x01x00x03x00x00x00x00x00x00x00x00x00x00x00x00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 3, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 1, ‘nh’: {‘address’: {‘ip6’: b’ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x02’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
ip_route_add_del(is_add=True,is_multipath=False,route={‘table_id’: 20, ‘prefix’: {‘len’: 64, ‘address’: {‘af’: 1, ‘un’: {‘ip6’: b’ x01x00x01x00x00x00x00x00x00x00x00x00x00x00x00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 4, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 1, ‘nh’: {‘address’: {‘ip6’: b’ x01x00x02x00x00x00x00x00x00x00x00x00x00x00x02’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 3, ‘flags’: 0, ‘mac_address’: ‘02:fe:bc:67:72:87’, ‘ip_address’: ‘2001:2::2’})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 1, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:04’, ‘ip_address’: ‘2001:3::2’})