From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B14A5DE0 for ; Thu, 20 Apr 2017 11:14:43 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2017 02:14:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,225,1488873600"; d="scan'208";a="92075156" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 20 Apr 2017 02:14:39 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 02:14:39 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 02:14:38 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.178]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.224]) with mapi id 14.03.0319.002; Thu, 20 Apr 2017 17:14:36 +0800 From: "Lin, Xueqin" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] add vlan filter script to VF daemon suite Thread-Index: AQHSuaPO+i8iQIPkGka9+fWivacMVqHN8rxA Date: Thu, 20 Apr 2017 09:14:35 +0000 Message-ID: <0D300480287911409D9FF92C1FA2A3355B1DEB15@SHSMSX104.ccr.corp.intel.com> References: <1491869396-6935-1-git-send-email-xueqin.lin@intel.com> <58F859EA.6010905@intel.com> In-Reply-To: <58F859EA.6010905@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] add vlan filter script to VF daemon suite 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: Thu, 20 Apr 2017 09:14:44 -0000 Hi Marvin, Vlan id 0 is equal to untagged packet for this case, need to avoid using vl= an id 0. rx_vlans =3D [1, random_vlan, MAX_VLAN] MAX_VLAN is must option, ( vlan + 1 ) % 4096 will be 0. I will fix it and add more condition to avoid using 0. Thanks for review. Best regards, Xueqin -----Original Message----- From: Liu, Yong=20 Sent: Thursday, April 20, 2017 2:49 PM To: Lin, Xueqin ; dts@dpdk.org Subject: Re: [dts] [PATCH] add vlan filter script to VF daemon suite Xueqin, One question about the way calculate wrong vlan id. Why it is generated by = correct vlan plus 2 and then mod 4095? I think ( vlan + 1 ) % 4096 will be more suitable. Thanks, Marvin On 04/11/2017 08:09 AM, Xueqin Lin wrote: > + for rx_vlan in rx_vlans: > + self.dut_testpmd.execute_cmd('rx_vlan add %s port 0 vf 1'% r= x_vlan) > + time.sleep(1) > + out =3D self.send_and_pmdout(wrong_mac, rx_vlan) > + self.verify("dst=3D%s" % wrong_mac in out, > + "Failed to enable vlan filter!!!") > + self.verify("VLAN tci=3D%s" % hex(rx_vlan) in out, > + "Failed to receive packet with vlan id!!!") > + > + wrong_rx_vlan =3D (rx_vlan + 2) % 4095