From 1ea6b99c3282724cf550f71979121e6ee728f126 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Thu, 17 May 2018 02:07:26 -0700 Subject: vpp: Implement missing dump and del functions Implementaiton of VPP methods dump_xconnect(), del_xconnect() and del_bridge(). JIRA: VSPERF-576 Change-Id: Ifb3094d11d1b135e9a33effb1bf6d502db319a30 Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Richard Elias --- vswitches/vpp_dpdk_vhost.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vswitches/vpp_dpdk_vhost.py b/vswitches/vpp_dpdk_vhost.py index bdb5ff81..15e32f32 100644 --- a/vswitches/vpp_dpdk_vhost.py +++ b/vswitches/vpp_dpdk_vhost.py @@ -317,15 +317,17 @@ class VppDpdkVhost(IVSwitch, tasks.Process): if bidir: self.run_vppctl(['test', 'l2patch', 'rx', port2, 'tx', port1, 'del']) - def del_xconnect(self, _dummy_port1, _dummy_port2, _dummy_bidir=False): + def del_xconnect(self, port1, port2, _dummy_bidir=False): """Remove xconnect connection between given ports """ - self._logger.warning('VPP: Removal of l2 xconnect is not implemented.') + self.run_vppctl(['set', 'interface', 'l3', port1]) + self.run_vppctl(['set', 'interface', 'l3', port2]) - def del_bridge(self, _dummy_switch_name, _dummy_port1, _dummy_port2): + def del_bridge(self, _dummy_switch_name, port1, port2): """Remove given ports from the bridge """ - self._logger.warning('VPP: Removal of interfaces from bridge is not implemented.') + self.run_vppctl(['set', 'interface', 'l3', port1]) + self.run_vppctl(['set', 'interface', 'l3', port2]) def del_connection(self, switch_name, port1, port2, bidir=False): """See IVswitch for general description @@ -350,7 +352,7 @@ class VppDpdkVhost(IVSwitch, tasks.Process): def dump_xconnect(self): """Dump l2 xconnect connections """ - self._logger.warning("VPP: Dump of l2 xconnections is not supported.") + self.run_vppctl(['show', 'mode'] + self._phy_ports + self._virt_ports) def dump_bridge(self, switch_name): """Show bridge details -- cgit 1.2.3-korg