[dts] [PATCH V1] tests/userspace_ethtool: optimze port_mtu for springville/powerville

Tu, Lijuan lijuan.tu at intel.com
Wed Aug 7 04:23:46 CEST 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Wenjie Li
> Sent: Tuesday, July 16, 2019 2:38 AM
> To: dts at dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li at intel.com>
> Subject: [dts] [PATCH V1] tests/userspace_ethtool: optimze port_mtu for
> springville/powerville
> 
> 1. From DPDK-15062, max mtu of igb NIC is 2026; change mtu_threshold to
> 2026 for powerville and springville in script.
> 2. The ether headsize is 22 bytes(not 18) in igb nics; add an offset(4 bytes)
> for the packets.
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li at intel.com>
> ---
>  tests/TestSuite_userspace_ethtool.py | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_userspace_ethtool.py
> b/tests/TestSuite_userspace_ethtool.py
> index c774552..afd5d00 100644
> --- a/tests/TestSuite_userspace_ethtool.py
> +++ b/tests/TestSuite_userspace_ethtool.py
> @@ -548,6 +548,10 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>          self.dut.send_expect(self.cmd, "EthApp>", 60)
>          mtus = [1519, 2048]
>          mtu_threshold = 2022
> +        offset = 0
> +        if self.nic in ['powerville', 'springville']:
> +            mtu_threshold = 2026
> +            offset = 4
>          for index in range(len(self.ports)):
>              port = self.ports[index]
>              # change mtu
> @@ -558,17 +562,20 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              for mtu in mtus:
>                  # The mtu threshold is 2022,When it is greater than 2022, the
> open/stop port is required.
>                  if mtu > mtu_threshold:
> +                    if self.nic in ['powerville', 'springville']:
> +                        mtu = mtu_threshold
>                      self.dut.send_expect("stop %s" % index, "EthApp>")
>                      self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
>                      self.dut.send_expect("open %s" % index, "EthApp>")
>                  self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>")
> +                time.sleep(5)
>                  ori_rx_pkts, _ = self.strip_portstats(index)
> -                pkt_size = mtu + HEADER_SIZE['eth']
> +                pkt_size = mtu + HEADER_SIZE['eth'] + offset
>                  pkt = Packet(pkt_len=pkt_size)
>                  pkt.send_pkt(tx_port=intf, count=4)
>                  rx_pkts, _ = self.strip_portstats(index)
>                  self.verify(rx_pkts == ori_rx_pkts + 4, "Packet match mtu not
> forwarded as expected")
> -                pkt = Packet(pkt_len=mtu + 1 + HEADER_SIZE['eth'])
> +                pkt = Packet(pkt_len=mtu + 1 + HEADER_SIZE['eth'] +
> + offset)
>                  pkt.send_pkt(tx_port=intf, count=4)
>                  rx_pkts_over, _ = self.strip_portstats(index)
>                  self.verify(rx_pkts == rx_pkts_over, "Packet over mtu should not be
> forwarded")
> --
> 2.17.1



More information about the dts mailing list