From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 422E26AAE for ; Fri, 5 Dec 2014 05:59:58 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 04 Dec 2014 20:59:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,520,1413270000"; d="scan'208";a="618987837" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by orsmga001.jf.intel.com with ESMTP; 04 Dec 2014 20:59:55 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 5 Dec 2014 12:56:17 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by shsmsx102.ccr.corp.intel.com ([169.254.2.216]) with mapi id 14.03.0195.001; Fri, 5 Dec 2014 12:56:16 +0800 From: "Xie, Huawei" To: Thomas Monjalon , "Chen, Jing D" Thread-Topic: [dpdk-dev] [PATCH] i40e: Fix a vlan bug Thread-Index: AQHQD9goditbHJmp8EqJdqzKtH2h2ZyAbjQw Date: Fri, 5 Dec 2014 04:56:15 +0000 Message-ID: References: <1417686605-6778-1-git-send-email-jing.d.chen@intel.com> <2122900.sczHU7BWUg@xps13> <4341B239C0EFF9468EE453F9E9F4604D0162B469@shsmsx102.ccr.corp.intel.com> <1575841.on6VhD6YKG@xps13> In-Reply-To: <1575841.on6VhD6YKG@xps13> Accept-Language: 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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] i40e: Fix a vlan bug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 05:00:00 -0000 Hi Thomas: I will continue work on this fix. Do you have comments to the v4 patch? For Bruce's comment, I add some descriptive commit message for the commit. For the constant number, I define a macro as the wrapper for the VFA array = index and value. One question is it isn't based on latest commit, but I tried applying the p= atch, there is no problem. +/* + * vlan_id is a 12 bit number. + * The VFTA array is actually a 4096 bit array, 128 of 32bit elements. + * 2^5 =3D 32. The val of lower 5 bits specifies the bit in the 32bit elem= ent. + * The higher 7 bit val specifies VFTA array index. + */ +#define I40E_VFTA_BIT(vlan_id) (1 << ((vlan_id) & 0x1F)) +#define I40E_VFTA_IDX(vlan_id) ((vlan_id) >> 5)