netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Jakub Sitnicki <jakub@cloudflare.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Cong Wang <cong.wang@bytedance.com>,
	Eric Dumazet <edumazet@google.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [Patch bpf-next v1 1/4] tcp: introduce tcp_read_skb()
Date: Sat, 30 Apr 2022 10:18:42 -0700	[thread overview]
Message-ID: <CAM_iQpWNVasAA0s1tgCSgLF2+Yhr3gMV5C0WM_FsoQBPnoOvbQ@mail.gmail.com> (raw)
In-Reply-To: <87czh46we9.fsf@cloudflare.com>

On Tue, Apr 26, 2022 at 2:12 AM Jakub Sitnicki <jakub@cloudflare.com> wrote:
>
> On Sun, Apr 10, 2022 at 09:10 AM -07, Cong Wang wrote:
> > From: Cong Wang <cong.wang@bytedance.com>
> >
> > This patch inroduces tcp_read_skb() based on tcp_read_sock(),
> > a preparation for the next patch which actually introduces
> > a new sock ops.
> >
> > TCP is special here, because it has tcp_read_sock() which is
> > mainly used by splice(). tcp_read_sock() supports partial read
> > and arbitrary offset, neither of them is needed for sockmap.
> >
> > Cc: Eric Dumazet <edumazet@google.com>
> > Cc: John Fastabend <john.fastabend@gmail.com>
> > Cc: Daniel Borkmann <daniel@iogearbox.net>
> > Cc: Jakub Sitnicki <jakub@cloudflare.com>
> > Signed-off-by: Cong Wang <cong.wang@bytedance.com>
> > ---
> >  include/net/tcp.h |  2 ++
> >  net/ipv4/tcp.c    | 72 +++++++++++++++++++++++++++++++++++++++++------
> >  2 files changed, 66 insertions(+), 8 deletions(-)
> >
> > diff --git a/include/net/tcp.h b/include/net/tcp.h
> > index 6d50a662bf89..f0d4ce6855e1 100644
> > --- a/include/net/tcp.h
> > +++ b/include/net/tcp.h
> > @@ -667,6 +667,8 @@ void tcp_get_info(struct sock *, struct tcp_info *);
> >  /* Read 'sendfile()'-style from a TCP socket */
> >  int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
> >                 sk_read_actor_t recv_actor);
> > +int tcp_read_skb(struct sock *sk, read_descriptor_t *desc,
> > +              sk_read_actor_t recv_actor);
>
> Do you think it would be worth adding docs for the newly added function?
> Why it exists and how is it different from the tcp_read_sock which has
> the same interface?

Yeah, I will add some comments to explain this in V2.

Thanks.

  reply	other threads:[~2022-04-30 17:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-10 16:10 [Patch bpf-next v1 0/4] sockmap: some performance optimizations Cong Wang
2022-04-10 16:10 ` [Patch bpf-next v1 1/4] tcp: introduce tcp_read_skb() Cong Wang
2022-04-12 20:00   ` John Fastabend
2022-04-21 19:00     ` Cong Wang
2022-04-26  6:27       ` John Fastabend
2022-04-30 17:17         ` Cong Wang
2022-04-25 19:07   ` Jakub Kicinski
2022-04-30 17:22     ` Cong Wang
2022-05-02 16:13       ` Jakub Kicinski
2022-04-26  9:11   ` Jakub Sitnicki
2022-04-30 17:18     ` Cong Wang [this message]
2022-04-10 16:10 ` [Patch bpf-next v1 2/4] net: introduce a new proto_ops ->read_skb() Cong Wang
2022-04-10 16:10 ` [Patch bpf-next v1 3/4] skmsg: get rid of skb_clone() Cong Wang
2022-04-10 16:10 ` [Patch bpf-next v1 4/4] skmsg: get rid of unncessary memset() Cong Wang
2022-04-26  9:27 ` [Patch bpf-next v1 0/4] sockmap: some performance optimizations Jakub Sitnicki
2022-04-30 17:27   ` Cong Wang

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=CAM_iQpWNVasAA0s1tgCSgLF2+Yhr3gMV5C0WM_FsoQBPnoOvbQ@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=jakub@cloudflare.com \
    --cc=john.fastabend@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).