bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Liu Jian <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: liujian56@huawei.com
Subject: RE: [PATCH v4] skmsg: lose offset info in sk_psock_skb_ingress
Date: Thu, 30 Sep 2021 15:48:26 -0700	[thread overview]
Message-ID: <61563ebaf2fe0_6c4e420813@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <20210929020642.206454-1-liujian56@huawei.com>

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?

Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface")
Acked-by: John Fastabend <john.fastabend@gmail.com>

  parent reply	other threads:[~2021-09-30 22:48 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 [this message]
2021-10-04  4:27   ` liujian (CE)
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=61563ebaf2fe0_6c4e420813@john-XPS-13-9370.notmuch \
    --to=john.fastabend@gmail.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=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=liujian56@huawei.com \
    --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).