On 10/31/25 9:20 AM, bot+bpf-ci@kernel.org wrote:
+static void run_test(void) +{
- __u64 rx_bytes_start, rx_bytes_end;
- double rate_mbps, rate_error;
- pthread_t server_thread = 0;
- struct connection *conn;
- __u64 ts_start, ts_end;
- int ret;
- conn = setup_connection();
- if (!ASSERT_OK_PTR(conn, "setup client and server connection"))
return;- ret = pthread_create(&server_thread, NULL, run_server,
(void *)(&conn->server_conn_fd));- if (!ASSERT_OK(ret, "start server rx thread"))
goto end_cleanup_conn;- if (!ASSERT_OK(read_rx_bytes(&rx_bytes_start), "read rx_bytes"))
goto end_kill_thread;- ts_start = get_time_ns();
- while (true) {
send(conn->client_conn_fd, (void *)tx_buffer, BUFFER_LEN, 0);ts_end = get_time_ns();if ((ts_end - ts_start)/100000 >= TIMEOUT_MS) {^^^^^^Does this time conversion use the correct divisor? The timeout check appears to divide nanoseconds by 100000, but TIMEOUT_MS is 2000 milliseconds. Converting nanoseconds to milliseconds requires dividing by 1000000, not 100000. With the current calculation, the timeout would trigger after 200 milliseconds rather than 2000 milliseconds.
The report is correct, there is a typo in the denominator.
Use the send_recv_data() helper in network_helpers.c. It should simplify this test and no need to pthread_create, while loop, ....etc. send_recv_data limits by the number of bytes instead of the length of time. There is a target rate in this test, so it should be easy to convert from time limit to byte limit and reuse the send_recv_data.
pw-bot: cr