On 3/27/2018 11:35 PM, 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.. > > That just leaves X or not X, and why does that matter to anyone? Typically bit arrays, iova base, memory keys, are displayed as hex. For the common attributes describing the core structs, like ib_device, ib_qp, etc, rdma tool knows which ones should be displayed as unsigned, signed, or hex. But for generic provider-specific entries, the rdma tool doesn't know anything about what is being displayed, because it is a <name, value> tuple with display format described by the provider attribute. So X32 and X64 at least provide a hint saying 'print it as hex'. So in my opinion, it makes for more readable output which is useful for debugging. Steve -- 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