aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-06-26 17:24:56 +0200
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-06-26 19:45:43 +0000
commita37810dcf4bf3028992abc249bf1f8e96e24a678 (patch)
tree9f77c08da50f52e38c97218356582434836c0d89
parentc930cda331cad99444a22e6b673c869bc8748f7f (diff)
papi: prevent message_table inconsistencies
Socket transport is maintaining message_table to map message name to index. After disconnect and re-connect, the VPP may have been restarted with different set of plugins, so message_table has to be wiped. + Edited MAINTAINERS to recognize "papi" as a separate component. Type: fix Change-Id: I1f16ad7ee0886e03bbc6a17bcddbfcaa322354e5 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
-rw-r--r--MAINTAINERS20
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_transport_socket.py2
2 files changed, 15 insertions, 7 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index d2af18aa16f..ad13219c46f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -79,13 +79,13 @@ M: Damjan Marion <damarion@cisco.com>
F: src/vnet/devices/
VNET TAP Drivers
-I: tap
-M: Damjan Marion <damarion@cisco.com>
-M: Steven Luong <sluong@cisco.com>
-M: Mohsin Kazmi <sykazmi@cisco.com>
-F: src/vnet/devices/tap/
-F: src/vnet/devices/virtio/node.c
-F: src/vnet/devices/virtio/device.c
+I: tap
+M: Damjan Marion <damarion@cisco.com>
+M: Steven Luong <sluong@cisco.com>
+M: Mohsin Kazmi <sykazmi@cisco.com>
+F: src/vnet/devices/tap/
+F: src/vnet/devices/virtio/node.c
+F: src/vnet/devices/virtio/device.c
VNET Feature Arcs
I: feature
@@ -426,6 +426,12 @@ M: Aloys Augustin <aloaugus@cisco.com>
M: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
F: src/plugins/hs_apps/
+Python binding for the VPP API
+I: papi
+M: Ole Troan <ot@cisco.com>
+M: Paul Vinciguerra <pvinci@vinciconsulting.com>
+F: src/vpp-api/python
+
THE REST
I: misc
C: Contact vpp-dev Mailing List <vpp-dev@fd.io>
diff --git a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py
index ee142584c86..6c06791959d 100644
--- a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py
+++ b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py
@@ -152,6 +152,8 @@ class VppTransport(object):
if self.message_thread is not None and self.message_thread.is_alive():
# Allow additional connect() calls.
self.message_thread.join()
+ # Wipe message table, VPP can be restarted with different plugins.
+ self.message_table = {}
# Collect garbage.
self.message_thread = None
self.socket = None