[PATCH 3/5] common/nfp: fix integer handling issues
Thomas Monjalon
thomas at monjalon.net
Thu Nov 23 03:08:27 CET 2023
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 at 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.
More information about the dev
mailing list