* [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
@ 2025-03-11 8:54 Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 1/6] bpf: introduce bpf_sol_tcp_getsockopt to support TCP_BPF flags Jason Xing
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-11 8:54 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, dsahern, ast, daniel, andrii,
martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, horms, kuniyu, ncardwell
Cc: bpf, netdev, Jason Xing
Introduce bpf_sol_tcp_getsockopt() helper.
Add bpf_getsockopt for RTO MIN and DELACK MAX.
Add setsockopt/getsockopt for RTO MIN and DELACK MAX.
Add corresponding selftests for bpf.
v2
Link: https://lore.kernel.org/all/20250309123004.85612-1-kerneljasonxing@gmail.com/
1. add bpf getsockopt common helper
2. target bpf-next net branch
Jason Xing (6):
bpf: introduce bpf_sol_tcp_getsockopt to support TCP_BPF flags
tcp: bpf: support bpf_getsockopt for TCP_BPF_RTO_MIN
tcp: bpf: support bpf_getsockopt for TCP_BPF_DELACK_MAX
tcp: support TCP_RTO_MIN_US for set/getsockopt use
tcp: support TCP_DELACK_MAX_US for set/getsockopt use
selftests: add bpf_set/getsockopt() for TCP_BPF_DELACK_MAX and
TCP_BPF_RTO_MIN
Documentation/networking/ip-sysctl.rst | 4 +-
include/net/tcp.h | 2 +-
include/uapi/linux/tcp.h | 2 +
net/core/filter.c | 45 ++++++++++++++-----
net/ipv4/tcp.c | 32 ++++++++++++-
net/ipv4/tcp_output.c | 2 +-
.../selftests/bpf/progs/setget_sockopt.c | 2 +
7 files changed, 71 insertions(+), 18 deletions(-)
--
2.43.5
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH bpf-next v2 1/6] bpf: introduce bpf_sol_tcp_getsockopt to support TCP_BPF flags
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
@ 2025-03-11 8:54 ` Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 2/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_RTO_MIN Jason Xing
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-11 8:54 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, dsahern, ast, daniel, andrii,
martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, horms, kuniyu, ncardwell
Cc: bpf, netdev, Jason Xing
The patch refactors a bit on supporting getsockopt for TCP BPF flags.
For now, only TCP_BPF_SOCK_OPS_CB_FLAGS. Later, more flags will be added
into this function.
No functional changes here.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
---
net/core/filter.c | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/net/core/filter.c b/net/core/filter.c
index a0867c5b32b3..2932de5cc57c 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5282,6 +5282,26 @@ static int sol_socket_sockopt(struct sock *sk, int optname,
KERNEL_SOCKPTR(optval), *optlen);
}
+static int bpf_sol_tcp_getsockopt(struct sock *sk, int optname,
+ char *optval, int optlen)
+{
+ if (optlen != sizeof(int))
+ return -EINVAL;
+
+ switch (optname) {
+ case TCP_BPF_SOCK_OPS_CB_FLAGS: {
+ int cb_flags = tcp_sk(sk)->bpf_sock_ops_cb_flags;
+
+ memcpy(optval, &cb_flags, optlen);
+ break;
+ }
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
static int bpf_sol_tcp_setsockopt(struct sock *sk, int optname,
char *optval, int optlen)
{
@@ -5415,20 +5435,9 @@ static int sol_tcp_sockopt(struct sock *sk, int optname,
if (*optlen < 1)
return -EINVAL;
break;
- case TCP_BPF_SOCK_OPS_CB_FLAGS:
- if (*optlen != sizeof(int))
- return -EINVAL;
- if (getopt) {
- struct tcp_sock *tp = tcp_sk(sk);
- int cb_flags = tp->bpf_sock_ops_cb_flags;
-
- memcpy(optval, &cb_flags, *optlen);
- return 0;
- }
- return bpf_sol_tcp_setsockopt(sk, optname, optval, *optlen);
default:
if (getopt)
- return -EINVAL;
+ return bpf_sol_tcp_getsockopt(sk, optname, optval, *optlen);
return bpf_sol_tcp_setsockopt(sk, optname, optval, *optlen);
}
--
2.43.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH bpf-next v2 2/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_RTO_MIN
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 1/6] bpf: introduce bpf_sol_tcp_getsockopt to support TCP_BPF flags Jason Xing
@ 2025-03-11 8:54 ` Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 3/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_DELACK_MAX Jason Xing
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-11 8:54 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, dsahern, ast, daniel, andrii,
martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, horms, kuniyu, ncardwell
Cc: bpf, netdev, Jason Xing
Support bpf_getsockopt if application tries to know what the RTO MIN
of this socket is.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
---
net/core/filter.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/core/filter.c b/net/core/filter.c
index 2932de5cc57c..4d34d35af5c7 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5295,6 +5295,12 @@ static int bpf_sol_tcp_getsockopt(struct sock *sk, int optname,
memcpy(optval, &cb_flags, optlen);
break;
}
+ case TCP_BPF_RTO_MIN: {
+ int rto_min_us = jiffies_to_usecs(inet_csk(sk)->icsk_rto_min);
+
+ memcpy(optval, &rto_min_us, optlen);
+ break;
+ }
default:
return -EINVAL;
}
--
2.43.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH bpf-next v2 3/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_DELACK_MAX
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 1/6] bpf: introduce bpf_sol_tcp_getsockopt to support TCP_BPF flags Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 2/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_RTO_MIN Jason Xing
@ 2025-03-11 8:54 ` Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 4/6] tcp: support TCP_RTO_MIN_US for set/getsockopt use Jason Xing
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-11 8:54 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, dsahern, ast, daniel, andrii,
martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, horms, kuniyu, ncardwell
Cc: bpf, netdev, Jason Xing
Support bpf_getsockopt if application tries to know what the delayed ack
max time is.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
---
net/core/filter.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/core/filter.c b/net/core/filter.c
index 4d34d35af5c7..46ae8eb7a03c 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5301,6 +5301,12 @@ static int bpf_sol_tcp_getsockopt(struct sock *sk, int optname,
memcpy(optval, &rto_min_us, optlen);
break;
}
+ case TCP_BPF_DELACK_MAX: {
+ int delack_max_us = jiffies_to_usecs(inet_csk(sk)->icsk_delack_max);
+
+ memcpy(optval, &delack_max_us, optlen);
+ break;
+ }
default:
return -EINVAL;
}
--
2.43.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH bpf-next v2 4/6] tcp: support TCP_RTO_MIN_US for set/getsockopt use
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
` (2 preceding siblings ...)
2025-03-11 8:54 ` [PATCH bpf-next v2 3/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_DELACK_MAX Jason Xing
@ 2025-03-11 8:54 ` Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 5/6] tcp: support TCP_DELACK_MAX_US " Jason Xing
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-11 8:54 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, dsahern, ast, daniel, andrii,
martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, horms, kuniyu, ncardwell
Cc: bpf, netdev, Jason Xing
Support adjusting RTO MIN for socket level in non BPF case.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
---
Documentation/networking/ip-sysctl.rst | 4 ++--
include/net/tcp.h | 2 +-
include/uapi/linux/tcp.h | 1 +
net/ipv4/tcp.c | 16 +++++++++++++++-
4 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst
index 054561f8dcae..56eabcff0ed0 100644
--- a/Documentation/networking/ip-sysctl.rst
+++ b/Documentation/networking/ip-sysctl.rst
@@ -1229,8 +1229,8 @@ tcp_pingpong_thresh - INTEGER
tcp_rto_min_us - INTEGER
Minimal TCP retransmission timeout (in microseconds). Note that the
rto_min route option has the highest precedence for configuring this
- setting, followed by the TCP_BPF_RTO_MIN socket option, followed by
- this tcp_rto_min_us sysctl.
+ setting, followed by the TCP_BPF_RTO_MIN and TCP_RTO_MIN_US socket
+ options, followed by this tcp_rto_min_us sysctl.
The recommended practice is to use a value less or equal to 200000
microseconds.
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 9745c7f18170..e850550deb6f 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -803,7 +803,7 @@ u32 tcp_delack_max(const struct sock *sk);
static inline u32 tcp_rto_min(const struct sock *sk)
{
const struct dst_entry *dst = __sk_dst_get(sk);
- u32 rto_min = inet_csk(sk)->icsk_rto_min;
+ u32 rto_min = READ_ONCE(inet_csk(sk)->icsk_rto_min);
if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN);
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index 32a27b4a5020..b2476cf7058e 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -137,6 +137,7 @@ enum {
#define TCP_IS_MPTCP 43 /* Is MPTCP being used? */
#define TCP_RTO_MAX_MS 44 /* max rto time in ms */
+#define TCP_RTO_MIN_US 45 /* min rto time in us */
#define TCP_REPAIR_ON 1
#define TCP_REPAIR_OFF 0
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 08d73f17e816..2a0fd56358c3 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3339,7 +3339,7 @@ int tcp_disconnect(struct sock *sk, int flags)
icsk->icsk_probes_out = 0;
icsk->icsk_probes_tstamp = 0;
icsk->icsk_rto = TCP_TIMEOUT_INIT;
- icsk->icsk_rto_min = TCP_RTO_MIN;
+ WRITE_ONCE(icsk->icsk_rto_min, TCP_RTO_MIN);
icsk->icsk_delack_max = TCP_DELACK_MAX;
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
tcp_snd_cwnd_set(tp, TCP_INIT_CWND);
@@ -3820,6 +3820,14 @@ int do_tcp_setsockopt(struct sock *sk, int level, int optname,
return -EINVAL;
WRITE_ONCE(inet_csk(sk)->icsk_rto_max, msecs_to_jiffies(val));
return 0;
+ case TCP_RTO_MIN_US: {
+ int rto_min = usecs_to_jiffies(val);
+
+ if (rto_min > TCP_RTO_MIN || rto_min < TCP_TIMEOUT_MIN)
+ return -EINVAL;
+ WRITE_ONCE(inet_csk(sk)->icsk_rto_min, rto_min);
+ return 0;
+ }
}
sockopt_lock_sock(sk);
@@ -4659,6 +4667,12 @@ int do_tcp_getsockopt(struct sock *sk, int level,
case TCP_RTO_MAX_MS:
val = jiffies_to_msecs(tcp_rto_max(sk));
break;
+ case TCP_RTO_MIN_US: {
+ int rto_min = READ_ONCE(inet_csk(sk)->icsk_rto_min);
+
+ val = jiffies_to_usecs(rto_min);
+ break;
+ }
default:
return -ENOPROTOOPT;
}
--
2.43.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH bpf-next v2 5/6] tcp: support TCP_DELACK_MAX_US for set/getsockopt use
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
` (3 preceding siblings ...)
2025-03-11 8:54 ` [PATCH bpf-next v2 4/6] tcp: support TCP_RTO_MIN_US for set/getsockopt use Jason Xing
@ 2025-03-11 8:54 ` Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 6/6] selftests: add bpf_set/getsockopt() for TCP_BPF_DELACK_MAX and TCP_BPF_RTO_MIN Jason Xing
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-11 8:54 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, dsahern, ast, daniel, andrii,
martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, horms, kuniyu, ncardwell
Cc: bpf, netdev, Jason Xing
Support adjusting delayed ack max for socket level in non BPF case.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
---
include/uapi/linux/tcp.h | 1 +
net/ipv4/tcp.c | 16 +++++++++++++++-
net/ipv4/tcp_output.c | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index b2476cf7058e..2377e22f2c4b 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -138,6 +138,7 @@ enum {
#define TCP_IS_MPTCP 43 /* Is MPTCP being used? */
#define TCP_RTO_MAX_MS 44 /* max rto time in ms */
#define TCP_RTO_MIN_US 45 /* min rto time in us */
+#define TCP_DELACK_MAX_US 46 /* max delayed ack time in us */
#define TCP_REPAIR_ON 1
#define TCP_REPAIR_OFF 0
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 2a0fd56358c3..ed652c5e9e96 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3340,7 +3340,7 @@ int tcp_disconnect(struct sock *sk, int flags)
icsk->icsk_probes_tstamp = 0;
icsk->icsk_rto = TCP_TIMEOUT_INIT;
WRITE_ONCE(icsk->icsk_rto_min, TCP_RTO_MIN);
- icsk->icsk_delack_max = TCP_DELACK_MAX;
+ WRITE_ONCE(icsk->icsk_delack_max, TCP_DELACK_MAX);
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
tcp_snd_cwnd_set(tp, TCP_INIT_CWND);
tp->snd_cwnd_cnt = 0;
@@ -3828,6 +3828,14 @@ int do_tcp_setsockopt(struct sock *sk, int level, int optname,
WRITE_ONCE(inet_csk(sk)->icsk_rto_min, rto_min);
return 0;
}
+ case TCP_DELACK_MAX_US: {
+ int delack_max = usecs_to_jiffies(val);
+
+ if (delack_max > TCP_DELACK_MAX || delack_max < TCP_TIMEOUT_MIN)
+ return -EINVAL;
+ WRITE_ONCE(inet_csk(sk)->icsk_delack_max, delack_max);
+ return 0;
+ }
}
sockopt_lock_sock(sk);
@@ -4673,6 +4681,12 @@ int do_tcp_getsockopt(struct sock *sk, int level,
val = jiffies_to_usecs(rto_min);
break;
}
+ case TCP_DELACK_MAX_US: {
+ int delack_max = READ_ONCE(inet_csk(sk)->icsk_delack_max);
+
+ val = jiffies_to_usecs(delack_max);
+ break;
+ }
default:
return -ENOPROTOOPT;
}
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 9a3cf51eab78..00267b17f5e4 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -4173,7 +4173,7 @@ u32 tcp_delack_max(const struct sock *sk)
{
u32 delack_from_rto_min = max(tcp_rto_min(sk), 2) - 1;
- return min(inet_csk(sk)->icsk_delack_max, delack_from_rto_min);
+ return min(READ_ONCE(inet_csk(sk)->icsk_delack_max), delack_from_rto_min);
}
/* Send out a delayed ack, the caller does the policy checking
--
2.43.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH bpf-next v2 6/6] selftests: add bpf_set/getsockopt() for TCP_BPF_DELACK_MAX and TCP_BPF_RTO_MIN
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
` (4 preceding siblings ...)
2025-03-11 8:54 ` [PATCH bpf-next v2 5/6] tcp: support TCP_DELACK_MAX_US " Jason Xing
@ 2025-03-11 8:54 ` Jason Xing
[not found] ` <80e745a45391cb8bb60b49978c0a9af5f51bec183f01a7b8f300992a4b14aa6f@mail.kernel.org>
2025-03-12 4:57 ` Eric Dumazet
7 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-11 8:54 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, dsahern, ast, daniel, andrii,
martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, horms, kuniyu, ncardwell
Cc: bpf, netdev, Jason Xing
Add selftests for TCP_BPF_DELACK_MAX and TCP_BPF_RTO_MIN BPF socket
cases.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
---
tools/testing/selftests/bpf/progs/setget_sockopt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/setget_sockopt.c b/tools/testing/selftests/bpf/progs/setget_sockopt.c
index 106fe430f41b..7a18a2d089bb 100644
--- a/tools/testing/selftests/bpf/progs/setget_sockopt.c
+++ b/tools/testing/selftests/bpf/progs/setget_sockopt.c
@@ -61,6 +61,8 @@ static const struct sockopt_test sol_tcp_tests[] = {
{ .opt = TCP_NOTSENT_LOWAT, .new = 1314, .expected = 1314, },
{ .opt = TCP_BPF_SOCK_OPS_CB_FLAGS, .new = BPF_SOCK_OPS_ALL_CB_FLAGS,
.expected = BPF_SOCK_OPS_ALL_CB_FLAGS, },
+ { .opt = TCP_BPF_DELACK_MAX, .new = 10000, .expected = 10000, },
+ { .opt = TCP_BPF_RTO_MIN, .new = 2000, .expected = 2000, },
{ .opt = TCP_RTO_MAX_MS, .new = 2000, .expected = 2000, },
{ .opt = 0, },
};
--
2.43.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
[not found] ` <CAL+tcoD8TAWT-_mU8wMT3zt-Thh5ZVfmBear5m=G4MbCbBS9XA@mail.gmail.com>
@ 2025-03-11 18:39 ` Martin KaFai Lau
2025-03-11 18:44 ` Martin KaFai Lau
0 siblings, 1 reply; 13+ messages in thread
From: Martin KaFai Lau @ 2025-03-11 18:39 UTC (permalink / raw)
To: Jason Xing
Cc: bot+bpf-ci, kernel-ci, andrii, daniel, bpf, Network Development
On 3/11/25 4:07 AM, Jason Xing wrote:
> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
>>
>> Dear patch submitter,
>>
>> CI has tested the following submission:
>> Status: FAILURE
>> Name: [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
>> Patchwork: https://patchwork.kernel.org/project/netdevbpf/list/?series=942617&state=*
>> Matrix: https://github.com/kernel-patches/bpf/actions/runs/13784214269
>>
>> Failed jobs:
>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548852334
>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548853075
>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548829871
>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548830246
>
> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that
It cannot apply, so it applied to bpf-next/net.
I just confirmed by first checking this:
https://github.com/kernel-patches/bpf/pulls
then find your patches and figure out bpf-net_base:
https://github.com/kernel-patches/bpf/pull/8649
> says the patch can not be applied. Could it be possible that CI
> applied it on the wrong branch? I targeted the net branch.
>
> I have no clue this series is affecting the following tests
The test is changing the exact same test setget_sockopt and it failed, so it
should be suspicious enough to look at the details of the bpf CI report.
The report said it failed in aarch64 and s390 but x86 seems to be fine.
When the test failed, it pretty much failed on all tests. It looks like some of
the new set/getsockopt checks failed in these two archs. A blind guess is the
jiffies part.
> (./test_progs -t setget_sockopt). It seems it has nothing to do with
> this series. And I'm unable to reproduce it locally.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
2025-03-11 18:39 ` [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Martin KaFai Lau
@ 2025-03-11 18:44 ` Martin KaFai Lau
2025-03-12 6:50 ` Jason Xing
0 siblings, 1 reply; 13+ messages in thread
From: Martin KaFai Lau @ 2025-03-11 18:44 UTC (permalink / raw)
To: Jason Xing
Cc: bot+bpf-ci, kernel-ci, andrii, daniel, bpf, Network Development
On 3/11/25 11:39 AM, Martin KaFai Lau wrote:
> On 3/11/25 4:07 AM, Jason Xing wrote:
>> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
>>>
>>> Dear patch submitter,
>>>
>>> CI has tested the following submission:
>>> Status: FAILURE
>>> Name: [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/
>>> getsockopt supports
>>> Patchwork: https://patchwork.kernel.org/project/netdevbpf/list/?
>>> series=942617&state=*
>>> Matrix: https://github.com/kernel-patches/bpf/actions/runs/13784214269
>>>
>>> Failed jobs:
>>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/
>>> runs/13784214269/job/38548852334
>>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/
>>> actions/runs/13784214269/job/38548853075
>>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
>>> runs/13784214269/job/38548829871
>>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
>>> runs/13784214269/job/38548830246
>>
>> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that
>
> It cannot apply, so it applied to bpf-next/net.
>
> I just confirmed by first checking this:
> https://github.com/kernel-patches/bpf/pulls
>
> then find your patches and figure out bpf-net_base:
> https://github.com/kernel-patches/bpf/pull/8649
>
>> says the patch can not be applied. Could it be possible that CI
>> applied it on the wrong branch? I targeted the net branch.
>>
>> I have no clue this series is affecting the following tests
>
> The test is changing the exact same test setget_sockopt and it failed, so it
> should be suspicious enough to look at the details of the bpf CI report.
>
> The report said it failed in aarch64 and s390 but x86 seems to be fine.
> When the test failed, it pretty much failed on all tests. It looks like some of
> the new set/getsockopt checks failed in these two archs. A blind guess is the
> jiffies part.
and forgot to mention that you can run bpf CI before posting. This may be easier
to test other archs. Take a look at Documentation/bpf/bpf_devel_QA.rst. The
section "How do I run BPF CI on my changes before sending them out for review?"
>
>
>> (./test_progs -t setget_sockopt). It seems it has nothing to do with
>> this series. And I'm unable to reproduce it locally.
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
` (6 preceding siblings ...)
[not found] ` <80e745a45391cb8bb60b49978c0a9af5f51bec183f01a7b8f300992a4b14aa6f@mail.kernel.org>
@ 2025-03-12 4:57 ` Eric Dumazet
2025-03-12 5:13 ` Jason Xing
7 siblings, 1 reply; 13+ messages in thread
From: Eric Dumazet @ 2025-03-12 4:57 UTC (permalink / raw)
To: Jason Xing
Cc: davem, kuba, pabeni, dsahern, ast, daniel, andrii, martin.lau,
eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
haoluo, jolsa, horms, kuniyu, ncardwell, bpf, netdev
On Tue, Mar 11, 2025 at 9:56 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> Introduce bpf_sol_tcp_getsockopt() helper.
>
> Add bpf_getsockopt for RTO MIN and DELACK MAX.
>
> Add setsockopt/getsockopt for RTO MIN and DELACK MAX.
>
> Add corresponding selftests for bpf.
>
> v2
> Link: https://lore.kernel.org/all/20250309123004.85612-1-kerneljasonxing@gmail.com/
> 1. add bpf getsockopt common helper
> 2. target bpf-next net branch
Some of us are busy attending netdev conference.
Please split this series in two, one for pure TCP changes and one
other for BPF, and send it after the netdev conference ends.
It is not because BPF stuff is added that suddenly a series can escape
TCP maintainers attention.
Thank you
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
2025-03-12 4:57 ` Eric Dumazet
@ 2025-03-12 5:13 ` Jason Xing
0 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-12 5:13 UTC (permalink / raw)
To: Eric Dumazet
Cc: davem, kuba, pabeni, dsahern, ast, daniel, andrii, martin.lau,
eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
haoluo, jolsa, horms, kuniyu, ncardwell, bpf, netdev
On Wed, Mar 12, 2025 at 5:57 AM Eric Dumazet <edumazet@google.com> wrote:
>
> On Tue, Mar 11, 2025 at 9:56 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
> >
> > Introduce bpf_sol_tcp_getsockopt() helper.
> >
> > Add bpf_getsockopt for RTO MIN and DELACK MAX.
> >
> > Add setsockopt/getsockopt for RTO MIN and DELACK MAX.
> >
> > Add corresponding selftests for bpf.
> >
> > v2
> > Link: https://lore.kernel.org/all/20250309123004.85612-1-kerneljasonxing@gmail.com/
> > 1. add bpf getsockopt common helper
> > 2. target bpf-next net branch
>
> Some of us are busy attending netdev conference.
>
> Please split this series in two, one for pure TCP changes and one
> other for BPF, and send it after the netdev conference ends.
No problem. I will handle the BPF part first.
>
> It is not because BPF stuff is added that suddenly a series can escape
> TCP maintainers attention.
Oh, it is obviously not my intention :) The netdev parts are
definitely needed TCP maintainers ack for sure :)
Thanks,
Jason
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
2025-03-11 18:44 ` Martin KaFai Lau
@ 2025-03-12 6:50 ` Jason Xing
2025-03-12 12:25 ` Jason Xing
0 siblings, 1 reply; 13+ messages in thread
From: Jason Xing @ 2025-03-12 6:50 UTC (permalink / raw)
To: Martin KaFai Lau
Cc: bot+bpf-ci, kernel-ci, andrii, daniel, bpf, Network Development
On Tue, Mar 11, 2025 at 7:44 PM Martin KaFai Lau <martin.lau@linux.dev> wrote:
>
> On 3/11/25 11:39 AM, Martin KaFai Lau wrote:
> > On 3/11/25 4:07 AM, Jason Xing wrote:
> >> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
> >>>
> >>> Dear patch submitter,
> >>>
> >>> CI has tested the following submission:
> >>> Status: FAILURE
> >>> Name: [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/
> >>> getsockopt supports
> >>> Patchwork: https://patchwork.kernel.org/project/netdevbpf/list/?
> >>> series=942617&state=*
> >>> Matrix: https://github.com/kernel-patches/bpf/actions/runs/13784214269
> >>>
> >>> Failed jobs:
> >>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/
> >>> runs/13784214269/job/38548852334
> >>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/
> >>> actions/runs/13784214269/job/38548853075
> >>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> >>> runs/13784214269/job/38548829871
> >>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> >>> runs/13784214269/job/38548830246
> >>
> >> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that
> >
> > It cannot apply, so it applied to bpf-next/net.
> >
> > I just confirmed by first checking this:
> > https://github.com/kernel-patches/bpf/pulls
> >
> > then find your patches and figure out bpf-net_base:
> > https://github.com/kernel-patches/bpf/pull/8649
> >
> >> says the patch can not be applied. Could it be possible that CI
> >> applied it on the wrong branch? I targeted the net branch.
> >>
> >> I have no clue this series is affecting the following tests
> >
> > The test is changing the exact same test setget_sockopt and it failed, so it
> > should be suspicious enough to look at the details of the bpf CI report.
> >
> > The report said it failed in aarch64 and s390 but x86 seems to be fine.
> > When the test failed, it pretty much failed on all tests. It looks like some of
> > the new set/getsockopt checks failed in these two archs. A blind guess is the
> > jiffies part.
>
> and forgot to mention that you can run bpf CI before posting. This may be easier
> to test other archs. Take a look at Documentation/bpf/bpf_devel_QA.rst. The
> section "How do I run BPF CI on my changes before sending them out for review?"
Thanks for the pointer.
Let me try one patch by one patch. Having checked the series itself, I
still have no clue. You said jiffies part. What is that? Could you
please point out a file name or configuration so that I can follow you
and then do some tests?
Thanks,
Jason
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
2025-03-12 6:50 ` Jason Xing
@ 2025-03-12 12:25 ` Jason Xing
0 siblings, 0 replies; 13+ messages in thread
From: Jason Xing @ 2025-03-12 12:25 UTC (permalink / raw)
To: Martin KaFai Lau
Cc: bot+bpf-ci, kernel-ci, andrii, daniel, bpf, Network Development
On Wed, Mar 12, 2025 at 7:50 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> On Tue, Mar 11, 2025 at 7:44 PM Martin KaFai Lau <martin.lau@linux.dev> wrote:
> >
> > On 3/11/25 11:39 AM, Martin KaFai Lau wrote:
> > > On 3/11/25 4:07 AM, Jason Xing wrote:
> > >> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
> > >>>
> > >>> Dear patch submitter,
> > >>>
> > >>> CI has tested the following submission:
> > >>> Status: FAILURE
> > >>> Name: [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/
> > >>> getsockopt supports
> > >>> Patchwork: https://patchwork.kernel.org/project/netdevbpf/list/?
> > >>> series=942617&state=*
> > >>> Matrix: https://github.com/kernel-patches/bpf/actions/runs/13784214269
> > >>>
> > >>> Failed jobs:
> > >>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/
> > >>> runs/13784214269/job/38548852334
> > >>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/
> > >>> actions/runs/13784214269/job/38548853075
> > >>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> > >>> runs/13784214269/job/38548829871
> > >>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> > >>> runs/13784214269/job/38548830246
> > >>
> > >> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that
> > >
> > > It cannot apply, so it applied to bpf-next/net.
> > >
> > > I just confirmed by first checking this:
> > > https://github.com/kernel-patches/bpf/pulls
> > >
> > > then find your patches and figure out bpf-net_base:
> > > https://github.com/kernel-patches/bpf/pull/8649
> > >
> > >> says the patch can not be applied. Could it be possible that CI
> > >> applied it on the wrong branch? I targeted the net branch.
> > >>
> > >> I have no clue this series is affecting the following tests
> > >
> > > The test is changing the exact same test setget_sockopt and it failed, so it
> > > should be suspicious enough to look at the details of the bpf CI report.
> > >
> > > The report said it failed in aarch64 and s390 but x86 seems to be fine.
> > > When the test failed, it pretty much failed on all tests. It looks like some of
> > > the new set/getsockopt checks failed in these two archs. A blind guess is the
> > > jiffies part.
> >
> > and forgot to mention that you can run bpf CI before posting. This may be easier
> > to test other archs. Take a look at Documentation/bpf/bpf_devel_QA.rst. The
> > section "How do I run BPF CI on my changes before sending them out for review?"
>
> Thanks for the pointer.
>
> Let me try one patch by one patch. Having checked the series itself, I
> still have no clue. You said jiffies part. What is that? Could you
> please point out a file name or configuration so that I can follow you
> and then do some tests?
Oh, I realized that. Maybe I need to adjust the test and expected
value in the selftests to make it compatible with different HZ values
in those arch configs.
Thanks,
Jason
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-03-12 12:26 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11 8:54 [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 1/6] bpf: introduce bpf_sol_tcp_getsockopt to support TCP_BPF flags Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 2/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_RTO_MIN Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 3/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_DELACK_MAX Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 4/6] tcp: support TCP_RTO_MIN_US for set/getsockopt use Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 5/6] tcp: support TCP_DELACK_MAX_US " Jason Xing
2025-03-11 8:54 ` [PATCH bpf-next v2 6/6] selftests: add bpf_set/getsockopt() for TCP_BPF_DELACK_MAX and TCP_BPF_RTO_MIN Jason Xing
[not found] ` <80e745a45391cb8bb60b49978c0a9af5f51bec183f01a7b8f300992a4b14aa6f@mail.kernel.org>
[not found] ` <CAL+tcoD8TAWT-_mU8wMT3zt-Thh5ZVfmBear5m=G4MbCbBS9XA@mail.gmail.com>
2025-03-11 18:39 ` [PATCH bpf-next v2 0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports Martin KaFai Lau
2025-03-11 18:44 ` Martin KaFai Lau
2025-03-12 6:50 ` Jason Xing
2025-03-12 12:25 ` Jason Xing
2025-03-12 4:57 ` Eric Dumazet
2025-03-12 5:13 ` Jason Xing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).