On Wed, Mar 2, 2022 at 4:20 PM Martin KaFai Lau <kafai@xxxxxx> wrote: > > On Wed, Mar 02, 2022 at 03:41:59PM -0800, Eric Dumazet wrote: > > Name was a bit confusing :) > A few names were attempted in the early version and > then concluded on delivery_time. :p > > > > > And it seems you have a big opportunity to not call ktime_get_real() > > when skb->sk is known at this point (early demux) > > because few sockets actually enable timestamping ? > iiuc, you are suggesting to also check the skb->sk (if early demux) > and check for SK_FLAGS_TIMESTAMP. > > Without checking skb->sk here, it should not be worse than the > current ktime_get_real() done in dev.c where it also does not have sk > available? netstamp_needed_key should have been enabled as > long as there is one sk asked for it. Yes, but typically there is often one active timestamp consumer, enabling the static key. This is a corner case anyway, not sure if hosts running VM would have slow ktime_get_real()