API: Fix shared memory only action handlers.
Some API action handlers called vl_msg_ai_send_shmem()
directly. That breaks Unix domain socket API transport.
A couple (bond / vhost) also tried to send a sw_interface_event
directly, but did not send the message to all that had
registred interest. That scheme never worked correctly.
Refactored and improved the interface event code.
Change-Id: Idb90edfd8703c6ae593b36b4eeb4d3ed7da5c808
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/test/test_vhost.py b/test/test_vhost.py
index 15eb070..c657da7 100644
--- a/test/test_vhost.py
+++ b/test/test_vhost.py
@@ -92,8 +92,8 @@
vhost_if.add_vpp_config()
self.sleep(0.1)
events = self.vapi.collect_events()
- # creating interface doesn't currently create events
- self.assert_equal(len(events), 0, "number of 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)