* [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet
@ 2019-05-22 17:58 lihong
2019-05-23 3:06 ` Zhu, WenhuiX
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: lihong @ 2019-05-22 17:58 UTC (permalink / raw)
To: dts; +Cc: lihong
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet
2019-05-22 17:58 [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet lihong
@ 2019-05-23 3:06 ` Zhu, WenhuiX
2019-05-23 3:36 ` Li, WenjieX A
2019-05-29 2:35 ` Tu, Lijuan
2 siblings, 0 replies; 4+ messages in thread
From: Zhu, WenhuiX @ 2019-05-23 3:06 UTC (permalink / raw)
To: Ma, LihongX, dts; +Cc: Ma, LihongX
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet
2019-05-22 17:58 [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet lihong
2019-05-23 3:06 ` Zhu, WenhuiX
@ 2019-05-23 3:36 ` Li, WenjieX A
2019-05-29 2:35 ` Tu, Lijuan
2 siblings, 0 replies; 4+ messages in thread
From: Li, WenjieX A @ 2019-05-23 3:36 UTC (permalink / raw)
To: Ma, LihongX, dts; +Cc: Ma, LihongX
Reviewed-by: Wenjie <wenjiex.a.li@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet
2019-05-22 17:58 [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet lihong
2019-05-23 3:06 ` Zhu, WenhuiX
2019-05-23 3:36 ` Li, WenjieX A
@ 2019-05-29 2:35 ` Tu, Lijuan
2 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2019-05-29 2:35 UTC (permalink / raw)
To: Ma, LihongX, dts; +Cc: Ma, LihongX
Applied, thanks
> -----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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-29 2:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 17:58 [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet lihong
2019-05-23 3:06 ` Zhu, WenhuiX
2019-05-23 3:36 ` Li, WenjieX A
2019-05-29 2:35 ` Tu, Lijuan
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).