On 2/8/25 2:32 AM, Jason Xing wrote:
Users can write the following code to enable the bpf extension:
int flags = SK_BPF_CB_TX_TIMESTAMPING;
int opts = SK_BPF_CB_FLAGS;
bpf_setsockopt(skops, SOL_SOCKET, opts, &flags, sizeof(flags));
The commit message should explain what is added/changed and why it is needed.
The above only tells how it is used, and the subject "bpf: add support for
bpf_setsockopt()" is unclear. Add what support? Also, both get- and
set-sockopt() are changed.
Subject: "bpf: Add networking timestamping support to bpf_get/setsockopt()"
What: The new SK_BPF_CB_FLAGS and new SK_BPF_CB_TX_TIMESTAMPING are added to
bpf_get/setsockopt.
Why: The later patch will implement the BPF networking timestamping. The BPF
program will use bpf_setsockopt(SK_BPF_CB_FLAGS, SK_BPF_CB_TX_TIMESTAMPING) to
enable the BPF networking timestamping on a socket.