[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5cef1246-5a84-b6e9-86aa-86a1cb6bd217@linux.alibaba.com>
Date: Tue, 28 Feb 2023 16:50:24 +0800
From: "D. Wythe" <alibuda@...ux.alibaba.com>
To: Wenjia Zhang <wenjia@...ux.ibm.com>, kgraul@...ux.ibm.com,
jaka@...ux.ibm.com, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org
Cc: 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 v2 1/2] net/smc: Introduce BPF injection
capability for SMC
On 2/27/23 3:58 PM, Wenjia Zhang wrote:
>
>
> On 21.02.23 13:18, D. Wythe wrote:
>> From: "D. Wythe" <alibuda@...ux.alibaba.com>
>>
>> This PATCH attempts to introduce BPF injection capability for SMC.
>> As we all know that the SMC protocol is not suitable for all scenarios,
>> especially for short-lived. However, for most applications, they cannot
>> guarantee that there are no such scenarios at all. Therefore, apps
>> may need some specific strategies to decide shall we need to use SMC
>> or not, for example, apps can limit the scope of the SMC to a specific
>> IP address or port.
...
>> +static int bpf_smc_passive_sk_ops_check_member(const struct btf_type *t,
>> + const struct btf_member *member,
>> + const struct bpf_prog *prog)
>> +{
>> + return 0;
>> +}
>
> Please check the right pointer type of check_member:
>
> int (*check_member)(const struct btf_type *t,
> const struct btf_member *member);
>
Hi Wenjia,
That's weird. the prototype of check_member on
latested net-next and bpf-next is:
struct bpf_struct_ops {
const struct bpf_verifier_ops *verifier_ops;
int (*init)(struct btf *btf);
int (*check_member)(const struct btf_type *t,
const struct btf_member *member,
const struct bpf_prog *prog);
int (*init_member)(const struct btf_type *t,
const struct btf_member *member,
void *kdata, const void *udata);
int (*reg)(void *kdata);
void (*unreg)(void *kdata);
const struct btf_type *type;
const struct btf_type *value_type;
const char *name;
struct btf_func_model func_models[BPF_STRUCT_OPS_MAX_NR_MEMBERS];
u32 type_id;
u32 value_id;
};
I wonder if there is any code out of sync?
And also I found that this patch is too complex and mixed with the code of two modules (smc & bpf).
I will split them out for easier review today.
Best wishes
D. Wythe
Powered by blists - more mailing lists