Re: [PATCH v2 bpf-next] bpf: improve the general precision of tnum_mul

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

 



On Tue, 2025-08-19 at 04:58 +0530, Nandakumar Edamana wrote:
>
> On 19/08/25 04:44, Eduard Zingerman wrote:
>
> >
> > [...]
> >
> >
> > >
> > > @@ -155,6 +163,14 @@ struct tnum tnum_intersect(struct tnum a, struct tnum b)
> > >  	return TNUM(v & ~mu, mu);
> > >  }
> > >
> > > +struct tnum tnum_union(struct tnum a, struct tnum b)
> > > +{
> > > +	u64 v = a.value & b.value;
> > > +	u64 mu = (a.value ^ b.value) | a.mask | b.mask;
> > >
> >
> >                  ^^^^^^^^^^^^^^^^^^^
> >
> > Could you please add a comment here, saying something like:
> > "mask also includes any bits that are different between 'a' and 'b'"?
> >
>  Thanks for the suggestion. Shall I send it as PATCH v3?

Yes, alongside a simple selftest, please.
Maybe wait a bit more for others to comment.





[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