summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Expand)AuthorFilesLines
2019-06-04elog: make elog_string() multi-thread safeSteven Luong1-0/+2
2019-06-04punt: fix the set_punt API/CLI which was rejecting valid portsNeale Ranns1-11/+11
2019-06-04features will register udp ports once configuredJakub Grajciar4-18/+38
2019-06-04Fix: bug prevented IPsec ipv4 SPDs to show correctlyGuillaume Solignac1-4/+9
2019-06-04sort worker-thread init functions in advanceDave Barach5-12/+71
2019-06-04stats: removing empty object in stats vectorOle Troan2-2/+4
2019-06-04Punt: specify packets by IP protocol TypeNeale Ranns11-38/+282
2019-06-04mactime: upstream new featuresDave Barach6-25/+161
2019-06-04dpdk: rework extended statsFilip Tehlar4-47/+33
2019-06-04startup: remove dpdk linking bonding configurationZhiyong Yang1-10/+0
2019-06-04srp: leverage vlib_buffer_get_currentZhiyong Yang1-3/+3
2019-06-03GBP: add subnet cli commandBenoƮt Ganne1-2/+85
2019-06-03ARP: add feature arcNeale Ranns7-168/+508
2019-06-03crypto_ia32: native AES-GCM implementationDamjan Marion5-1/+1046
2019-06-02IPSec: memcpy of integ key borkNeale Ranns1-1/+1
2019-05-31VPP-1692: move NULL pointer checkDave Barach1-5/+5
2019-05-31tools: FEATURE.yaml meta-data infrastructureOle Troan4-0/+179
2019-05-31crypo_ia32: don't optimize debug buildsDamjan Marion2-1/+5
2019-05-31Update vnet hardware flags if link state changesDave Barach1-1/+9
2019-05-31bonding: add support for numa awarenessZhiyong Yang4-12/+90
2019-05-30nat44: fix CLI doc errorjackiechen19851-2/+2
2019-05-30IP load-balance; perf improvement using the usual reciepeNeale Ranns2-305/+233
2019-05-30FIB: correctly report IPv6 FIB Unicast and Multicast memory usage (VPP-1578)"Neale Ranns6-16/+34
2019-05-30lisp-cp: start lisp retry service on demandFlorin Coras2-8/+18
2019-05-30sample-plugin: refactor .api to use explicit typesOle Troan1-8/+9
2019-05-30ipip: refactor ipip.api with explicit typesOle Troan3-24/+17
2019-05-30dpdk: remove bonding codeDamjan Marion6-251/+11
2019-05-30NAT: create bypass in correct thread if workers>1Alexander Chernavin1-9/+40
2019-05-30Start the dns resolver process on demandDave Barach3-8/+19
2019-05-30IPsec: modify post-decrypt buf len calculationMatthew G Smith1-2/+2
2019-05-30mpls: leverage vlib_buffer_advanceZhiyong Yang1-7/+4
2019-05-30osi_input: leverage vlib_buffer_get_currentZhiyong Yang1-3/+3
2019-05-29ipsec: fix perf issue in esp_aad_fillDamjan Marion1-4/+7
2019-05-29Start the cdp period process on demandDave Barach4-22/+20
2019-05-29vxlan-gbp: prefetch encap header memory areaZhiyong Yang1-66/+70
2019-05-29dpdk: make sure each segment have initalized rte_mbufDamjan Marion1-12/+4
2019-05-29Break out the broom for some cleanup workDave Barach2-0/+38
2019-05-29map: Use vl_api_string macros.Paul Vinciguerra2-27/+9
2019-05-29plugins: http_static. Migrate to use api string type.Paul Vinciguerra3-11/+23
2019-05-28nsim: remove buffer u32 upper boundKorian Edeline1-1/+1
2019-05-28l2tp: l2tp-decap-local don't accept packets unless configuredJakub Grajciar3-10/+10
2019-05-28ipsec: ah_encrypt reworkFilip Tehlar1-194/+280
2019-05-28docs: Add VPP API language documentationOle Troan1-0/+343
2019-05-28Punt: socket register for exception dispatched/punted packets based on reasonNeale Ranns20-811/+1561
2019-05-28Add an ip6 local hop-by-hop protocol demux tableDave Barach4-26/+343
2019-05-28nat44: make nat44-ed-hairpin-src follow arcMatthew Smith1-1/+1
2019-05-28gre: don't register gre input nodes unless a gre tunnel is createdJakub Grajciar2-3/+4
2019-05-28papi: avoid IOError on disconnectVratko Polak2-6/+18
2019-05-28tap: crash in multi-thread environmentMohsin Kazmi3-5/+4
2019-05-28snap_input: simplify code using existing functionsZhiyong Yang1-11/+6
class="p">( self, mode=VppEnum.vl_api_bond_mode_t.BOND_API_MODE_LACP) bond1.add_vpp_config() bond1.admin_up() bond0.add_member_vpp_bond_interface(sw_if_index=memif1.sw_if_index) bond1.add_member_vpp_bond_interface(sw_if_index=memif11.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(memif11.wait_for_link_up(10), True) # verify memif1 in bond0 intfs = self.vapi.sw_member_interface_dump( sw_if_index=bond0.sw_if_index) for intf in intfs: self.assertEqual(intf.sw_if_index, memif1.sw_if_index) # verify memif11 in bond1 intfs = self.vapi.sw_member_interface_dump( sw_if_index=bond1.sw_if_index) for intf in intfs: self.assertEqual(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)