Yeah, I think metadata will evolve for a while till it settle's down.
Since ocxl_ioctl_get_metadata is exposed via uapi, a newer program
calling an older kernel will never work, since the size of that
struct
will always be larger than what the OS supports and our
copy_to_user()
will fail. The other option is for the user program to try all
possible versions till one succeeds, that is bad as well. I think
there are a few ways around it, if we care about this combination.
Balbir Singh.
We have a number of reserved members at the end of the struct which can
be re-purposed for future information (with a corresponding bump of the
version number).
Good point, agreed
I initially had reservations about using an ioctl command for various
AFU/context parameters because extensibility is going to be a pain. With
the current reserved fields and versioning, we're ok for some time
(version handling will remain a bit of a pain but that's life). I agree
it helps the library by making things more light weight compared to
sysfs. But if we need to add parameters in the future, we should keep
sysfs as an option, especially if it's for rarely used parameters, i.e.
not something we'll need immediately after an open().
Fred