From b21926091baa35ab2926f36d5b3f89acac947729 Mon Sep 17 00:00:00 2001 From: Federico Cabiddu Date: Fri, 3 Apr 2026 12:37:28 +0200 Subject: [PATCH] MT#55283 kernel-module: zero skb->tstamp before forwarding to fix fq horizon drop Change-Id: Ie8f976373993b1ea07f568bbfa59d646dcbb3ae6 (cherry picked from commit 8aa17085fd5e8263b55349cedd8da1a3b7a509c6) --- kernel-module/xt_RTPENGINE.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 42931d657..548be05c1 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -4953,6 +4953,14 @@ static int send_proxy_packet4(struct sk_buff *skb, struct re_address *src, struc * throttle code path which can tail-call into TC_ACT_SHOT when the * aggregate slot is uninitialised. */ skb->queue_mapping = 0; + /* Zero skb->tstamp: skb_copy_expand() preserves the receive timestamp + * (a REALTIME ktime ~1.77e18 ns, i.e. Unix epoch). The fq qdisc + * compares skb->tstamp against the monotonic clock (seconds since boot) + * without checking tstamp_type; a REALTIME timestamp is billions of + * nanoseconds ahead of monotonic_now and exceeds the 2-second horizon, + * causing fq_packet_beyond_horizon() to silently drop every packet. + * Clearing tstamp tells fq to transmit immediately. */ + skb->tstamp = 0; ip_local_out(net, skb->sk, skb); return 0; @@ -5048,9 +5056,10 @@ static int send_proxy_packet6(struct sk_buff *skb, struct re_address *src, struc skb->ip_summed = CHECKSUM_COMPLETE; } - /* Same reasoning as send_proxy_packet4: zero queue_mapping before - * handing the packet to the egress TC BPF program. */ + /* Same reasoning as send_proxy_packet4: clear the inherited REALTIME + * receive timestamp to prevent fq horizon drops. */ skb->queue_mapping = 0; + skb->tstamp = 0; ip6_local_out(net, skb->sk, skb); return 0;