DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andre Muezerie <andremue@linux.microsoft.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Ian Stokes <ian.stokes@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Jochen Behrens <jochen.behrens@broadcom.com>,
	dev@dpdk.org
Subject: Re: [PATCH] drivers_net: use 64-bit shift and avoid signed/unsigned mismatch
Date: Mon, 6 Jan 2025 13:16:15 -0800	[thread overview]
Message-ID: <20250106211615.GA12542@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <Z3u2czmBQuY-BQ8C@bricha3-mobl1.ger.corp.intel.com>

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 <andremue@linux.microsoft.com>
> > ---
> >  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.

  reply	other threads:[~2025-01-06 21:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 20:59 Andre Muezerie
2025-01-06 10:54 ` Bruce Richardson
2025-01-06 21:16   ` Andre Muezerie [this message]
2025-01-06 21:16 ` [PATCH v2] drivers/net: " Andre Muezerie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250106211615.GA12542@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=andremue@linux.microsoft.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=jochen.behrens@broadcom.com \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).