From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 42B82567F for ; Thu, 20 Apr 2017 09:00:12 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 20 Apr 2017 00:00:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,224,1488873600"; d="scan'208";a="1137986347" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by fmsmga001.fm.intel.com with ESMTP; 20 Apr 2017 00:00:10 -0700 Message-ID: <58F859EA.6010905@intel.com> Date: Thu, 20 Apr 2017 14:49:14 +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: Xueqin Lin , dts@dpdk.org References: <1491869396-6935-1-git-send-email-xueqin.lin@intel.com> In-Reply-To: <1491869396-6935-1-git-send-email-xueqin.lin@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 07:00:13 -0000 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'% rx_vlan) > + time.sleep(1) > + out = self.send_and_pmdout(wrong_mac, rx_vlan) > + self.verify("dst=%s" % wrong_mac in out, > + "Failed to enable vlan filter!!!") > + self.verify("VLAN tci=%s" % hex(rx_vlan) in out, > + "Failed to receive packet with vlan id!!!") > + > + wrong_rx_vlan = (rx_vlan + 2) % 4095