From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1B5C747CD for ; Mon, 14 Mar 2016 03:03:10 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 13 Mar 2016 19:03:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,334,1455004800"; d="scan'208";a="933056949" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by orsmga002.jf.intel.com with ESMTP; 13 Mar 2016 19:03:08 -0700 Message-ID: <56E61C33.1010803@intel.com> Date: Mon, 14 Mar 2016 10:04:35 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "xu,huilong" , dts@dpdk.org, yulong.pei@intel.com, qian.q.xu@intel.com CC: Lijuan Tu References: <1456453741-14197-1-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1456453741-14197-1-git-send-email-huilongx.xu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH]tests vf_vlan: update vm cases X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2016 02:03:11 -0000 Lijuan, one comment below. On 02/26/2016 10:29 AM, xu,huilong wrote: > From: Lijuan Tu > > 1. stop forwarding and then can start again > 2. 'rx_vlan add 1 0' & 'tx_vlan set 0 %d' before testpmd send vlan packets > 3. a little time wait after 'rx_vlan add %d 0' > 4. fix vlan set strip on/off in for-cycle > > Signed-off-by: Lijuan Tu > --- > tests/TestSuite_vf_vlan.py | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py > index 6bde6ca..29890aa 100644 > --- a/tests/TestSuite_vf_vlan.py > +++ b/tests/TestSuite_vf_vlan.py > @@ -243,6 +243,7 @@ class TestVfVlan(TestCase): > inst = sniff_packets(self.tester_intf0, timeout=5) > self.vm0_testpmd.execute_cmd('set burst 1') > self.vm0_testpmd.execute_cmd('start tx_first') > + self.vm0_testpmd.execute_cmd('stop') > > # strip sniffered vlans > pkts = load_sniff_packets(inst) > @@ -265,6 +266,7 @@ class TestVfVlan(TestCase): > self.vm0_testpmd.execute_cmd('set verbose 1') > > for tx_vlan in tx_vlans: > + self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % tx_vlan) Is this only for Fortville? If yes, please kdriver to distinguish. > self.vm0_testpmd.execute_cmd('tx_vlan set 0 %d' % tx_vlan) > self.tx_and_check(tx_vlan=tx_vlan) > > @@ -280,7 +282,7 @@ class TestVfVlan(TestCase): > self.vm0_testpmd.start_testpmd(VM_CORES_MASK) > self.vm0_testpmd.execute_cmd('set fwd rxonly') > self.vm0_testpmd.execute_cmd('set verbose 1') > - self.vm0_testpmd.execute_cmd('vlan set strip off 0') > + self.vm0_testpmd.execute_cmd('vlan set strip on 0') > self.vm0_testpmd.execute_cmd('start') > > # send packet without vlan > @@ -295,6 +297,7 @@ class TestVfVlan(TestCase): > > for rx_vlan in rx_vlans: > self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % rx_vlan) > + time.sleep(1) > # send packet with same vlan > out = self.send_and_getout(vlan=rx_vlan, pkt_type="VLAN_UDP") > vlan_hex = hex(rx_vlan) > @@ -312,7 +315,7 @@ class TestVfVlan(TestCase): > "received 1 packets" not in out, "Received filtered vlan packet!!!") > > for rx_vlan in rx_vlans: > - self.vm0_testpmd.execute_cmd('rx_vlan rm 0 %d' % random_vlan) > + self.vm0_testpmd.execute_cmd('rx_vlan rm 0 %d' % rx_vlan) > > # send packet with vlan 0 > out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP") > @@ -341,11 +344,12 @@ class TestVfVlan(TestCase): > self.vm0_testpmd.start_testpmd(VM_CORES_MASK) > self.vm0_testpmd.execute_cmd('set fwd rxonly') > self.vm0_testpmd.execute_cmd('set verbose 1') > - self.vm0_testpmd.execute_cmd('vlan set strip on 0') > self.vm0_testpmd.execute_cmd('start') > > for rx_vlan in rx_vlans: > + self.vm0_testpmd.execute_cmd('vlan set strip on 0') > self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % rx_vlan) > + time.sleep(1) > out = self.send_and_getout(vlan=rx_vlan, pkt_type="VLAN_UDP") > # enable strip, vlan will be in mbuf > vlan_hex = hex(rx_vlan)