summaryrefslogtreecommitdiffstats
path: root/src/vlib/error.c
AgeCommit message (Expand)AuthorFilesLines
2022-03-09stats: refactorDamjan Marion1-10/+8
2021-10-06tcp: fix severity infoFilip Tehlar1-3/+3
2021-05-06vlib: rename vl_counter_t to vlib_error_desc_tOle Troan1-3/+2
2021-05-06memif: add severity to countersOle Troan1-1/+1
2021-04-22misc: add filter for specific error for pcap traceBenoît Ganne1-0/+31
2021-03-26vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendlyDamjan Marion1-41/+38
2020-10-20stats: crash when adding/deleting interfacesOle Troan1-4/+3
2020-10-14vlib: avoid clipping in show errorFlorin Coras1-4/+4
2020-10-13stats: counters data modelOle Troan1-20/+52
2020-05-11vlib: fix u64 error counter cli printingFlorin Coras1-3/+3
2019-07-23vlib: address vlib_error_t scaling issueDave Barach1-1/+8
2019-07-22stats: fix use-after-free hash key stringBenoît Ganne1-3/+6
2019-06-18stats: fix memory leakage when adding / deleting interfacesOle Troan1-1/+1
2019-05-22stats: support multiple works for error countersOle Troan1-17/+3
2019-01-24move misc-drop-errors to vnetDave Barach1-31/+0
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-1/+1
2018-10-23c11 safe string handling supportDave Barach1-3/+3
2018-09-17STATS: Dynamically mapped shared memory segmentOle Troan1-3/+5
2018-08-29STATS: stat_client updates.Ole Troan1-1/+1
2018-06-15STATS: Add more hierarchy to counters.Ole Troan1-1/+1
2018-06-08export counters in a memfd segmentDave Barach1-1/+36
2017-08-02Fix tcp tx buffer allocationFlorin Coras1-1/+1
2017-04-06Use thread local storage for thread indexDamjan Marion1-1/+1
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+338
logger.info("Vhost User add interfaces") # create interface 1 (VirtualEthernet0/0/0) vhost_if1 = VppVhostInterface(self, sock_filename=b'/tmp/sock1') vhost_if1.add_vpp_config() vhost_if1.admin_up() # create interface 2 (VirtualEthernet0/0/1) vhost_if2 = VppVhostInterface(self, sock_filename=b'/tmp/sock2') vhost_if2.add_vpp_config() vhost_if2.admin_up() # verify both interfaces in the show ifs = self.vapi.cli("show interface") self.assertIn('VirtualEthernet0/0/0', ifs) self.assertIn('VirtualEthernet0/0/1', ifs) # verify they are in the dump also if_dump = self.vapi.sw_interface_vhost_user_dump() self.assertTrue(vhost_if1.is_interface_config_in_dump(if_dump)) self.assertTrue(vhost_if2.is_interface_config_in_dump(if_dump)) # delete VirtualEthernet0/0/1 self.logger.info("Deleting VirtualEthernet0/0/1") vhost_if2.remove_vpp_config() self.logger.info("Verifying VirtualEthernet0/0/1 is deleted") ifs = self.vapi.cli("show interface") # verify VirtualEthernet0/0/0 still in the show self.assertIn('VirtualEthernet0/0/0', ifs) # verify VirtualEthernet0/0/1 not in the show self.assertNotIn('VirtualEthernet0/0/1', ifs) # verify VirtualEthernet0/0/1 is not in the dump if_dump = self.vapi.sw_interface_vhost_user_dump() self.assertFalse(vhost_if2.is_interface_config_in_dump(if_dump)) # verify VirtualEthernet0/0/0 is still in the dump self.assertTrue(vhost_if1.is_interface_config_in_dump(if_dump)) # delete VirtualEthernet0/0/0 self.logger.info("Deleting VirtualEthernet0/0/0") vhost_if1.remove_vpp_config() self.logger.info("Verifying VirtualEthernet0/0/0 is deleted") # verify VirtualEthernet0/0/0 not in the show ifs = self.vapi.cli("show interface") self.assertNotIn('VirtualEthernet0/0/0', ifs) # verify VirtualEthernet0/0/0 is not in the dump if_dump = self.vapi.sw_interface_vhost_user_dump() self.assertFalse(vhost_if1.is_interface_config_in_dump(if_dump)) def test_vhost_interface_state(self): """ Vhost User interface states and events test """ self.vapi.want_interface_events() # clear outstanding events # (like delete interface events from other tests) self.vapi.collect_events() vhost_if = VppVhostInterface(self, sock_filename=b'/tmp/sock1') # create vhost interface vhost_if.add_vpp_config() self.sleep(0.1) events = self.vapi.collect_events() # creating interface does now create events self.assert_equal(len(events), 1, "number of events") vhost_if.admin_up() vhost_if.assert_interface_state(1, 0, expect_event=True) vhost_if.admin_down() vhost_if.assert_interface_state(0, 0, expect_event=True) # delete vhost interface vhost_if.remove_vpp_config() event = self.vapi.wait_for_event(timeout=1) self.assert_equal(event.sw_if_index, vhost_if.sw_if_index, "sw_if_index") self.assert_equal(event.deleted, 1, "deleted flag") # verify there are no more events events = self.vapi.collect_events() self.assert_equal(len(events), 0, "number of events") if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)