Re: [Intel-wired-lan] [PATCH net-next 1/2] stmmac: xsk: fix underflow of budget in zerocopy mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 22, 2025 at 10:16 PM Willem de Bruijn
<willemdebruijn.kernel@xxxxxxxxx> wrote:
>
> Jason Xing wrote:
> > Hi Paul,
> >
> > On Mon, Jul 21, 2025 at 4:56 PM Paul Menzel <pmenzel@xxxxxxxxxxxxx> wrote:
> > >
> > > Dear Jason,
> > >
> > >
> > > Thank you for your patch.
> >
> > Thanks for your quick response and review :)
> >
> > >
> > > Am 21.07.25 um 10:33 schrieb Jason Xing:
> > > > From: Jason Xing <kernelxing@xxxxxxxxxxx>
> > > >
> > > > The issue can happen when the budget number of descs are consumed. As
> > >
> > > Instead of “The issue”, I’d use “An underflow …”.
> >
> > Will change it.
> >
> > >
> > > > long as the budget is decreased to zero, it will again go into
> > > > while (budget-- > 0) statement and get decreased by one, so the
> > > > underflow issue can happen. It will lead to returning true whereas the
> > > > expected value should be false.
> > >
> > > What is “it”?
> >
> > It means 'underflow of budget' behavior.
>
> A technicality, but this is (negative) overflow.
>
> Underflow is a computation that results in a value that is too small
> to be represented by the given type.

Interesting. Thanks for sharing this with me:)

I just checked the wikipedia[1] that says " Underflow can in part be
regarded as negative overflow of the exponent of the floating-point
value.". I assume this rule can also be applied in this case? I'm
hesitant to send the v3 patch tomorrow with this 'negative overflow'
term included.

[1]: https://en.wikipedia.org/wiki/Arithmetic_underflow

Thanks,
Jason





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux