public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Wenjia Zhang <wenjia@linux.ibm.com>
To: "D. Wythe" <alibuda@linux.alibaba.com>,
	kgraul@linux.ibm.com, jaka@linux.ibm.com, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org
Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org,
	linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 1/2] net/smc: Introduce BPF injection capability for SMC
Date: Tue, 28 Feb 2023 09:58:13 +0100	[thread overview]
Message-ID: <fafc5ef1-724f-1831-2d99-ef80a5540faf@linux.ibm.com> (raw)
In-Reply-To: <5cef1246-5a84-b6e9-86aa-86a1cb6bd217@linux.alibaba.com>



On 28.02.23 09:50, D. Wythe wrote:
> 
> 
> On 2/27/23 3:58 PM, Wenjia Zhang wrote:
>>
>>
>> On 21.02.23 13:18, D. Wythe wrote:
>>> From: "D. Wythe" <alibuda@linux.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
> 

Good question, the base I used is the current torvalds tree, maybe some 
code there is still not up-to-date.

But it would be great if you can split them out for better review.

Thanks
Wenjia

  reply	other threads:[~2023-02-28  8:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 12:18 [PATCH bpf-next v2 0/2] net/smc: Introduce BPF injection capability D. Wythe
2023-02-21 12:18 ` [PATCH bpf-next v2 1/2] net/smc: Introduce BPF injection capability for SMC D. Wythe
2023-02-22 21:40   ` Martin KaFai Lau
2023-03-09 11:49     ` D. Wythe
2023-03-23 20:46       ` Martin KaFai Lau
2023-03-24  4:08         ` D. Wythe
2023-03-24 23:27           ` Martin KaFai Lau
2023-04-03  8:21             ` D. Wythe
2023-02-27  7:58   ` Wenjia Zhang
2023-02-28  8:50     ` D. Wythe
2023-02-28  8:58       ` Wenjia Zhang [this message]
2023-02-21 12:18 ` [PATCH bpf-next v2 2/2] bpf/selftests: add selftest for SMC bpf capability D. Wythe
2023-02-22 22:35   ` Martin KaFai Lau
2023-03-09 11:58     ` D. Wythe

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=fafc5ef1-724f-1831-2d99-ef80a5540faf@linux.ibm.com \
    --to=wenjia@linux.ibm.com \
    --cc=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=jaka@linux.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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