On Wed, Oct 16, 2024 at 7:54 AM Martin KaFai Lau [off-list ref] wrote:
On 10/11/24 9:06 PM, Jason Xing wrote:
quoted
+static int bpf_sock_set_timestamping(struct sock *sk,
+ struct so_timestamping *timestamping)
+{
+ u32 flags = timestamping->flags;
+
+ if (flags & ~SOF_TIMESTAMPING_MASK)
+ return -EINVAL;
+
+ if (!(flags & (SOF_TIMESTAMPING_TX_SCHED | SOF_TIMESTAMPING_TX_SOFTWARE |
+ SOF_TIMESTAMPING_TX_ACK)))
hmm... Does it mean at least one of the bit must be set and cannot be completely
cleared once it has been set before?
Yes. Because in the current BPF extension feature I don't support all
the original SO_TIMESTAMPING flags (SOF_TIMESTAMPING_*) . When it
comes to clearing flags, I cannot find a proper time/chance to clear
them. That's the reason why I don't implement it.