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 7FD6EDE0 for ; Tue, 15 Dec 2015 18:01:26 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 15 Dec 2015 09:01:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,433,1444719600"; d="scan'208";a="618428222" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by FMSMGA003.fm.intel.com with ESMTP; 15 Dec 2015 09:01:18 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.13]) by IRSMSX101.ger.corp.intel.com ([169.254.1.236]) with mapi id 14.03.0248.002; Tue, 15 Dec 2015 17:01:17 +0000 From: "Mcnamara, John" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] i40e: fix unintended sign extension Thread-Index: AQHRN1T2uNWN8GOUJ06ZdqmL2a4zzJ7MRa3w Date: Tue, 15 Dec 2015 17:01:17 +0000 Message-ID: References: <1450196587-23248-1-git-send-email-jingjing.wu@intel.com> In-Reply-To: <1450196587-23248-1-git-send-email-jingjing.wu@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] i40e: fix unintended sign extension 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, 15 Dec 2015 17:01:27 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jingjing Wu > Sent: Tuesday, December 15, 2015 4:23 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] i40e: fix unintended sign extension >=20 > Coverity issue reported like > CID 119268 (#1 of 1): Unintended sign extension > (SIGN_EXTENSION)sign_extension: Suspicious implicit sign extension: > vsi_id with type unsigned short (16 bits, unsigned) is promoted in vsi_id > << 23 to type int (32 bits, signed), then sign-extended to type unsigned > long (64 bits, unsigned). If vsi_id << 23 is greater than 0x7FFFFFFF, the > upper bits of the result will all be 1. >=20 > Fixes: 88ebc2b7f976 ("i40e: extend flow director to support VF") > Signed-off-by: Jingjing Wu Acked-by: John McNamara