Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
11b9148
Breadcrumbs
linux
/
tools
/
testing
/
selftests
/
bpf
/
progs
/
test_time_tai.c
Copy path
Blame
Blame
Latest commit
History
History
24 lines (18 loc) · 480 Bytes
Breadcrumbs
linux
/
tools
/
testing
/
selftests
/
bpf
/
progs
/
test_time_tai.c
Top
File metadata and controls
Code
Blame
24 lines (18 loc) · 480 Bytes
Raw
// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2022 Linutronix GmbH */ #include <linux/bpf.h> #include <bpf/bpf_helpers.h> char _license[] SEC("license") = "GPL"; SEC("tc") int time_tai(struct __sk_buff *skb) { __u64 ts1, ts2; /* Get TAI timestamps */ ts1 = bpf_ktime_get_tai_ns(); ts2 = bpf_ktime_get_tai_ns(); /* Save TAI timestamps (Note: skb->hwtstamp is read-only) */ skb->tstamp = ts1; skb->cb[0] = ts2 & 0xffffffff; skb->cb[1] = ts2 >> 32; return 0; }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
You can’t perform that action at this time.