netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Lorenz Bauer <lmb@cloudflare.com>
Cc: Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	duanxiongchun@bytedance.com,
	Dongdong Wang <wangdongdong.6@bytedance.com>,
	Jiang Wang <jiang.wang@bytedance.com>,
	Cong Wang <cong.wang@bytedance.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	Jakub Sitnicki <jakub@cloudflare.com>
Subject: Re: [Patch bpf-next v7 4/9] skmsg: move sk_redir from TCP_SKB_CB to skb
Date: Mon, 1 Mar 2021 10:24:12 -0800	[thread overview]
Message-ID: <CAM_iQpUCsoXLJ_8BFywJQXmEAXA-Kmes0x7vCN2hnxtoiVaDoQ@mail.gmail.com> (raw)
In-Reply-To: <CACAyw9-L9b+muEm2uFkBi-yRNY1enFGN7zLVvF7kOH2bjSb5+g@mail.gmail.com>

On Mon, Mar 1, 2021 at 7:24 AM Lorenz Bauer <lmb@cloudflare.com> wrote:
>
> On Tue, 23 Feb 2021 at 18:49, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> >
> > From: Cong Wang <cong.wang@bytedance.com>
> >
> > Currently TCP_SKB_CB() is hard-coded in skmsg code, it certainly
> > does not work for any other non-TCP protocols. We can move them to
> > skb ext, but it introduces a memory allocation on fast path.
> >
> > Fortunately, we only need to a word-size to store all the information,
> > because the flags actually only contains 1 bit so can be just packed
> > into the lowest bit of the "pointer", which is stored as unsigned
> > long.
> >
> > Inside struct sk_buff, '_skb_refdst' can be reused because skb dst is
> > no longer needed after ->sk_data_ready() so we can just drop it.
>
> Hi Cong Wang,
>
> I saw this on patchwork:
>
> include/linux/skbuff.h:932: warning: Function parameter or member
> '_sk_redir' not described in 'sk_buff'
> New warnings added
> 0a1
> > include/linux/skbuff.h:932: warning: Function parameter or member '_sk_redir' not described in 'sk_buff'
> Per-file breakdown

Ah, I didn't know the function doc is mandatory now.

>
> Source: https://patchwork.kernel.org/project/netdevbpf/patch/20210223184934.6054-5-xiyou.wangcong@gmail.com/
>
> Maybe something to follow up on, I'm not sure what the conventions are here.

It is already merged, so we definitely need a one-line followup fix.

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index bd84f799c952..0503c917d773 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -656,6 +656,7 @@ typedef unsigned char *sk_buff_data_t;
  *     @protocol: Packet protocol from driver
  *     @destructor: Destruct function
  *     @tcp_tsorted_anchor: list structure for TCP (tp->tsorted_sent_queue)
+ *     @_sk_redir: socket redirection information for skmsg
  *     @_nfct: Associated connection, if any (with nfctinfo bits)
  *     @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
  *     @skb_iif: ifindex of device we arrived on

Thanks.

  reply	other threads:[~2021-03-01 18:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 18:49 [Patch bpf-next v7 0/9] sock_map: clean up and refactor code for BPF_SK_SKB_VERDICT Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 1/9] bpf: clean up sockmap related Kconfigs Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 2/9] skmsg: get rid of struct sk_psock_parser Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 3/9] bpf: compute data_end dynamically with JIT code Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 4/9] skmsg: move sk_redir from TCP_SKB_CB to skb Cong Wang
2021-03-01 15:23   ` Lorenz Bauer
2021-03-01 18:24     ` Cong Wang [this message]
2021-02-23 18:49 ` [Patch bpf-next v7 5/9] sock_map: rename skb_parser and skb_verdict Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 6/9] sock_map: make sock_map_prog_update() static Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 7/9] skmsg: make __sk_psock_purge_ingress_msg() static Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 8/9] skmsg: get rid of sk_psock_bpf_run() Cong Wang
2021-02-23 18:49 ` [Patch bpf-next v7 9/9] skmsg: remove unused sk_psock_stop() declaration Cong Wang
2021-02-24  8:08   ` Jakub Sitnicki
2021-02-26 20:35 ` [Patch bpf-next v7 0/9] sock_map: clean up and refactor code for BPF_SK_SKB_VERDICT 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=CAM_iQpUCsoXLJ_8BFywJQXmEAXA-Kmes0x7vCN2hnxtoiVaDoQ@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=duanxiongchun@bytedance.com \
    --cc=jakub@cloudflare.com \
    --cc=jiang.wang@bytedance.com \
    --cc=john.fastabend@gmail.com \
    --cc=lmb@cloudflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=wangdongdong.6@bytedance.com \
    /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).