From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] i40e: fix unintended sign extension Date: Tue, 15 Dec 2015 18:07:30 +0100 Message-ID: <1671518.qOKSgfYHRV@xps13> References: <1450196587-23248-1-git-send-email-jingjing.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Wu, Jingjing" Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id F1E8711A2 for ; Tue, 15 Dec 2015 18:08:46 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id l126so3571589wml.1 for ; Tue, 15 Dec 2015 09:08:46 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > 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. > > > > Fixes: 88ebc2b7f976 ("i40e: extend flow director to support VF") > > Signed-off-by: Jingjing Wu > > Acked-by: John McNamara Applied, thanks