> There's another issue. > now the expires transition with HZ happens in kernel when we add > route with expire, but when we dump, the expires transition is in the > user-space: > if (ci->rta_expires != 0) > fprintf(fp, " expires %dsec", > ci->rta_expires/hz); > > I'm not sure if the *hz* value between kernel and user-space are > always same. I'd like to do this transition both in kernel. just like > ipaddr's > valid_lft, preferred_lft.
All API's from applications are supposed to use USER_HZ which is 100hz on most platforms. Actual kernel internal hz is configurable. There were some cases legacy of early days where iproute2 had to deal with kernel hz, mostly in the QoS stuff.