aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2022-03-02 11:56:22 -0800
committerDavid S. Miller <davem@davemloft.net>2022-03-03 14:38:48 +0000
commitcd14e9b7b8d312dfbf75ce1f78552902e51b9045 (patch)
treef78e76b3a2fded7b5ee29d2a4cfe3768087242e5 /net/core/dev.c
parentnet: Get rcv tstamp if needed in nfnetlink_{log, queue}.c (diff)
downloadlinux-dev-cd14e9b7b8d312dfbf75ce1f78552902e51b9045.tar.xz
linux-dev-cd14e9b7b8d312dfbf75ce1f78552902e51b9045.zip
net: Postpone skb_clear_delivery_time() until knowing the skb is delivered locally
The previous patches handled the delivery_time in the ingress path before the routing decision is made. This patch can postpone clearing delivery_time in a skb until knowing it is delivered locally and also set the (rcv) timestamp if needed. This patch moves the skb_clear_delivery_time() from dev.c to ip_local_deliver_finish() and ip6_input_finish(). Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 4b572bbbd07e..5db2443c2371 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5220,10 +5220,8 @@ another_round:
goto out;
}
- if (skb_skip_tc_classify(skb)) {
- skb_clear_delivery_time(skb);
+ if (skb_skip_tc_classify(skb))
goto skip_classify;
- }
if (pfmemalloc)
goto skip_taps;
@@ -5252,14 +5250,12 @@ skip_taps:
goto another_round;
if (!skb)
goto out;
- skb_clear_delivery_time(skb);
nf_skip_egress(skb, false);
if (nf_ingress(skb, &pt_prev, &ret, orig_dev) < 0)
goto out;
- } else
+ }
#endif
- skb_clear_delivery_time(skb);
skb_reset_redirect(skb);
skip_classify:
if (pfmemalloc && !skb_pfmemalloc_protocol(skb))