summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
AgeCommit message (Expand)AuthorFilesLines
2019-02-09buffers: fix typoDamjan Marion1-2/+2
2019-02-06buffers: make buffer data size configurable from startup configDamjan Marion1-2/+2
2019-02-01memif: fix buffer prefetchDamjan Marion1-4/+5
2019-01-30buffers: add missing ref_count = 1 in driversDamjan Marion1-0/+1
2019-01-30buffers: major cleanup and improvementsDamjan Marion3-3/+12
2019-01-20buffers: keep buffer_main in vlib_main_tDamjan Marion1-1/+1
2019-01-18deprecate clib_memcpy64_x4Damjan Marion2-14/+18
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-0/+2
2018-11-20memif input-node improvementsDamjan Marion1-11/+34
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach2-26/+26
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-3/+3
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion1-5/+5
2018-10-23c11 safe string handling supportDave Barach4-12/+12
2018-10-09memif: coverity fixJakub Grajciar1-2/+4
2018-10-08memif: socket filename add/del bugfixJakub Grajciar1-3/+3
2018-10-03memif: include interface name in logsJuraj Sloboda3-29/+57
2018-10-03VPP-1440: clean up coverity warningsDave Barach1-2/+2
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-1/+1
2018-09-12Fix create memif socketEd Warnicke1-16/+0
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-0/+5
2018-08-27cmake: add missing vat pluginsDamjan Marion1-0/+3
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-4/+6
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+27
2018-08-13Multiarch handling in different constructor macrosDamjan Marion2-13/+8
2018-08-11Multiversioning: Device (tx) function constructorMohsin Kazmi1-17/+3
2018-07-31memif: socket filename fixJakub Grajciar1-11/+19
2018-07-25VPP-1332 memif: add/del socket filename bugfixJakub Grajciar1-1/+27
2018-07-17memif: vectorized buffer enqueue in input nodeDamjan Marion1-146/+121
2018-07-11avoid using thread local storage for thread indexDamjan Marion2-3/+3
2018-07-11memif: fix max number of ringsDamjan Marion2-4/+4
2018-06-29memif: minor fixesDamjan Marion1-1/+1
2018-06-27gcc8 and Wstringop-truncationMarco Varlese1-1/+1
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion2-22/+7
2018-05-25memif: Add support for loggingJakub Grajciar3-56/+90
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach1-0/+2
2018-04-05memif: bug fixesDamjan Marion2-22/+74
2018-04-04memif: zero copy slaveDamjan Marion6-145/+653
2018-03-27memif: add private header size fieldDamjan Marion2-0/+5
2018-03-22memif: version 2Damjan Marion6-486/+558
2018-02-27memif: Fix a message initialization problem in VATJon Loeliger1-3/+2
2018-02-16memif: VPP-1172: Ensure memif_create reply contains sw_if_indexJon Loeliger1-1/+6
2018-02-09memif: fix crash caused by zero pkt len in memif and clear dirty cache while ...Chun Li5-12/+102
2018-02-06vlib: epoll on worker threadsDamjan Marion2-0/+11
2018-01-29memif: Add new API calls to manage memif socket names.Jon Loeliger7-102/+647
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
2018-01-11api: remove transport specific code from handlersFlorin Coras1-6/+6
2018-01-11Remove vpp_api_test interface name filter catalogDave Barach1-0/+1
2018-01-09memif: fix coverity divide by zeroSteven1-0/+1
2018-01-09api: refactor vlibmemoryFlorin Coras2-5/+5
2017-11-23memif: fix input node multiversion constructorDamjan Marion1-6/+6
lass="p">(src=bond0_mac, dst=self.pg2.local_mac) / IP(src=self.pg2.local_ip4, dst="10.10.10.12") / UDP(sport=1235, dport=1235) / Raw(b'\xa5' * 100)) self.pg2.add_stream(p2) # generate a packet from pg3 -> BondEthernet0 -> pg0 # BondEthernet0 TX hashes this packet to pg0 # notice the ip address and ports are different than p2 packet p3 = (Ether(src=bond0_mac, dst=self.pg3.local_mac) / IP(src=self.pg3.local_ip4, dst="10.10.10.11") / UDP(sport=1234, dport=1234) / Raw(b'\xa5' * 100)) self.pg3.add_stream(p3) self.pg_enable_capture(self.pg_interfaces) # set up the static arp entries pointing to the BondEthernet0 interface # so that it does not try to resolve the ip address self.logger.info(self.vapi.cli( "set ip neighbor static BondEthernet0 10.10.10.12 abcd.abcd.0002")) self.logger.info(self.vapi.cli( "set ip neighbor static BondEthernet0 10.10.10.11 abcd.abcd.0004")) # clear the interface counters self.logger.info(self.vapi.cli("clear interfaces")) self.pg_start() self.logger.info("check the interface counters") # verify counters # BondEthernet0 tx bytes = 284 intfs = self.vapi.cli("show interface BondEthernet0").split("\n") found = 0 for intf in intfs: if "tx bytes" in intf and "284" in intf: found = 1 self.assertEqual(found, 1) # BondEthernet0 tx bytes = 284 intfs = self.vapi.cli("show interface BondEthernet0").split("\n") found = 0 for intf in intfs: if "tx bytes" in intf and "284" in intf: found = 1 self.assertEqual(found, 1) # pg2 rx bytes = 142 intfs = self.vapi.cli("show interface pg2").split("\n") found = 0 for intf in intfs: if "rx bytes" in intf and "142" in intf: found = 1 self.assertEqual(found, 1) # pg3 rx bytes = 142 intfs = self.vapi.cli("show interface pg3").split("\n") found = 0 for intf in intfs: if "rx bytes" in intf and "142" in intf: found = 1 self.assertEqual(found, 1) bond0.remove_vpp_config() def test_bond_add_member(self): """ Bond add_member/detach member test """ # create interface (BondEthernet0) and set bond mode to LACP self.logger.info("create bond") bond0 = VppBondInterface( self, mode=VppEnum.vl_api_bond_mode_t.BOND_API_MODE_LACP, enable_gso=0) bond0.add_vpp_config() bond0.admin_up() # verify that interfaces can be added as_member and detached two times for i in range(2): # verify pg0 and pg1 not in BondEthernet0 if_dump = self.vapi.sw_member_interface_dump(bond0.sw_if_index) self.assertFalse(self.pg0.is_interface_config_in_dump(if_dump)) self.assertFalse(self.pg1.is_interface_config_in_dump(if_dump)) # add_member pg0 and pg1 to BondEthernet0 self.logger.info("bond add_member interface pg0 to BondEthernet0") bond0.add_member_vpp_bond_interface( sw_if_index=self.pg0.sw_if_index, is_passive=0, is_long_timeout=0) self.logger.info("bond add_member interface pg1 to BondEthernet0") bond0.add_member_vpp_bond_interface( sw_if_index=self.pg1.sw_if_index, is_passive=0, is_long_timeout=0) # verify both members in BondEthernet0 if_dump = self.vapi.sw_member_interface_dump(bond0.sw_if_index) self.assertTrue(self.pg0.is_interface_config_in_dump(if_dump)) self.assertTrue(self.pg1.is_interface_config_in_dump(if_dump)) # detach interface pg0 self.logger.info("detach interface pg0") bond0.detach_vpp_bond_interface(sw_if_index=self.pg0.sw_if_index) # verify pg0 is not in BondEthernet0, but pg1 is if_dump = self.vapi.sw_member_interface_dump(bond0.sw_if_index) self.assertFalse(self.pg0.is_interface_config_in_dump(if_dump)) self.assertTrue(self.pg1.is_interface_config_in_dump(if_dump)) # detach interface pg1 self.logger.info("detach interface pg1") bond0.detach_vpp_bond_interface(sw_if_index=self.pg1.sw_if_index) # verify pg0 and pg1 not in BondEthernet0 if_dump = self.vapi.sw_member_interface_dump(bond0.sw_if_index) self.assertFalse(self.pg0.is_interface_config_in_dump(if_dump)) self.assertFalse(self.pg1.is_interface_config_in_dump(if_dump)) bond0.remove_vpp_config() def test_bond(self): """ Bond add/delete interface test """ self.logger.info("Bond add interfaces") # create interface 1 (BondEthernet0) bond0 = VppBondInterface( self, mode=VppEnum.vl_api_bond_mode_t.BOND_API_MODE_LACP) bond0.add_vpp_config() bond0.admin_up() # create interface 2 (BondEthernet1) bond1 = VppBondInterface( self, mode=VppEnum.vl_api_bond_mode_t.BOND_API_MODE_XOR) bond1.add_vpp_config() bond1.admin_up() # verify both interfaces in the show ifs = self.vapi.cli("show interface") self.assertIn('BondEthernet0', ifs) self.assertIn('BondEthernet1', ifs) # verify they are in the dump also if_dump = self.vapi.sw_bond_interface_dump(sw_if_index=0xFFFFFFFF) self.assertTrue(bond0.is_interface_config_in_dump(if_dump)) self.assertTrue(bond1.is_interface_config_in_dump(if_dump)) # delete BondEthernet1 self.logger.info("Deleting BondEthernet1") bond1.remove_vpp_config() self.logger.info("Verifying BondEthernet1 is deleted") ifs = self.vapi.cli("show interface") # verify BondEthernet0 still in the show self.assertIn('BondEthernet0', ifs) # verify BondEthernet1 not in the show self.assertNotIn('BondEthernet1', ifs) # verify BondEthernet1 is not in the dump if_dump = self.vapi.sw_bond_interface_dump(sw_if_index=0xFFFFFFFF) self.assertFalse(bond1.is_interface_config_in_dump(if_dump)) # verify BondEthernet0 is still in the dump self.assertTrue(bond0.is_interface_config_in_dump(if_dump)) # delete BondEthernet0 self.logger.info("Deleting BondEthernet0") bond0.remove_vpp_config() self.logger.info("Verifying BondEthernet0 is deleted") # verify BondEthernet0 not in the show ifs = self.vapi.cli("show interface") self.assertNotIn('BondEthernet0', ifs) # verify BondEthernet0 is not in the dump if_dump = self.vapi.sw_bond_interface_dump( sw_if_index=bond0.sw_if_index) self.assertFalse(bond0.is_interface_config_in_dump(if_dump)) def test_bond_link(self): """ Bond hw interface link state test """ # for convenience bond_modes = VppEnum.vl_api_bond_mode_t intf_flags = VppEnum.vl_api_if_status_flags_t # create interface 1 (BondEthernet0) self.logger.info("Create bond interface") # use round-robin mode to avoid negotiation required by LACP bond0 = VppBondInterface(self, mode=bond_modes.BOND_API_MODE_ROUND_ROBIN) bond0.add_vpp_config() # set bond admin up. self.logger.info("set interface BondEthernet0 admin up") bond0.admin_up() # confirm link up bond0.assert_interface_state(intf_flags.IF_STATUS_API_FLAG_ADMIN_UP, intf_flags.IF_STATUS_API_FLAG_LINK_UP) # toggle bond admin state self.logger.info("toggle interface BondEthernet0") bond0.admin_down() bond0.admin_up() # confirm link is still up bond0.assert_interface_state(intf_flags.IF_STATUS_API_FLAG_ADMIN_UP, intf_flags.IF_STATUS_API_FLAG_LINK_UP) # delete BondEthernet0 self.logger.info("Deleting BondEthernet0") bond0.remove_vpp_config() if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)