From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 6744B5949 for ; Tue, 5 Jul 2016 15:24:25 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 05 Jul 2016 06:24:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,579,1459839600"; d="scan'208";a="840935806" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.53]) by orsmga003.jf.intel.com with SMTP; 05 Jul 2016 06:24:22 -0700 Received: by (sSMTP sendmail emulation); Tue, 05 Jul 2016 14:24:21 +0025 Date: Tue, 5 Jul 2016 14:24:21 +0100 From: Bruce Richardson To: Beilei Xing Cc: jingjing.wu@intel.com, michalx.k.jastrzebski@intel.com, dev@dpdk.org Message-ID: <20160705132420.GA23500@bricha3-MOBL3> References: <1467272056-14388-1-git-send-email-beilei.xing@intel.com> <1467699005-16235-1-git-send-email-beilei.xing@intel.com> <1467699005-16235-2-git-send-email-beilei.xing@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467699005-16235-2-git-send-email-beilei.xing@intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 1/3] i40e: fix log error 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: Tue, 05 Jul 2016 13:24:25 -0000 On Tue, Jul 05, 2016 at 02:10:03PM +0800, Beilei Xing wrote: > The condition, "(pf->flags | I40E_FLAG_VMDQ)" will always be true, > regardless of the value of the flags operand, because I40E_FLAG_VMDQ > is 4ULL - meaning at least one bit will always be set in the result. > That will cause log error when VMDq is disabled. > Since the original intent behind the condition is to check if VMDq > is enabled, fix the code by changing "|" to "&". > > Coverity issue: 13219, 13221 > > Fixes: 4805ed59e957 ("i40e: enhance mac address operations") > > Signed-off-by: Beilei Xing Acked-by: Bruce Richardson