[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL+tcoARXLJCvE1hjACH5B_rbxM-B4yGrROaVamp=11N2mnoKw@mail.gmail.com>
Date: Thu, 16 Jan 2025 07:50:45 +0800
From: Jason Xing <kerneljasonxing@...il.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, dsahern@...nel.org, willemdebruijn.kernel@...il.com,
willemb@...gle.com, ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
eddyz87@...il.com, song@...nel.org, yonghong.song@...ux.dev,
john.fastabend@...il.com, kpsingh@...nel.org, sdf@...ichev.me,
haoluo@...gle.com, jolsa@...nel.org, horms@...nel.org, bpf@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v5 06/15] net-timestamp: prepare for isolating
two modes of SO_TIMESTAMPING
On Thu, Jan 16, 2025 at 6:11 AM Martin KaFai Lau <martin.lau@...ux.dev> wrote:
>
> On 1/12/25 3:37 AM, Jason Xing wrote:
> > void __skb_tstamp_tx(struct sk_buff *orig_skb,
> > const struct sk_buff *ack_skb,
> > struct skb_shared_hwtstamps *hwtstamps,
> > - struct sock *sk, int tstype)
> > + struct sock *sk, bool sw, int tstype)
>
> Instead of adding a new "bool sw" and changing all callers, is it the same as
> testing "!hwtstamps" ?
Actually, I had a version using the hwtstamps, then I realized that
hardware or driver may go wrong and pass a NULL hwstamps. It's indeed
unlikely to happen. If so, timestamping code will consider it as a
software timestamp.
I don't expect that thing happening, ensuring our code is robust
enough. The original timestamping code seems not deal with this case
as we cannot see some particular test in __skb_tstamp_tx(). The worst
thing is if it happens, we would never know and treat it as a software
SCM_TSTAMP_SND case.
Does it make any sense to you?
Thanks,
Jason
Powered by blists - more mailing lists