[dts] [PATCH V1] tests/userspace_ethtool Modify judgment conditions
Tu, Lijuan
lijuan.tu at intel.com
Sun Mar 31 06:07:07 CEST 2019
Is this a new issue found in 19.05? if the answer is yes, which commit changed ?
As your commets, only 2048 require to open/stop port, does other mtu need to do that?
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of zhuwenhui
> Sent: Thursday, March 28, 2019 11:10 PM
> To: dts at dpdk.org
> Cc: Zhu, WenhuiX <wenhuix.zhu at intel.com>
> Subject: [dts] [PATCH V1] tests/userspace_ethtool Modify judgment
> conditions
>
> Set the mtu to 2048. First "stop port_id", then "open port_id"
> The second package pkt_size needs to be added HEADER_SIZE['eth']
>
> Signed-off-by: zhuwenhui <wenhuix.zhu at intel.com>
> ---
> tests/TestSuite_userspace_ethtool.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/TestSuite_userspace_ethtool.py
> b/tests/TestSuite_userspace_ethtool.py
> index 4208e0f..060529e 100644
> --- a/tests/TestSuite_userspace_ethtool.py
> +++ b/tests/TestSuite_userspace_ethtool.py
> @@ -556,16 +556,18 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
> self.tester.send_expect("ifconfig %s mtu 9000" % (intf), "# ")
> for mtu in mtus:
> self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
> + self.dut.send_expect("open %s" % index, "EthApp>")
> ori_rx_pkts, _ = self.strip_portstats(index)
> pkt_size = mtu + HEADER_SIZE['eth']
> pkt = Packet(pkt_len=pkt_size)
> pkt.send_pkt(tx_port=intf)
> rx_pkts, _ = self.strip_portstats(index)
> - self.verify(rx_pkts == ori_rx_pkts, "Packet match mtu not
> forwarded as expected")
> - pkt = Packet(pkt_len=mtu + 1)
> + self.verify(rx_pkts == ori_rx_pkts + 1, "Packet match mtu not
> forwarded as expected")
> + pkt = Packet(pkt_len=mtu + 1 + HEADER_SIZE['eth'])
> pkt.send_pkt(tx_port=intf)
> rx_pkts_over, _ = self.strip_portstats(index)
> self.verify(rx_pkts == rx_pkts_over, "Packet over mtu should not be
> forwarded")
> + self.dut.send_expect("stop %s" % index, "EthApp>")
>
> self.tester.send_expect("ifconfig %s mtu %d" % (intf, ori_mtu), "# ")
>
> --
> 2.17.2
More information about the dts
mailing list