Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Martin KaFai Lau <martin.lau@linux.dev>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	 Abhishek Chauhan <quic_abchauha@quicinc.com>
Cc: kernel@quicinc.com,  "David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>,
	 netdev@vger.kernel.org,  linux-kernel@vger.kernel.org,
	 Andrew Halaney <ahalaney@redhat.com>,
	 Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH net-next v2] net: Modify mono_delivery_time with clockid_delivery_time
Date: Thu, 29 Feb 2024 09:44:38 -0500	[thread overview]
Message-ID: <65e098566b4c3_d40e329486@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <cfd6d590-2bf0-45df-97a4-f9359b5d454b@linux.dev>

Martin KaFai Lau wrote:
> On 2/28/24 7:53 AM, Willem de Bruijn wrote:
> > Sidenote: with sk_clockid, FQ could detect when skb->tstamp is not
> > set in monotonic (i.e., set by SO_TXTIME) and drop the packet or
> > ignore the embedded timestamp, warn, etc.
> 
> Thanks for cc-ing me. Sorry for the late reply. I just catch up to this thread 
> and the v1.
> 
> I think it is needed to detect if skb->tstamp is monotonic or not in fq. The 
> container (with the veth setup) may use sch_etf while the host usually uses fq 
> at the physical NIC and expects monotonic skb->tstamp.
> 
> During forward (e.g. by bpf_redirect / ip[6]_forward from a veth to a physical 
> NIC), skb_clear_tstamp() only forwards the monotonic skb->tstamp now. While 
> sch_etf does check sk_clockid first before using skb->tstamp, fq does not check 
> that now.
> or fq_packet_beyond_horizon() is enough to catch this clock discrepancy?

Before your patch, I believe FQ had no such guard rails. An skb with
any clockid from SO_TXTIME can arrive at FQ.

With the new clockid field, we could add guard rails in fq_enqueue.
If the bit is set, look up sk_clockid.




  reply	other threads:[~2024-02-29 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28  1:12 [PATCH net-next v2] net: Modify mono_delivery_time with clockid_delivery_time Abhishek Chauhan
2024-02-28 15:53 ` Willem de Bruijn
2024-02-28 20:03   ` Abhishek Chauhan (ABC)
2024-02-28 20:14     ` Willem de Bruijn
2024-02-28 21:53       ` Abhishek Chauhan (ABC)
2024-02-29  0:09         ` Willem de Bruijn
2024-02-29  0:13           ` Abhishek Chauhan (ABC)
2024-02-29  3:06   ` Martin KaFai Lau
2024-02-29 14:44     ` Willem de Bruijn [this message]
2024-02-29 23:00       ` Abhishek Chauhan (ABC)
2024-02-29  9:30 ` Paolo Abeni
2024-02-29 23:15   ` Abhishek Chauhan (ABC)
2024-02-29 14:40 ` Andrew Halaney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65e098566b4c3_d40e329486@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=ahalaney@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@quicinc.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_abchauha@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox