[dts] [PATCH] pktgen_ixia: Exit on failure of clear/take port ownership
Tu, Lijuan
lijuan.tu at intel.com
Wed Aug 28 12:06:23 CEST 2019
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of
> pvukkisala at marvell.com
> Sent: Wednesday, August 14, 2019 10:08 PM
> To: dts at dpdk.org
> Cc: avijay at marvell.com; fmasood at marvell.com; Phanendra Vukkisala
> <pvukkisala at marvell.com>
> Subject: [dts] [PATCH] pktgen_ixia: Exit on failure of clear/take port
> ownership
>
> From: Phanendra Vukkisala <pvukkisala at marvell.com>
>
> Signed-off-by: Phanendra Vukkisala <pvukkisala at marvell.com>
> ---
> framework/pktgen_ixia.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py index
> 2895c6b..1e0675d 100644
> --- a/framework/pktgen_ixia.py
> +++ b/framework/pktgen_ixia.py
> @@ -601,14 +601,18 @@ class Ixia(SSHConnection):
> "set chasId [ixGetChassisID %s]" % self.tclServerIP, "% ")
> self.chasId = int(out.strip())
>
> - self.send_expect("ixClearOwnership [list %s]" % string.join(
> + out = self.send_expect("ixClearOwnership [list %s]" %
> + string.join(
> ['[list %d %d %d]' % (self.chasId, item['card'], item['port'])
> for item in self.ports], ' '),
> "% ", 10)
> - self.send_expect("ixTakeOwnership [list %s] force" % string.join(
> + if out.strip()[-1] != '0':
> + return False
> + out = self.send_expect("ixTakeOwnership [list %s] force" %
> + string.join(
> ['[list %d %d %d]' % (self.chasId, item['card'], item['port'])
> for item in self.ports], ' '),
> "% ", 10)
> + if out.strip()[-1] != '0':
> + return False
>
> return True
>
> --
> 1.7.9.5
More information about the dts
mailing list