From: "Tu, Lijuan" <lijuan.tu@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/vhost_pmd_xstats: fix issue about send pkt
Date: Wed, 4 Sep 2019 05:09:37 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB1BEF4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1566863431-9701-1-git-send-email-lihongx.ma@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Tuesday, August 27, 2019 7:51 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests/vhost_pmd_xstats: fix issue about send pkt
>
> 1. remove useless import
> 2. add mtu set when the pkt size greater then 1518
>
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
> tests/TestSuite_vhost_pmd_xstats.py | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tests/TestSuite_vhost_pmd_xstats.py
> b/tests/TestSuite_vhost_pmd_xstats.py
> index 75b87a6..82dcc4b 100755
> --- a/tests/TestSuite_vhost_pmd_xstats.py
> +++ b/tests/TestSuite_vhost_pmd_xstats.py
> @@ -34,20 +34,17 @@ DPDK Test suite.
>
> vhost pmd xstats test suite.
> """
> -import os
> -import string
> import re
> import time
> import utils
> import datetime
> import copy
> from test_case import TestCase
> -from exception import VerifyFailure
> from settings import HEADER_SIZE
> -from etgen import IxiaPacketGenerator
> from qemu_kvm import QEMUKvm
> from packet import Packet
> -
> +ETHER_JUMBO_FRAME_MTU = 9000
> +DEFAULT_JUMBO_FRAME_MTU = 1500
>
> class TestVhostPmdXstats(TestCase):
>
> @@ -61,6 +58,8 @@ class TestVhostPmdXstats(TestCase):
> self.dut.unbind_interfaces_linux(self.unbind_ports)
> cores = self.dut.get_core_list("1S/4C/1T")
> self.coremask = utils.create_mask(cores)
> + txport = self.tester.get_local_port(self.dut_ports[0])
> + self.txItf = self.tester.get_interface(txport)
>
> self.scapy_num = 0
> self.dmac = self.dut.get_mac_address(self.dut_ports[0])
> @@ -124,8 +123,6 @@ class TestVhostPmdXstats(TestCase):
> Send a packet to port
> """
> self.scapy_num += 1
> - txport = self.tester.get_local_port(self.dut_ports[0])
> - self.txItf = self.tester.get_interface(txport)
> pkt = Packet(pkt_type='TCP', pkt_len=pktsize)
> pkt.config_layer('ether', {'dst': dmac, })
> pkt.send_pkt(tx_port=self.txItf, count=num) @@ -166,10 +163,13 @@
> class TestVhostPmdXstats(TestCase):
> for cat in categories:
> scope = re.search(r'(?<=rx_)\w+(?=_packets)', cat).group(0)
> pktsize = int(re.search(r'(?<=rx_size_)\d+', cat).group(0))
> + if pktsize > 1518:
> + self.tester.send_expect('ifconfig %s mtu %d' %
> + (self.txItf, ETHER_JUMBO_FRAME_MTU), '# ')
>
> self.scapy_send_packet(pktsize, self.dmac, 10000)
> self.send_verify(scope, 10000)
> self.clear_port_xstats(scope)
> + self.tester.send_expect('ifconfig %s mtu %d' % (self.txItf,
> + DEFAULT_JUMBO_FRAME_MTU), '# ')
>
> def clear_port_xstats(self, scope):
>
> --
> 2.7.4
prev parent reply other threads:[~2019-09-04 5:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 23:50 lihong
2019-08-27 8:34 ` Wang, Yinan
2019-09-04 5:09 ` Tu, Lijuan [this message]
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=8CE3E05A3F976642AAB0F4675D0AD20E0BB1BEF4@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@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).