Subject: Re: [PATCH bpf v3 2/2] selftests/bpf: Test TCP_NODELAY in TCP hdr opt callbacks

From: Martin KaFai Lau <[email-masked]>
Date: Mon, 20 Apr 2026 10:09:16 -0700

On Sat, Apr 18, 2026 at 10:19:47AM +0800, KaFai Wan wrote:
> > > +	ret = setsockopt(sk_fds.active_fd, SOL_TCP, TCP_NODELAY, &true_val, sizeof(true_val));
> > 
> > Same comment as in v2. Why this setsockopt is needed?
> 
> Sorry I miss this. It's from the review of v1, my first version would break the syscall setsockopt
> and other CB besides HDR_OPT_LEN/WRITE_HDR_OPT. So in the test I check setsockopt() and
> bpf_setsockopt() in PASSIVE_ESTABLISHED_CB to make sure patch#1 would not break user space and other
> CB.

ic. Yep, remove it since v3 is not changing the syscall setsockopt.

> 
> > The setsockopt in userspace is unnecessary. 
> 
> Is bpf_setsockopt() in PASSIVE_ESTABLISHED_CB also unnecessary? I'll respin if they are unnecessary.

This one is fine. It checks if the bpf_setsockopt is not affectred in other CB.