Re: [PATCH v6 net-next 10/13] net: Postpone skb_clear_delivery_time() until knowing the skb is delivered locally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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()



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux