mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-30 21:29:07 +08:00
bpf: Add BPF_SOCK_OPS_TSTAMP_ACK_CB callback
Support the ACK case for bpf timestamping. Add a new sock_ops callback, BPF_SOCK_OPS_TSTAMP_ACK_CB. This callback will occur at the same timestamping point as the user space's SCM_TSTAMP_ACK. The BPF program can use it to get the same SCM_TSTAMP_ACK timestamp without modifying the user-space application. This patch extends txstamp_ack to two bits: 1 stands for SO_TIMESTAMPING mode, 2 bpf extension. Signed-off-by: Jason Xing <kerneljasonxing@gmail.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250220072940.99994-10-kerneljasonxing@gmail.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
253b5ce758
commit
79e19bb62b
@@ -7051,6 +7051,11 @@ enum {
|
|||||||
* SK_BPF_CB_TX_TIMESTAMPING feature
|
* SK_BPF_CB_TX_TIMESTAMPING feature
|
||||||
* is on.
|
* is on.
|
||||||
*/
|
*/
|
||||||
|
BPF_SOCK_OPS_TSTAMP_ACK_CB, /* Called when all the skbs in the
|
||||||
|
* same sendmsg call are acked
|
||||||
|
* when SK_BPF_CB_TX_TIMESTAMPING
|
||||||
|
* feature is on.
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
|
/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
|
||||||
|
|||||||
Reference in New Issue
Block a user