net: Add skb_clear_tstamp() to keep the mono delivery_time
authorMartin KaFai Lau <kafai@fb.com>
Wed, 2 Mar 2022 19:55:31 +0000 (11:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Mar 2022 14:38:48 +0000 (14:38 +0000)
commitde799101519aad23c6096041ba2744d7b5517e6a
tree01f4d21c7b918eb2d15a124ea581ef7a0671e935
parenta1ac9c8acec1605c6b43af418f79facafdced680
net: Add skb_clear_tstamp() to keep the mono delivery_time

Right now, skb->tstamp is reset to 0 whenever the skb is forwarded.

If skb->tstamp has the mono delivery_time, clearing it can hurt
the performance when it finally transmits out to fq@phy-dev.

The earlier patch added a skb->mono_delivery_time bit to
flag the skb->tstamp carrying the mono delivery_time.

This patch adds skb_clear_tstamp() helper which keeps
the mono delivery_time and clears everything else.

The delivery_time clearing will be postponed until the stack knows the
skb will be delivered locally.  It will be done in a latter patch.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 files changed:
drivers/net/loopback.c
include/linux/skbuff.h
net/bridge/br_forward.c
net/core/filter.c
net/core/skbuff.c
net/ipv4/ip_forward.c
net/ipv6/ip6_output.c
net/netfilter/ipvs/ip_vs_xmit.c
net/netfilter/nf_dup_netdev.c
net/netfilter/nf_flow_table_ip.c
net/netfilter/nft_fwd_netdev.c
net/openvswitch/vport.c
net/xfrm/xfrm_interface.c