From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 439A96AAE for ; Fri, 5 Dec 2014 10:19:11 +0100 (CET) Received: by mail-wg0-f49.google.com with SMTP id n12so359136wgh.22 for ; Fri, 05 Dec 2014 01:19:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=g8pQDatjy3ugC7b6mEF/T7y03UPtIVWJzkH/Fzyv5/4=; b=ULw0MncGAtlE3Enwb6X1tlaB4ug3vG60x9gI+92nmYxYwmhRsfyK4aHxbo2nqNcRjJ 4kSf4DP1iuUGr5zbsxQ3ZMxBcP5I9zzoUsvrqYggHoZjm4JbSXQsVDH5yeTHH4iv3h0e ux8cSTMf/1baaM2KA50g6wOpfvnuy8TDyr7piJCJ5YftlNJXtJj/uZ6rxmWVgWoqjGVP BsxtP6EY9Ao4AgSPnv1iwZKonfl9DxveunwdBGeIfQrPYzrZqdZkoPq8l68gj6wRBLkY zqDV7Z8TcT1mKbhfqFxiD4/2sMASLuhjRZB+PYauh6J+Uv3HKvgbpEVxMn/3Kl195xNb YQXw== X-Gm-Message-State: ALoCoQkk2QwtkQR42XPJ+tkxp4d8mb5ekZ4P+KRgspNTrnt2NVIZSUVq1eMCIgkeAkkJ4OIIFOkb X-Received: by 10.194.134.234 with SMTP id pn10mr23323632wjb.34.1417771151095; Fri, 05 Dec 2014 01:19:11 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id be4sm1447725wib.16.2014.12.05.01.19.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Dec 2014 01:19:10 -0800 (PST) From: Thomas Monjalon To: "Xie, Huawei" Date: Fri, 05 Dec 2014 10:18:45 +0100 Message-ID: <6387429.vGjKaiz9ho@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: References: <1417686605-6778-1-git-send-email-jing.d.chen@intel.com> <1575841.on6VhD6YKG@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 09:19:11 -0000 Hi Huawei, 2014-12-05 04:56, Xie, Huawei: > 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 patch, 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 = 32. The val of lower 5 bits specifies the bit in the 32bit element. > + * 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) If you replace the values by constants, it's ok for me. Note that I won't check the i40e datasheet so you need a reviewer who will do :) -- Thomas