From: Geliang Tang <geliang@kernel.org>
To: Yonghong Song <yonghong.song@linux.dev>,
Gang Yan <gang_yan@foxmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, mptcp@lists.linux.dev
Subject: Re: [PATCH bpf-next] bpf: Allow error injection for update_socket_protocol
Date: Wed, 09 Apr 2025 17:17:43 +0800 [thread overview]
Message-ID: <1cc54fa0f517f387563263bb90ef1628244778df.camel@kernel.org> (raw)
In-Reply-To: <dee07a8c-aed2-4125-a4f0-1bd76ca1e4ac@linux.dev>
Hi Yonghong,
On Sun, 2024-08-25 at 21:05 -0700, Yonghong Song wrote:
>
> On 8/25/24 8:29 PM, Gang Yan wrote:
> > Hi Alexei:
> > It's my honor to recieve your reply. The response to your concerns
> > is attached below
> > for your review.
> > On Mon, Aug 26, 2024 at 10:57:12AM +0800, Gang Yan wrote:
> > > On Thu, Aug 22, 2024 at 8:33 AM Jakub Kicinski wrote:
> > > > On Thu, 22 Aug 2024 14:08:57 +0800 Gang Yan wrote:
> > > > > diff --git a/net/socket.c b/net/socket.c
> > > > > index fcbdd5bc47ac..63ce1caf75eb 100644
> > > > > --- a/net/socket.c
> > > > > +++ b/net/socket.c
> > > > > @@ -1695,6 +1695,7 @@ __weak noinline int
> > > > > update_socket_protocol(int family, int type, int protocol)
> > > > > {
> > > > > return protocol;
> > > > > }
> > > > > +ALLOW_ERROR_INJECTION(update_socket_protocol, ERRNO);
> > > > IDK if this falls under BPF or directly net, but could you
> > > > explain
> > > > what test will use this? I'd prefer not to add test hooks into
> > > > the
> > > > kernel unless they are exercised by in-tree tests.
> > > This looks unnecessary.
> > > update_socket_protocol is already registered as fmodret.
> > > There is even selftest that excises this feature:
> > > tools/testing/selftests/bpf/progs/mptcpify.c
> > >
> > > It doesn't need to be part of the error-inject.
> > The 'update_socket_protocol' is a BPF interface designed primarily
> > to
> > fix the socket protocol from TCP protocol to MPTCP protocol without
> > requiring modifications to user-space application codes. However,
> > when attempting to achieve this using the BCC tool in user-space,
> > the BCC tool doesn't support 'fmod_ret'. Therefore, this patch aims
> > to
> > further expand capabilities, enabling the 'kprobe' method can
> > overriding
> > the update_socket_protocol interface.
>
> Gang Yan, could you explore to add fmod_ret support in bcc? It should
> be
> similar to kfunc/kretfunc support. I am happy to review your patches.
It took us some time to add this support in bcc, and we have recently
completed it in [1]. We would be grateful if you could help review
these patches.
Thanks,
-Geliang
[1]
https://github.com/iovisor/bcc/pull/5274
>
> Thanks,
> Yonghong
>
> >
> > As a Python developer, the BCC tool is a commonly utilized
> > instrument for
> > interacting with the kernel. If the kernel could permit the use of
> > an
> > error-inject method to modify the `update_socket_protocol`, it
> > would significantly
> > benefit the subsequent promotion and development of MPTCP
> > applications.
> > Thank you for considering this enhancement.
> >
> > Best wishes!
> > Gang Yan
> >
> >
>
next prev parent reply other threads:[~2025-04-09 9:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tmcxv429u9-tmgrokbfbm@nsmail7.0.0--kylin--1>
2024-08-26 3:29 ` Re: [PATCH bpf-next] bpf: Allow error injection for update_socket_protocol Gang Yan
2024-08-26 4:05 ` Yonghong Song
2025-04-09 9:17 ` Geliang Tang [this message]
2025-04-11 18:06 ` Yonghong Song
2024-08-22 6:08 Gang Yan
2024-08-22 15:29 ` Jakub Kicinski
2024-08-22 18:43 ` Alexei Starovoitov
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=1cc54fa0f517f387563263bb90ef1628244778df.camel@kernel.org \
--to=geliang@kernel.org \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=gang_yan@foxmail.com \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=yonghong.song@linux.dev \
/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