Re: [PATCH v1 rdma-next 2/4] RDMA/nldev: add provider-specific resource tracking

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

 



On Tue, Mar 27, 2018 at 10:35:27PM -0600, Jason Gunthorpe wrote:
> On Tue, Mar 27, 2018 at 09:58:13AM -0500, Steve Wise wrote:
>
> > Steve's proposed attributes like BLAH_U32, BLAH_X32, and BLAH_D32
> > are efficient because they convey, directly, how the user side
> > should display them.  Leon prefers a separate string attribute that
> > is provided along with the value to convey the display format, and
> > the default would be unsigned so the display format attribute could
> > be excluded and the user side knows to use "%u".
>
> Signed or not should be part of the attribute type for sure, just for
> sanity. We should type check those things..

There is type NLA_S64 especially for this.

>
> That just leaves X or not X, and why does that matter to anyone?

As I posted before, I want to reuse those fields for set operations and
want to ensure that drivers/core won't need to deal with users who send
the same field sometimes with X64 and sometimes with U64 which for the
kernel are the same.

Plus it makes nla_policy looks very strange, despite the fact that we
will write NLA_U64, the user will need to remember to treat it
differently for prints. My print modifier makes this behaviour explicit.

Thanks

>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux