From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 557E546004; Mon, 6 Jan 2025 22:16:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E105B402C3; Mon, 6 Jan 2025 22:16:17 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 40D2940150 for ; Mon, 6 Jan 2025 22:16:16 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 447742046750; Mon, 6 Jan 2025 13:16:15 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 447742046750 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1736198175; bh=sGkd/KMtVgv6RhP2hwBpBhGh+k/9ce93nUiWXUCRCuY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dif+6YLJfRYVYat5absp1ctRzbX51dkkIcWhM8/gBkvSEpCcHKPDmOYpOzLIHwu+Z Fn34894QeEzFAJsnKrvUsgI6ZdzwkC1jXz90KwE9JXvVDr9hFdspfpWbpkOnf0TN2f Yqhg7hUjkTR/9zXWu1njbdRlImKj+ZxkgRgwIn7w= Date: Mon, 6 Jan 2025 13:16:15 -0800 From: Andre Muezerie To: Bruce Richardson Cc: Ian Stokes , Vladimir Medvedkin , Anatoly Burakov , Jochen Behrens , dev@dpdk.org Subject: Re: [PATCH] drivers_net: use 64-bit shift and avoid signed/unsigned mismatch Message-ID: <20250106211615.GA12542@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1735246770-731-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jan 06, 2025 at 10:54:43AM +0000, Bruce Richardson wrote: > On Thu, Dec 26, 2024 at 12:59:30PM -0800, Andre Muezerie wrote: > > This patch avoids warnings like the ones below emitted by MSVC: > > > > 1) > > ../drivers/net/ice/base/ice_flg_rd.c(71): warning C4334: '<<': > > result of 32-bit shift implicitly converted to 64 bits > > (was 64-bit shift intended?) > > > > 2) > > ../drivers/net/ice/ice_dcf_sched.c(177): warning C4018: '>=': > > signed/unsigned mismatch > > > > The fix for (1) is to use 64-bit shifting when appropriate > > (according to what the result is used for). > > > > The fix for (2) is to explicitly cast the variables used in the > > comparison. > > > > Signed-off-by: Andre Muezerie > > --- > > drivers/net/i40e/i40e_ethdev.c | 22 +++++++++++----------- > > drivers/net/iavf/iavf_ethdev.c | 2 +- > > drivers/net/iavf/iavf_rxtx.c | 2 +- > > drivers/net/iavf/iavf_vchnl.c | 2 +- > > drivers/net/ice/base/ice_flg_rd.c | 4 ++-- > > drivers/net/ice/base/ice_parser_rt.c | 16 ++++++++-------- > > drivers/net/ice/base/ice_xlt_kb.c | 2 +- > > drivers/net/ice/ice_dcf_sched.c | 2 +- > > drivers/net/ice/ice_ethdev.c | 4 ++-- > > drivers/net/ice/ice_rxtx.c | 2 +- > > drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- > > Most of these changes to the intel drivers look fine to me. However, for > the base code files, we try to avoid modifying those as they come from a > common, shared internal source which we regularly sync with. Therefore, for > the 3 base files, can the errors/warning be suppressed instead? > > Regards, > /Bruce I wasn't aware of that. Thanks for letting me know. I'll make the modifications suggested in v2 of this series.