From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 840942946 for ; Mon, 25 Apr 2016 12:35:58 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 25 Apr 2016 03:35:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,532,1455004800"; d="scan'208";a="691811082" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.132]) by FMSMGA003.fm.intel.com with SMTP; 25 Apr 2016 03:35:44 -0700 Received: by (sSMTP sendmail emulation); Mon, 25 Apr 2016 11:35:44 +0025 Date: Mon, 25 Apr 2016 11:35:44 +0100 From: Bruce Richardson To: Tomasz Kulasek Cc: wenzhuo.lu@intel.com, helin.zhang@intel.com, konstantin.ananyev@intel.com, dev@dpdk.org Message-ID: <20160425103543.GA18116@bricha3-MOBL3> References: <1460727549-4380-1-git-send-email-tomaszx.kulasek@intel.com> <1461339357-8048-1-git-send-email-tomaszx.kulasek@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461339357-8048-1-git-send-email-tomaszx.kulasek@intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2] ixgbe: fix bad shift operation in ixgbe_set_pool_rx/tx 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: Mon, 25 Apr 2016 10:35:59 -0000 On Fri, Apr 22, 2016 at 05:35:57PM +0200, Tomasz Kulasek wrote: > Fix issue reported by Coverity. > > Coverity ID 13193: Bad bit shift operation (BAD_SHIFT) > large_shift: In expression 1 << pool, left shifting by more than 31 bits > has undefined behavior. The shift amount, pool, is at least 32. > > This patch is a rework of register addr selection logic and mask > computation to made it more readable and avoid bit overflow when 32 bit > value is shifted over its size for pool > 31. > > Fixes: fe3a45fd4104 ("ixgbe: add VMDq support") > > Signed-off-by: Tomasz Kulasek Acked-by: Bruce Richardson