Commit f64c4ac
bpf: Add hardware timestamp field to __sk_buff
BPF programs may want to know hardware timestamps if NIC supports
such timestamping.
Expose this data as hwtstamp field of __sk_buff the same way as
gso_segs/gso_size. This field could be accessed from the same
programs as tstamp field, but it's read-only field. Explicit test
to deny access to padding data is added to bpf_skb_is_valid_access.
Also update BPF_PROG_TEST_RUN tests of the feature.
Signed-off-by: Vadim Fedorenko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]1 parent e876a03 commit f64c4ac
3 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5284 | 5284 | | |
5285 | 5285 | | |
5286 | 5286 | | |
| 5287 | + | |
| 5288 | + | |
5287 | 5289 | | |
5288 | 5290 | | |
5289 | 5291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7765 | 7765 | | |
7766 | 7766 | | |
7767 | 7767 | | |
| 7768 | + | |
| 7769 | + | |
| 7770 | + | |
| 7771 | + | |
7768 | 7772 | | |
7769 | 7773 | | |
7770 | 7774 | | |
| |||
7774 | 7778 | | |
7775 | 7779 | | |
7776 | 7780 | | |
| 7781 | + | |
| 7782 | + | |
| 7783 | + | |
7777 | 7784 | | |
7778 | 7785 | | |
7779 | 7786 | | |
| |||
7802 | 7809 | | |
7803 | 7810 | | |
7804 | 7811 | | |
| 7812 | + | |
7805 | 7813 | | |
7806 | 7814 | | |
7807 | 7815 | | |
| |||
7872 | 7880 | | |
7873 | 7881 | | |
7874 | 7882 | | |
| 7883 | + | |
7875 | 7884 | | |
7876 | 7885 | | |
7877 | 7886 | | |
| |||
8373 | 8382 | | |
8374 | 8383 | | |
8375 | 8384 | | |
| 8385 | + | |
8376 | 8386 | | |
8377 | 8387 | | |
8378 | 8388 | | |
| |||
8884 | 8894 | | |
8885 | 8895 | | |
8886 | 8896 | | |
| 8897 | + | |
| 8898 | + | |
| 8899 | + | |
| 8900 | + | |
| 8901 | + | |
| 8902 | + | |
| 8903 | + | |
| 8904 | + | |
| 8905 | + | |
| 8906 | + | |
| 8907 | + | |
8887 | 8908 | | |
8888 | 8909 | | |
8889 | 8910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5284 | 5284 | | |
5285 | 5285 | | |
5286 | 5286 | | |
| 5287 | + | |
| 5288 | + | |
5287 | 5289 | | |
5288 | 5290 | | |
5289 | 5291 | | |
| |||
0 commit comments