/[packages]/cauldron/kernel/current/PATCHES/patches/0003-net-loopback-clear-skb-tstamp-before-netif_rx.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0003-net-loopback-clear-skb-tstamp-before-netif_rx.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 10 months ago) by tmb
File size: 1550 byte(s)
add fixes from sashas autosel queue
1 From faa31d5e55729412fd094eda9bda58bd98a6aceb Mon Sep 17 00:00:00 2001
2 From: Eric Dumazet <edumazet@google.com>
3 Date: Fri, 19 Oct 2018 19:11:26 -0700
4 Subject: [PATCH 003/145] net: loopback: clear skb->tstamp before netif_rx()
5
6 [ Upstream commit 4c16128b6271e70c8743178e90cccee147858503 ]
7
8 At least UDP / TCP stacks can now cook skbs with a tstamp using
9 MONOTONIC base (or arbitrary values with SCM_TXTIME)
10
11 Since loopback driver does not call (directly or indirectly)
12 skb_scrub_packet(), we need to clear skb->tstamp so that
13 net_timestamp_check() can eventually resample the time,
14 using ktime_get_real().
15
16 Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.")
17 Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC")
18 Signed-off-by: Eric Dumazet <edumazet@google.com>
19 Cc: Willem de Bruijn <willemb@google.com>
20 Cc: Soheil Hassas Yeganeh <soheil@google.com>
21 Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
22 Signed-off-by: David S. Miller <davem@davemloft.net>
23 Signed-off-by: Sasha Levin <sashal@kernel.org>
24 ---
25 drivers/net/loopback.c | 4 ++++
26 1 file changed, 4 insertions(+)
27
28 diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
29 index 30612497643c..d192936b76cf 100644
30 --- a/drivers/net/loopback.c
31 +++ b/drivers/net/loopback.c
32 @@ -75,6 +75,10 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb,
33 int len;
34
35 skb_tx_timestamp(skb);
36 +
37 + /* do not fool net_timestamp_check() with various clock bases */
38 + skb->tstamp = 0;
39 +
40 skb_orphan(skb);
41
42 /* Before queueing this packet to netif_rx(),
43 --
44 2.19.1
45

  ViewVC Help
Powered by ViewVC 1.1.30