Message ID | 20220302195519.3479274-1-kafai@fb.com (mailing list archive) |
---|---|
Headers | show |
Series | Preserve mono delivery time (EDT) in skb->tstamp | expand |
On Wed, Mar 2, 2022 at 11:55 AM Martin KaFai Lau <kafai@fb.com> wrote: > > skb->tstamp was first used as the (rcv) timestamp. > The major usage is to report it to the user (e.g. SO_TIMESTAMP). > > Later, skb->tstamp is also set as the (future) delivery_time (e.g. EDT in TCP) > during egress and used by the qdisc (e.g. sch_fq) to make decision on when > the skb can be passed to the dev. > > Currently, there is no way to tell skb->tstamp having the (rcv) timestamp > or the delivery_time, so it is always reset to 0 whenever forwarded > between egress and ingress. > > While it makes sense to always clear the (rcv) timestamp in skb->tstamp > to avoid confusing sch_fq that expects the delivery_time, it is a > performance issue [0] to clear the delivery_time if the skb finally > egress to a fq@phy-dev. > > This set is to keep the mono delivery time and make it available to > the final egress interface. Please see individual patch for > the details. > > [0] (slide 22): https://linuxplumbersconf.org/event/11/contributions/953/attachments/867/1658/LPC_2021_BPF_Datapath_Extensions.pdf > For the whole series Reviewed-by: Eric Dumazet <edumazet@google.com> Thanks !
Hello: This series was applied to netdev/net-next.git (master) by David S. Miller <davem@davemloft.net>: On Wed, 2 Mar 2022 11:55:19 -0800 you wrote: > skb->tstamp was first used as the (rcv) timestamp. > The major usage is to report it to the user (e.g. SO_TIMESTAMP). > > Later, skb->tstamp is also set as the (future) delivery_time (e.g. EDT in TCP) > during egress and used by the qdisc (e.g. sch_fq) to make decision on when > the skb can be passed to the dev. > > [...] Here is the summary with links: - [v6,net-next,01/13] net: Add skb->mono_delivery_time to distinguish mono delivery_time from (rcv) timestamp https://git.kernel.org/netdev/net-next/c/a1ac9c8acec1 - [v6,net-next,02/13] net: Add skb_clear_tstamp() to keep the mono delivery_time https://git.kernel.org/netdev/net-next/c/de799101519a - [v6,net-next,03/13] net: Handle delivery_time in skb->tstamp during network tapping with af_packet https://git.kernel.org/netdev/net-next/c/27942a15209f - [v6,net-next,04/13] net: Clear mono_delivery_time bit in __skb_tstamp_tx() https://git.kernel.org/netdev/net-next/c/d93376f503c7 - [v6,net-next,05/13] net: Set skb->mono_delivery_time and clear it after sch_handle_ingress() https://git.kernel.org/netdev/net-next/c/d98d58a00261 - [v6,net-next,06/13] net: ip: Handle delivery_time in ip defrag https://git.kernel.org/netdev/net-next/c/8672406eb5d7 - [v6,net-next,07/13] net: ipv6: Handle delivery_time in ipv6 defrag https://git.kernel.org/netdev/net-next/c/335c8cf3b537 - [v6,net-next,08/13] net: ipv6: Get rcv timestamp if needed when handling hop-by-hop IOAM option https://git.kernel.org/netdev/net-next/c/b6561f8491ca - [v6,net-next,09/13] net: Get rcv tstamp if needed in nfnetlink_{log, queue}.c https://git.kernel.org/netdev/net-next/c/80fcec675112 - [v6,net-next,10/13] net: Postpone skb_clear_delivery_time() until knowing the skb is delivered locally https://git.kernel.org/netdev/net-next/c/cd14e9b7b8d3 - [v6,net-next,11/13] bpf: Keep the (rcv) timestamp behavior for the existing tc-bpf@ingress https://git.kernel.org/netdev/net-next/c/7449197d600d - [v6,net-next,12/13] bpf: Add __sk_buff->delivery_time_type and bpf_skb_set_skb_delivery_time() https://git.kernel.org/netdev/net-next/c/8d21ec0e46ed - [v6,net-next,13/13] bpf: selftests: test skb->tstamp in redirect_neigh https://git.kernel.org/netdev/net-next/c/c803475fd8dd You are awesome, thank you!