DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Chaoyong He <chaoyong.he@corigine.com>
Cc: dev@dpdk.org, oss-drivers <oss-drivers@corigine.com>,
	Long Wu <Long.Wu@nephogine.com>,
	Nole Zhang <peng.zhang@corigine.com>
Subject: Re: [PATCH 3/5] common/nfp: fix integer handling issues
Date: Thu, 23 Nov 2023 03:08:27 +0100	[thread overview]
Message-ID: <6924596.kQq0lBPeGt@thomas> (raw)
In-Reply-To: <SJ0PR13MB5545E00220EDEFBE497223D49EB9A@SJ0PR13MB5545.namprd13.prod.outlook.com>

23/11/2023 02:23, Chaoyong He:
> > 15/11/2023 04:23, Chaoyong He:
> > > CI found integer handling issues, overflow before widen.
> > >
> > > Coverity issue: 405351
> > > Fixes: 87f5b35ba4e8 ("common/nfp: move queue logic")
> > > Cc: stable@dpdk.org
> > [...]
> > > -		enabled_queues |= (1 << i);
> > > +		enabled_queues |= (1ULL << i);
> > 
> > That's a very bad fix.
> > You should use RTE_BIT64() which is more explicit.
> > 
> > Please read rte_bitops.h, that's a nice set of macros and functions.
> 
> Okay, I got it now.
> So, what should I do about it? Send out another patch to fix or something else?

You may convert your driver to use it where appropriate
if you feel it's worth.



  reply	other threads:[~2023-11-23  2:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15  3:23 [PATCH 0/5] fix coverity issues Chaoyong He
2023-11-15  3:23 ` [PATCH 1/5] vdpa/nfp: fix checking return value Chaoyong He
2023-11-15  3:23 ` [PATCH 2/5] vdpa/nfp: fix integer handling issues Chaoyong He
2023-11-15  3:23 ` [PATCH 3/5] common/nfp: " Chaoyong He
2023-11-22 11:50   ` Thomas Monjalon
2023-11-23  1:23     ` Chaoyong He
2023-11-23  2:08       ` Thomas Monjalon [this message]
2023-11-15  3:23 ` [PATCH 4/5] net/nfp: fix integer shift problem Chaoyong He
2023-11-15  3:23 ` [PATCH 5/5] net/nfp: fix null pointer dereferences Chaoyong He

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=6924596.kQq0lBPeGt@thomas \
    --to=thomas@monjalon.net \
    --cc=Long.Wu@nephogine.com \
    --cc=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.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).