[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251216064343.GA12661@j66a10360.sqa.eu95>
Date: Tue, 16 Dec 2025 14:43:43 +0800
From: "D. Wythe" <alibuda@...ux.alibaba.com >
To: Guenter Roeck <linux@...ck-us.net>
Cc: "D. Wythe" <alibuda@...ux.alibaba.com>, ast@...nel.org,
daniel@...earbox.net, andrii@...nel.org, martin.lau@...ux.dev,
pabeni@...hat.com, song@...nel.org, sdf@...gle.com,
haoluo@...gle.com, yhs@...com, edumazet@...gle.com,
john.fastabend@...il.com, kpsingh@...nel.org, jolsa@...nel.org,
mjambigi@...ux.ibm.com, wenjia@...ux.ibm.com, wintera@...ux.ibm.com,
dust.li@...ux.alibaba.com, tonylu@...ux.alibaba.com,
guwen@...ux.alibaba.com, bpf@...r.kernel.org, davem@...emloft.net,
kuba@...nel.org, netdev@...r.kernel.org, sidraya@...ux.ibm.com,
jaka@...ux.ibm.com
Subject: Re: [PATCH bpf-next v5 2/3] net/smc: bpf: Introduce generic hook for
handshake flow
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/
Powered by blists - more mailing lists