MT#55283 kernel-module: zero skb->tstamp before forwarding to fix fq horizon drop

Change-Id: Ie8f976373993b1ea07f568bbfa59d646dcbb3ae6
(cherry picked from commit 8aa17085fd)
mr14.1
Federico Cabiddu 4 weeks ago committed by Richard Fuchs
parent 1d9b29e2a5
commit 7a610397a5

@ -5051,6 +5051,14 @@ static int send_proxy_packet4(struct sk_buff *skb, const struct re_address *src,
* 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;
@ -5141,9 +5149,10 @@ static int send_proxy_packet6(struct sk_buff *skb, const struct re_address *src,
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;

Loading…
Cancel
Save