bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "liujian (CE)" <liujian56@huawei.com>
To: John Fastabend <john.fastabend@gmail.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"jakub@cloudflare.com" <jakub@cloudflare.com>,
	"lmb@cloudflare.com" <lmb@cloudflare.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"ast@kernel.org" <ast@kernel.org>,
	"andrii@kernel.org" <andrii@kernel.org>,
	"kafai@fb.com" <kafai@fb.com>,
	"songliubraving@fb.com" <songliubraving@fb.com>,
	"yhs@fb.com" <yhs@fb.com>,
	"kpsingh@kernel.org" <kpsingh@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>
Subject: RE: [PATCH v4] skmsg: lose offset info in sk_psock_skb_ingress
Date: Mon, 4 Oct 2021 04:27:34 +0000	[thread overview]
Message-ID: <af7c8e8776f844f085f6dc70e9b022fd@huawei.com> (raw)
In-Reply-To: <61563ebaf2fe0_6c4e420813@john-XPS-13-9370.notmuch>



> -----Original Message-----
> From: John Fastabend [mailto:john.fastabend@gmail.com]
> Sent: Friday, October 1, 2021 6:48 AM
> To: liujian (CE) <liujian56@huawei.com>; john.fastabend@gmail.com;
> daniel@iogearbox.net; jakub@cloudflare.com; lmb@cloudflare.com;
> davem@davemloft.net; kuba@kernel.org; ast@kernel.org;
> andrii@kernel.org; kafai@fb.com; songliubraving@fb.com; yhs@fb.com;
> kpsingh@kernel.org; netdev@vger.kernel.org; bpf@vger.kernel.org;
> xiyou.wangcong@gmail.com
> Cc: liujian (CE) <liujian56@huawei.com>
> Subject: RE: [PATCH v4] skmsg: lose offset info in sk_psock_skb_ingress
>
> Liu Jian wrote:
> > If sockmap enable strparser, there are lose offset info in
> > sk_psock_skb_ingress. If the length determined by parse_msg function
> > is not skb->len, the skb will be converted to sk_msg multiple times,
> > and userspace app will get the data multiple times.
> >
> > Fix this by get the offset and length from strp_msg.
> > And as Cong suggestion, add one bit in skb->_sk_redir to distinguish
> > enable or disable strparser.
> >
> > Signed-off-by: Liu Jian <liujian56@huawei.com>
> > ---
>
> Thanks. Please add Fixes tags so we can track these I've added it here.
>
> This has been broken from the initial patches and after a quick glance I
> suspect this will need manual backports if we need it. Also all the I use and all
> the selftests set parser to a nop by returning skb->len.
>
> Can you also create a test so we can ensure we don't break this again?
Okay, I will do this after the holiday.
>
> Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface")
> Acked-by: John Fastabend <john.fastabend@gmail.com>
Thank you for reviewing this patch again.

  reply	other threads:[~2021-10-04  4:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  2:06 [PATCH v4] skmsg: lose offset info in sk_psock_skb_ingress Liu Jian
2021-09-29  5:19 ` Cong Wang
2021-09-30 22:48 ` John Fastabend
2021-10-04  4:27   ` liujian (CE) [this message]
2021-10-12  2:36   ` liujian (CE)
2021-10-12  5:27     ` John Fastabend

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=af7c8e8776f844f085f6dc70e9b022fd@huawei.com \
    --to=liujian56@huawei.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jakub@cloudflare.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lmb@cloudflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yhs@fb.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).