mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-06 16:49:07 +08:00
net: Add additional bit to support clockid_t timestamp type
tstamp_type is now set based on actual clockid_t compressed into 2 bits. To make the design scalable for future needs this commit bring in the change to extend the tstamp_type:1 to tstamp_type:2 to support other clockid_t timestamp. We now support CLOCK_TAI as part of tstamp_type as part of this commit with existing support CLOCK_MONOTONIC and CLOCK_REALTIME. Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20240509211834.3235191-3-quic_abchauha@quicinc.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
89ed67d7ab
commit
0babfb126a
@@ -6207,12 +6207,17 @@ union { \
|
|||||||
__u64 :64; \
|
__u64 :64; \
|
||||||
} __attribute__((aligned(8)))
|
} __attribute__((aligned(8)))
|
||||||
|
|
||||||
|
/* The enum used in skb->tstamp_type. It specifies the clock type
|
||||||
|
* of the time stored in the skb->tstamp.
|
||||||
|
*/
|
||||||
enum {
|
enum {
|
||||||
BPF_SKB_TSTAMP_UNSPEC,
|
BPF_SKB_TSTAMP_UNSPEC = 0, /* DEPRECATED */
|
||||||
BPF_SKB_TSTAMP_DELIVERY_MONO, /* tstamp has mono delivery time */
|
BPF_SKB_TSTAMP_DELIVERY_MONO = 1, /* DEPRECATED */
|
||||||
/* For any BPF_SKB_TSTAMP_* that the bpf prog cannot handle,
|
BPF_SKB_CLOCK_REALTIME = 0,
|
||||||
* the bpf prog should handle it like BPF_SKB_TSTAMP_UNSPEC
|
BPF_SKB_CLOCK_MONOTONIC = 1,
|
||||||
* and try to deduce it by ingress, egress or skb->sk->sk_clockid.
|
BPF_SKB_CLOCK_TAI = 2,
|
||||||
|
/* For any future BPF_SKB_CLOCK_* that the bpf prog cannot handle,
|
||||||
|
* the bpf prog can try to deduce it by ingress/egress/skb->sk->sk_clockid.
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user