[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250126033619.3167023-1-zhangmingyi5@huawei.com>
Date: Sun, 26 Jan 2025 11:36:19 +0800
From: zhangmingyi <zhangmingyi5@...wei.com>
To: <daniel@...earbox.net>
CC: <ast@...nel.org>, <andrii@...nel.org>, <martin.lau@...ux.dev>,
<song@...nel.org>, <yhs@...com>, <john.fastabend@...il.com>,
<kpsingh@...nel.org>, <sdf@...gle.com>, <haoluo@...gle.com>,
<jolsa@...nel.org>, <bpf@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<yanan@...wei.com>, <wuchangye@...wei.com>, <xiesongyang@...wei.com>,
<liuxin350@...wei.com>, <liwei883@...wei.com>, <tianmuyang@...wei.com>,
<zhangmingyi5@...wei.com>
Subject: Re: [PATCH] ipv4, bpf: Introduced to support the ULP to modify sockets during setopt
We want to call `bpf_setsockopt` to replace the kernel module in the TCP_ULP case. The purpose is to customize the behavior in `connect` and `sendmsg`. We have an open-source community project kmesh (kmesh.net). Based on this, we refer to some processes of TCP Fast Open to implement delayed connect and perform HTTP DNAT when `sendmsg`.
I'll send a patch with a full description and test cases later.
> > Signed-off-by: zhangmingyi <zhangmingyi5@...wei.com>
> > ---
> > net/core/filter.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/net/core/filter.c b/net/core/filter.c
> > index 713d6f454df3..f23d3f87e690 100644
> > --- a/net/core/filter.c
> > +++ b/net/core/filter.c
> > @@ -5383,6 +5383,10 @@ static int sol_tcp_sockopt(struct sock *sk, int optname,
> > if (*optlen < 1)
> > return -EINVAL;
> > break;
> > + case TCP_ULP:
> > + if (getopt)
> > + return -EINVAL;
> > + break;
> > case TCP_BPF_SOCK_OPS_CB_FLAGS:
> > if (*optlen != sizeof(int))
> > return -EINVAL;
>
Powered by blists - more mailing lists