[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250103065409.GA70746@j66a10360.sqa.eu95>
Date: Fri, 3 Jan 2025 14:54:09 +0800
From: "D. Wythe" <alibuda@...ux.alibaba.com >
To: Zhu Yanjun <yanjun.zhu@...ux.dev>
Cc: "D. Wythe" <alibuda@...ux.alibaba.com>, kgraul@...ux.ibm.com,
wenjia@...ux.ibm.com, jaka@...ux.ibm.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,
guwen@...ux.alibaba.com, kuba@...nel.org, davem@...emloft.net,
netdev@...r.kernel.org, linux-s390@...r.kernel.org,
linux-rdma@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 3/5] net/smc: bpf: register smc_ops info
struct_ops
On Thu, Dec 26, 2024 at 08:44:20PM +0100, Zhu Yanjun wrote:
> 在 2024/12/18 3:44, D. Wythe 写道:
> >To implement injection capability for smc via struct_ops, so that
> >user can make their own smc_ops to modify the behavior of smc stack.
> >
> >Currently, user can write their own implememtion to choose whether to
> >use SMC or not before TCP 3rd handshake to be comleted. In the future,
> >users can implement more complex functions on smc by expanding it.
> >
> >Signed-off-by: D. Wythe <alibuda@...ux.alibaba.com>
> >---
> > net/smc/af_smc.c | 10 +++++
> > net/smc/smc_ops.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++
> > net/smc/smc_ops.h | 2 +
> > 3 files changed, 111 insertions(+)
> >
> >diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
> >index 9d76e902fd77..6adedae2986d 100644
> >--- a/net/smc/af_smc.c
> >+++ b/net/smc/af_smc.c
> >@@ -55,6 +55,7 @@
> > #include "smc_sysctl.h"
> > #include "smc_loopback.h"
> > #include "smc_inet.h"
> >+static struct bpf_struct_ops bpf_smc_bpf_ops = {
> > #else
> > static inline struct smc_ops *smc_ops_find_by_name(const char *name) { return NULL; }
> >+static inline int smc_bpf_struct_ops_init(void) { return 0; }
>
> Both smc_ops_find_by_name and smc_bpf_struct_ops_init seem to be
> dead codes. Enabling/Disabling CONFIG_SMC_OPS, the above 2 inline
> functions will not be called. The 2 functions should be removed.
>
> Zhu Yanjun
>
Good catch. I will fix this in the next version.
Thanks,
D. Wythe
> > #endif /* CONFIG_SMC_OPS*/
> > #endif /* __SMC_OPS */
Powered by blists - more mailing lists