From: "Zhu, WenhuiX" <wenhuix.zhu@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Ma, LihongX" <lihongx.ma@intel.com>
Subject: Re: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet
Date: Thu, 23 May 2019 03:06:34 +0000 [thread overview]
Message-ID: <E08767FB2CE10642B6780736EAC070F6049537B0@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1558547911-3295-1-git-send-email-lihongx.ma@intel.com>
Tested-by: Zhu, WenhuiX <wenhuix.zhu@intel.com>
-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
Sent: Thursday, May 23, 2019 1:59 AM
To: dts@dpdk.org
Cc: Ma, LihongX <lihongx.ma@intel.com>
Subject: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet
When bonding mode is 5, after set the promisc off on bond port, the primary slave port should also change to promisc off, so should get the primary port before send packet to verify it.
Signed-off-by: lihong <lihongx.ma@intel.com>
---
tests/TestSuite_pmd_bonded.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.py index 78d5d21..9ae6d32 100644
--- a/tests/TestSuite_pmd_bonded.py
+++ b/tests/TestSuite_pmd_bonded.py
@@ -965,6 +965,7 @@ UDP(sport=srcport, dport=destport)/Raw(load="\x50"*%s)], iface="%s", count=%d)'
slaves = {}
slaves['active'] = [self.dut_ports[0]]
slaves['inactive'] = []
+ curr_primary = self.dut_ports[0]
pkt_now, summary = self.send_customized_packet_to_slave(unbound_port, bond_port, *pkt_info, **slaves)
if mode_set == MODE_LACP:
@@ -997,6 +998,8 @@ UDP(sport=srcport, dport=destport)/Raw(load="\x50"*%s)], iface="%s", count=%d)'
self.verify(port_disabled_num == 2,
"Not only the primary slave turn promiscous mode off in mode %d, " % mode_set +
" when bonded device promiscous disabled.")
+ curr_primary = int(self.get_bond_primary(bond_port))
+ slaves['active'] = [curr_primary]
if mode_set != MODE_LACP:
send_param['verify'] = True @@ -1011,7 +1014,7 @@ UDP(sport=srcport, dport=destport)/Raw(load="\x50"*%s)], iface="%s", count=%d)'
pkt_size == LACP_MESSAGE_SIZE,
"Data received by slave or bonding device when promiscuous disabled")
else:
- self.verify(pkt_now[self.dut_ports[0]][0] == 0 and
+ self.verify(pkt_now[curr_primary][0] == 0 and
pkt_now[bond_port][0] == 0,
"Data received by slave or bonding device when promiscuous disabled")
@@ -1026,7 +1029,7 @@ UDP(sport=srcport, dport=destport)/Raw(load="\x50"*%s)], iface="%s", count=%d)'
pkt_size != LACP_MESSAGE_SIZE,
"RX or TX packet number not correct when promiscuous disabled")
else:
- self.verify(pkt_now[self.dut_ports[0]][0] == pkt_now[bond_port][0] and
+ self.verify(pkt_now[curr_primary][0] ==
+ pkt_now[bond_port][0] and
pkt_now[self.dut_ports[3]][0] == pkt_now[bond_port][0] and
pkt_now[bond_port][0] == pkt_count,
"RX or TX packet number not correct when promiscuous disabled")
--
2.7.4
next prev parent reply other threads:[~2019-05-23 3:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 17:58 lihong
2019-05-23 3:06 ` Zhu, WenhuiX [this message]
2019-05-23 3:36 ` Li, WenjieX A
2019-05-29 2:35 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E08767FB2CE10642B6780736EAC070F6049537B0@shsmsx102.ccr.corp.intel.com \
--to=wenhuix.zhu@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).