From: "D. Wythe" <alibuda@linux.alibaba.com >
To: Guenter Roeck <linux@roeck-us.net>
Cc: "D. Wythe" <alibuda@linux.alibaba.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, pabeni@redhat.com, song@kernel.org,
sdf@google.com, haoluo@google.com, yhs@fb.com,
edumazet@google.com, john.fastabend@gmail.com,
kpsingh@kernel.org, jolsa@kernel.org, mjambigi@linux.ibm.com,
wenjia@linux.ibm.com, wintera@linux.ibm.com,
dust.li@linux.alibaba.com, tonylu@linux.alibaba.com,
guwen@linux.alibaba.com, bpf@vger.kernel.org,
davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
sidraya@linux.ibm.com, jaka@linux.ibm.com
Subject: Re: [PATCH bpf-next v5 2/3] net/smc: bpf: Introduce generic hook for handshake flow
Date: Tue, 16 Dec 2025 14:43:43 +0800 [thread overview]
Message-ID: <20251216064343.GA12661@j66a10360.sqa.eu95> (raw)
In-Reply-To: <3a0d2f44-6f1c-4f79-b8cb-f57387933a5a@roeck-us.net>
On Thu, Dec 04, 2025 at 08:16:46PM -0800, Guenter Roeck wrote:
> On Fri, Nov 07, 2025 at 11:56:31AM +0800, D. Wythe wrote:
> > The introduction of IPPROTO_SMC enables eBPF programs to determine
> > whether to use SMC based on the context of socket creation, such as
> > network namespaces, PID and comm name, etc.
> >
> > As a subsequent enhancement, to introduce a new generic hook that
> > allows decisions on whether to use SMC or not at runtime, including
> > but not limited to local/remote IP address or ports.
> >
> > User can write their own implememtion via bpf_struct_ops now to choose
> > whether to use SMC or not before TCP 3rd handshake to be comleted.
>
> Building csky:allmodconfig ... failed
> --------------
> Error log:
> In file included from include/linux/bpf_verifier.h:7,
> from net/smc/smc_hs_bpf.c:13:
> net/smc/smc_hs_bpf.c: In function 'bpf_smc_hs_ctrl_init':
> include/linux/bpf.h:2068:50: error: statement with no effect [-Werror=unused-value]
> 2068 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
> | ^~~~~~~~~~~~~~~~
> net/smc/smc_hs_bpf.c:139:16: note: in expansion of macro 'register_bpf_struct_ops'
> 139 | return register_bpf_struct_ops(&bpf_smc_hs_ctrl_ops, smc_hs_ctrl);
>
> Should this have been
>
> return register_bpf_struct_ops(&bpf_smc_hs_ctrl_ops, smc_hs_ctrl_ops);
> ^^^^
> ?
>
> Guenter
Hi Guenter,
This looks like a known build failure with -Werror=unused-value caused by register_bpf_struct_ops()
on some configs.
It should be fixed by Geert's patch:
https://lore.kernel.org/netdev/ead27aa92275c71c1fcd148f88ca6926a524f322.1764843951.git.geert@linux-m68k.org/
next prev parent reply other threads:[~2025-12-16 6:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 3:56 [PATCH bpf-next v5 0/3] net/smc: Introduce smc_hs_ctrl D. Wythe
2025-11-07 3:56 ` [PATCH bpf-next v5 1/3] bpf: export necessary symbols for modules with struct_ops D. Wythe
2025-11-07 3:56 ` [PATCH bpf-next v5 2/3] net/smc: bpf: Introduce generic hook for handshake flow D. Wythe
2025-12-05 4:16 ` Guenter Roeck
2025-12-16 6:43 ` D. Wythe [this message]
2025-11-07 3:56 ` [PATCH bpf-next v5 3/3] bpf/selftests: add selftest for bpf_smc_hs_ctrl D. Wythe
2025-11-07 4:16 ` bot+bpf-ci
2025-11-10 23:28 ` Martin KaFai Lau
2025-11-10 20:10 ` [PATCH bpf-next v5 0/3] net/smc: Introduce smc_hs_ctrl 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=20251216064343.GA12661@j66a10360.sqa.eu95 \
--to=alibuda@linux.alibaba.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=haoluo@google.com \
--cc=jaka@linux.ibm.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux@roeck-us.net \
--cc=martin.lau@linux.dev \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=sidraya@linux.ibm.com \
--cc=song@kernel.org \
--cc=tonylu@linux.alibaba.com \
--cc=wenjia@linux.ibm.com \
--cc=wintera@linux.ibm.com \
--cc=yhs@fb.com \
/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