mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-07 00:59:07 +08:00
bpf: Add hwtstamp field for the sockops prog
The bpf-tc prog has already been able to access the skb_hwtstamps(skb)->hwtstamp. This patch extends the same hwtstamp access to the sockops prog. In sockops, the skb is also available to the bpf prog during the BPF_SOCK_OPS_PARSE_HDR_OPT_CB event. There is a use case that the hwtstamp will be useful to the sockops prog to better measure the one-way-delay when the sender has put the tx timestamp in the tcp header option. Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20221107230420.4192307-2-martin.lau@linux.dev
This commit is contained in:
committed by
Andrii Nakryiko
parent
e1b34c589d
commit
00fc9f407c
@@ -6445,6 +6445,7 @@ struct bpf_sock_ops {
|
|||||||
* the outgoing header has not
|
* the outgoing header has not
|
||||||
* been written yet.
|
* been written yet.
|
||||||
*/
|
*/
|
||||||
|
__u64 skb_hwtstamp;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Definitions for bpf_sock_ops_cb_flags */
|
/* Definitions for bpf_sock_ops_cb_flags */
|
||||||
|
|||||||
Reference in New Issue
Block a user