public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiayuan Chen <jiayuan.chen@linux.dev>
To: Varun R Mallya <varunrmallya@gmail.com>,
	jiayuan.chen@linux.dev, yonghong.song@linux.dev,
	bpf@vger.kernel.org, sun.jian.kdev@gmail.com
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	martin.lau@linux.dev, eddyz87@gmail.com,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
	haoluo@google.com, jolsa@kernel.org
Subject: Re: [PATCH bpf-next v3] selftests/bpf: Improve connect_force_port test reliability
Date: Mon, 23 Mar 2026 18:40:08 +0800	[thread overview]
Message-ID: <a97a0392-bf2a-4b8d-8e0a-10388de6d408@linux.dev> (raw)
In-Reply-To: <20260323081131.65604-1-varunrmallya@gmail.com>


On 3/23/26 4:11 PM, Varun R Mallya wrote:
> The connect_force_port test fails intermittently in CI because the
> hardcoded server ports (60123/60124) may already be in use by other
> tests or processes [1].
>
> Fix this by passing port 0 to start_server(), letting the kernel assign
> a free port dynamically. The actual assigned port is then propagated to
> the BPF programs by writing it into the .bss map's initial value (via
> bpf_map__initial_value()) before loading, so the BPF programs use the
> correct backend port at runtime.
>
> [1] https://github.com/kernel-patches/bpf/actions/runs/22697676317/job/65808536038
>
> Suggested-by: Jiayuan Chen <jiayuan.chen@linux.dev>
> Signed-off-by: Varun R Mallya <varunrmallya@gmail.com>
> Reviewed-by: Sun Jian <sun.jian.kdev@gmail.com>
> ---
> This patch implements the approach suggested by Yonghong Song in his
> review of Jiayuan's v1 patch [2]: fix only the hardcoded port issue
> while keeping the existing bpf_object__*() loading model, skipping
> the optional skeleton refactor.
>
> [2] https://lore.kernel.org/bpf/6555dc32-b651-4c45-adaf-e3aecb013904@linux.dev/
Thanks for picking this up.

Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>

  reply	other threads:[~2026-03-23 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23  8:11 [PATCH bpf-next v3] selftests/bpf: Improve connect_force_port test reliability Varun R Mallya
2026-03-23 10:40 ` Jiayuan Chen [this message]
2026-03-23 13:38   ` Varun R Mallya
2026-03-23 21:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a97a0392-bf2a-4b8d-8e0a-10388de6d408@linux.dev \
    --to=jiayuan.chen@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=sun.jian.kdev@gmail.com \
    --cc=varunrmallya@gmail.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox