aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2024-08-29buffers: support disabling allocation per numa domainLukas Stockner2-8/+16
2024-08-29octeon: use proper refs for roc item spec and maskSriram Vatala1-43/+59
2024-08-29vppinfra: Use affinity for online cpus on FreeBSDTom Jones1-15/+7
2024-08-29crypto-native: aes_cbc_encrypt in vppinfraMohammed Hawari2-175/+227
2024-08-28ip6: fix error in ip6_input_checkBenoît Ganne1-1/+1
2024-08-28hsa: http_cli coverity fixMatus Fabian1-1/+1
2024-08-28http: http_send_data cleanupMatus Fabian1-36/+38
2024-08-28interface: do not update runtime data if input node is not setDamjan Marion1-0/+3
2024-08-28http: http_state_wait_app_reply improvementMatus Fabian3-10/+43
2024-08-27hs-test: added a redis-benchmark testAdrian Villin7-136/+405
2024-08-26hs-test: http tests improvementMatus Fabian5-141/+164
2024-08-26hs-test: failed summary fixMatus Fabian1-0/+4
2024-08-23http: status line parsing fixMatus Fabian2-11/+50
2024-08-23hs-test: core dump improvementMatus Fabian2-17/+20
2024-08-23hs-test: assert improvementMatus Fabian1-9/+9
2024-08-22sr: fix gcc 13.2.0 build errors on ubuntu 24.04Dave Wallace1-0/+2
2024-08-22hs-test: fix incorrect exit statusAdrian Villin3-15/+24
2024-08-22hs-test: fix after mergeMatus Fabian1-2/+2
2024-08-22misc: move osi to pluginHadi Rayan Al-Sandid12-33/+70
2024-08-22tests: fix make test python issues on ubuntu 24.04Dave Wallace7-11/+628
2024-08-22hs-test: nginx proxy/mirroring test cleanupMatus Fabian9-191/+232
2024-08-22http_static: added last-modified headerAdrian Villin4-12/+42
2024-08-22hs-test: proxy testing improvementMatus Fabian14-114/+580
2024-08-21hs-test: fix vppinstance logs and disable traceAdrian Villin3-4/+3
2024-08-21hs-test: generate core dump, fix docker logs in CIAdrian Villin7-84/+283
2024-08-21vppinfra: cleaner way of getting libdl in CMakeGuillaume Solignac1-9/+1
2024-08-21dpdk: Move file-prefix flag processing into linux only blockTom Jones1-1/+3
2024-08-21octeon: add support for max_rx_frame_size updateAlok Mishra2-8/+27
2024-08-21octeon: enable tx checksum offload capabilityMonendra Singh Kushwaha2-5/+7
2024-08-21octeon: sync mac address to cgx/rpm tableMonendra Singh Kushwaha1-0/+17
2024-08-20vppinfra: fix format_clib_timebase_timeAdrian Villin2-5/+6
2024-08-20http_static: make max-age configurableAdrian Villin7-17/+191
2024-08-19http: make Media Types RFC9110 compliantAdrian Villin2-81/+81
2024-08-16http: http_read_message improvementMatus Fabian3-46/+113
2024-08-13tls: add basic tls record parsersFlorin Coras3-0/+532
2024-08-13session: problem in session_rules_details APISteven Luong1-0/+4
2024-08-09http: authority-form target parsing/serializingMatus Fabian4-1/+108
2024-08-08tests: fix scapy 2.4.5 IPsec patch for AH + ESNBenoît Ganne2-18/+35
2024-08-07tests: fix ipv6 fragmented esp w/ scapy 2.4.5Benoît Ganne2-5/+4
2024-08-07ikev2: handoff packetsStanislav Zaikin7-23/+267
2024-08-07vppapigen: ensure address types are nul terminatedOle Troan4-14/+27
2024-08-07ikev2: fix BN_bn2bin re-allocationStanislav Zaikin2-13/+2
2024-08-07tests: update scapy to version 2.4.5Dave Wallace30-306/+610
2024-08-06session: memory leak in show session rulesSteven Luong1-6/+9
2024-08-06http: client POST methodMatus Fabian8-61/+884
2024-08-06session: session_lookup_local_endpoint returns the wrong valueSteven Luong1-1/+1
2024-08-06vlib: add 'exit' as alias to 'quit'Maxime Peim1-0/+6
2024-08-01http_static: web app doc updateMatus Fabian1-10/+9
2024-08-01vcl: handle EINTR in epoll_wait callsAritra Basu1-11/+37
2024-08-01tcp: add establish timer pops to statsAritra Basu2-13/+19
="n">intf.sw_if_index, memif11.sw_if_index) self.vapi.ppcli("trace add memif-input 100") # create marker request marker = (Ether(src=bond_mac, dst=lacp_dst_mac) / SlowProtocol() / MarkerProtocol(marker_type=1, requester_port=1, requester_system=bond_mac, requester_transaction_id=1)) bond1.add_member_vpp_bond_interface(sw_if_index=self.pg0.sw_if_index) self.pg0.add_stream(marker) self.pg_enable_capture(self.pg_interfaces) self.pg_start() show_trace = self.vapi.ppcli("show trace max 100") self.assertIn("Marker Information TLV:", show_trace) bond0.remove_vpp_config() bond1.remove_vpp_config() class TestLACP(VppTestCase): """LACP Test Case """ @classmethod def setUpClass(cls): super().setUpClass() @classmethod def tearDownClass(cls): super().tearDownClass() def setUp(self): super().setUp() def tearDown(self): super().tearDown() def show_commands_at_teardown(self): self.logger.info(self.vapi.ppcli("show interface")) def wait_for_lacp_connect(self, timeout, step=1): while 1: intfs = self.vapi.sw_interface_lacp_dump() all_good = 1 for intf in intfs: if ((intf.actor_state != LACP_COLLECTION_AND_DISTRIBUTION_STATE) or (intf.partner_state != LACP_COLLECTION_AND_DISTRIBUTION_STATE)): all_good = 0 if (all_good == 1): return 1 self.sleep(step) timeout -= step if timeout <= 0: return 0 def wait_for_member_detach(self, bond, timeout, count, step=1): while 1: intfs = self.vapi.sw_bond_interface_dump( sw_if_index=bond.sw_if_index) for intf in intfs: if ((intf.members == count) and (intf.active_members == count)): return 1 else: self.sleep(1) timeout -= step if (timeouut <= 0): return 0 def test_lacp_connect(self): """ LACP protocol connect test """ # topology # # +-+ +-+ # memif1 -----|B| |B|---- memif11 # |o| |o| # |n|------|n| # |d| |d| # memif2 -----|0| |1|---- memif12 # +-+ +-+ socket1 = VppSocketFilename( self, socket_id=1, socket_filename="%s/memif.sock1" % self.tempdir) socket1.add_vpp_config() socket11 = VppSocketFilename( self, socket_id=2, socket_filename="%s/memif.sock1" % self.tempdir) socket11.add_vpp_config() socket2 = VppSocketFilename( self, socket_id=3, socket_filename="%s/memif.sock2" % self.tempdir) socket2.add_vpp_config() socket22 = VppSocketFilename( self, socket_id=4, socket_filename="%s/memif.sock2" % self.tempdir) socket22.add_vpp_config() memif1 = VppMemif( self, role=VppEnum.vl_api_memif_role_t.MEMIF_ROLE_API_MASTER, mode=VppEnum.vl_api_memif_mode_t.MEMIF_MODE_API_ETHERNET, socket_id=1) memif1.add_vpp_config() memif1.admin_up() memif11 = VppMemif( self, role=VppEnum.vl_api_memif_role_t.MEMIF_ROLE_API_SLAVE, mode=VppEnum.vl_api_memif_mode_t.MEMIF_MODE_API_ETHERNET, socket_id=2) memif11.add_vpp_config() memif11.admin_up() memif2 = VppMemif( self, role=VppEnum.vl_api_memif_role_t.MEMIF_ROLE_API_MASTER, mode=VppEnum.vl_api_memif_mode_t.MEMIF_MODE_API_ETHERNET, socket_id=3) memif2.add_vpp_config() memif2.admin_up() memif12 = VppMemif( self, role=VppEnum.vl_api_memif_role_t.MEMIF_ROLE_API_SLAVE, mode=VppEnum.vl_api_memif_mode_t.MEMIF_MODE_API_ETHERNET, socket_id=4) memif12.add_vpp_config() memif12.admin_up() self.logger.info(self.vapi.ppcli("debug lacp on")) bond0 = VppBondInterface( self, mode=VppEnum.vl_api_bond_mode_t.BOND_API_MODE_LACP, use_custom_mac=1, mac_address=bond_mac) bond0.add_vpp_config() bond0.admin_up() bond1 = VppBondInterface( self, mode=VppEnum.vl_api_bond_mode_t.BOND_API_MODE_LACP) bond1.add_vpp_config() bond1.admin_up() # add member memif1 and memif2 to bond0 bond0.add_member_vpp_bond_interface(sw_if_index=memif1.sw_if_index) bond0.add_member_vpp_bond_interface(sw_if_index=memif2.sw_if_index) # add member memif11 and memif12 to bond1 bond1.add_member_vpp_bond_interface(sw_if_index=memif11.sw_if_index) bond1.add_member_vpp_bond_interface(sw_if_index=memif12.sw_if_index) # wait for memif protocol exchange and hardware carrier to come up self.assertEqual(memif1.wait_for_link_up(10), True) self.assertEqual(memif2.wait_for_link_up(10), True) self.assertEqual(memif11.wait_for_link_up(10), True) self.assertEqual(memif12.wait_for_link_up(10), True) # verify memif1 and memif2 in bond0 intfs = self.vapi.sw_member_interface_dump( sw_if_index=bond0.sw_if_index) for intf in intfs: self.assertIn( intf.sw_if_index, (memif1.sw_if_index, memif2.sw_if_index)) # verify memif11 and memif12 in bond1 intfs = self.vapi.sw_member_interface_dump( sw_if_index=bond1.sw_if_index) for intf in intfs: self.assertIn( intf.sw_if_index, (memif11.sw_if_index, memif12.sw_if_index)) self.assertEqual(intf.is_long_timeout, 0) self.assertEqual(intf.is_passive, 0) # Let LACP create the bundle self.wait_for_lacp_connect(30) intfs = self.vapi.sw_interface_lacp_dump() for intf in intfs: self.assertEqual( intf.actor_state, LACP_COLLECTION_AND_DISTRIBUTION_STATE) self.assertEqual( intf.partner_state, LACP_COLLECTION_AND_DISTRIBUTION_STATE) intfs = self.vapi.sw_bond_interface_dump(sw_if_index=0xFFFFFFFF) for intf in intfs: self.assertEqual(intf.members, 2) self.assertEqual(intf.active_members, 2) self.assertEqual( intf.mode, VppEnum.vl_api_bond_mode_t.BOND_API_MODE_LACP) self.logger.info(self.vapi.ppcli("show lacp")) self.logger.info(self.vapi.ppcli("show lacp details")) # detach member memif1 bond0.detach_vpp_bond_interface(sw_if_index=memif1.sw_if_index) self.wait_for_member_detach(bond0, timeout=10, count=1) intfs = self.vapi.sw_bond_interface_dump( sw_if_index=bond0.sw_if_index) for intf in intfs: self.assertEqual(intf.members, 1) self.assertEqual(intf.active_members, 1) self.assertEqual( intf.mode, VppEnum.vl_api_bond_mode_t.BOND_API_MODE_LACP) # detach member memif2 bond0.detach_vpp_bond_interface(sw_if_index=memif2.sw_if_index) self.wait_for_member_detach(bond0, timeout=10, count=0) intfs = self.vapi.sw_bond_interface_dump( sw_if_index=bond0.sw_if_index) for intf in intfs: self.assertEqual(intf.members, 0) self.assertEqual(intf.active_members, 0) bond0.remove_vpp_config() bond1.remove_vpp_config() if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)