On Thu, 22 Mar 2018, Jesus Sanchez-Palencia wrote: > On 03/21/2018 07:22 AM, Thomas Gleixner wrote: > > Bah, and probably there you need CLOCK_TAI because that's what PTP is based > > on, so clock_system needs to accomodate that as well. Dammit, there goes > > the simple 2 bits implementation. CLOCK_TAI is 11, so we'd need 4 clock > > bits plus the adapter bit. > > > > Though we could spare a bit. The fixed CLOCK_* space goes from 0 to 15. I > > don't see us adding new fixed clocks, so we really can reserve #15 for > > selecting the adapter clock if sparing that extra bit is truly required. > > > So what about just using the previous single 'clockid' argument, but then just > adding to uapi time.h something like: > > #define DYNAMIC_CLOCKID 15 > > And using it for that, instead. This way applications that will use the raw hw > offload mode must use this value for their per-socket clockid, and the qdisc's > clockid would be implicitly initialized to the same value.
That's what I suggested above. Thanks, tglx