History

net: Set skb->mono_delivery_time and clear it after sch_handle_ingress()

The previous patches handled the delivery_time before sch_handle_ingress(). This patch can now set the skb->mono_delivery_time to flag the skb->tstamp is used as the mono delivery_time (EDT) instead of the (rcv) timestamp and also clear it with skb_clear_delivery_time() after sch_handle_ingress(). This will make the bpf_redirect_*() to keep the mono delivery_time and used by a qdisc (fq) of the egress-ing interface. A latter patch will postpone the skb_clear_delivery_time() until the stack learns that the skb is being delivered locally and that will make other kernel forwarding paths (ip[6]_forward) able to keep the delivery_time also. Thus, like the previous patches on using the skb->mono_delivery_time bit, calling skb_clear_delivery_time() is not limited within the CONFIG_NET_INGRESS to avoid too many code churns among this set.

Martin KaFai Lau committed 4 years ago

Commit d98d58a1 parent d93376f3 files · +8 −6Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/skbuff.h+1−2
@@ -3993,8 +3993,7 @@ static inline void skb_set_delivery_time(struct sk_buff *skb, ktime_t kt, · 3992 unmodified lines
3993 bool mono)3993 bool mono)
3994{3994{
3995 skb->tstamp = kt;3995 skb->tstamp = kt;
3996 /* Setting mono_delivery_time will be enabled later */3996 skb->mono_delivery_time = kt && mono;
3997 skb->mono_delivery_time = 0;
3998}3997}
3999 3998
4000DECLARE_STATIC_KEY_FALSE(netstamp_needed_key);3999DECLARE_STATIC_KEY_FALSE(netstamp_needed_key);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t