netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pengcheng Yang" <yangpc@wangsu.com>
To: "'Daniel Borkmann'" <daniel@iogearbox.net>,
	"'John Fastabend'" <john.fastabend@gmail.com>,
	"'Jakub Sitnicki'" <jakub@cloudflare.com>,
	"'Eric Dumazet'" <edumazet@google.com>,
	"'Jakub Kicinski'" <kuba@kernel.org>, <bpf@vger.kernel.org>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 0/3] skmsg: Add the data length in skmsg to SIOCINQ ioctl and rx_queue
Date: Thu, 23 Nov 2023 19:20:57 +0800	[thread overview]
Message-ID: <000001da1dff$223ed4e0$66bc7ea0$@wangsu.com> (raw)
In-Reply-To: <6c856222-d103-8149-1cdb-b3e07105f5f8@iogearbox.net>

Daniel Borkmann <daniel@iogearbox.net> wrote:
> On 11/21/23 12:22 PM, Pengcheng Yang wrote:
> > When using skmsg redirect, the msg is queued in psock->ingress_msg,
> > and the application calling SIOCINQ ioctl will return a readable
> > length of 0, and we cannot track the data length of ingress_msg with
> > the ss tool.
> >
> > In this patch set, we added the data length in ingress_msg to the
> > SIOCINQ ioctl and the rx_queue of tcp_diag.
> >
> > v2:
> > - Add READ_ONCE()/WRITE_ONCE() on accesses to psock->msg_len
> > - Mask out the increment msg_len where its not needed
> 
> Please double check BPF CI, this series might be breaking sockmap selftests :
> 
> https://github.com/kernel-patches/bpf/actions/runs/6922624338/job/18829650043
> 

Is this a misunderstanding?
The selftests failure above were run on patch set v1 4 days ago, and this patch v2
is the fix for this case.

> [...]
> Notice: Success: 501/13458, Skipped: 57, Failed: 1
> Error: #281 sockmap_basic
> Error: #281/16 sockmap_basic/sockmap skb_verdict fionread
>    Error: #281/16 sockmap_basic/sockmap skb_verdict fionread
>    test_sockmap_skb_verdict_fionread:PASS:open_and_load 0 nsec
>    test_sockmap_skb_verdict_fionread:PASS:bpf_prog_attach 0 nsec
>    test_sockmap_skb_verdict_fionread:PASS:socket_loopback(s) 0 nsec
>    test_sockmap_skb_verdict_fionread:PASS:create_socket_pairs(s) 0 nsec
>    test_sockmap_skb_verdict_fionread:PASS:bpf_map_update_elem(c1) 0 nsec
>    test_sockmap_skb_verdict_fionread:PASS:xsend(p0) 0 nsec
>    test_sockmap_skb_verdict_fionread:PASS:ioctl(FIONREAD) error 0 nsec
>    test_sockmap_skb_verdict_fionread:FAIL:ioctl(FIONREAD) unexpected ioctl(FIONREAD): actual 512 != expected 256
>    test_sockmap_skb_verdict_fionread:PASS:recv_timeout(c0) 0 nsec
> Error: #281/18 sockmap_basic/sockmap skb_verdict msg_f_peek
>    Error: #281/18 sockmap_basic/sockmap skb_verdict msg_f_peek
>    test_sockmap_skb_verdict_peek:PASS:open_and_load 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:bpf_prog_attach 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:socket_loopback(s) 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:create_pairs(s) 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:bpf_map_update_elem(c1) 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:xsend(p1) 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:recv(c1) 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:ioctl(FIONREAD) error 0 nsec
>    test_sockmap_skb_verdict_peek:FAIL:after peek ioctl(FIONREAD) unexpected after peek ioctl(FIONREAD): actual 512 != expected 256
>    test_sockmap_skb_verdict_peek:PASS:recv(p0) 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:ioctl(FIONREAD) error 0 nsec
>    test_sockmap_skb_verdict_peek:PASS:after read ioctl(FIONREAD) 0 nsec
> Test Results:
>               bpftool: PASS
>   test_progs-no_alu32: FAIL (returned 1)
>              shutdown: CLEAN
> Error: Process completed with exit code 1.


  reply	other threads:[~2023-11-23 11:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 11:22 [PATCH bpf-next v2 0/3] skmsg: Add the data length in skmsg to SIOCINQ ioctl and rx_queue Pengcheng Yang
2023-11-21 11:22 ` [PATCH bpf-next v2 1/3] skmsg: Support to get the data length in ingress_msg Pengcheng Yang
2023-12-05  0:23   ` John Fastabend
2023-12-08 11:17     ` Pengcheng Yang
2023-11-21 11:22 ` [PATCH bpf-next v2 2/3] tcp: Add the data length in skmsg to SIOCINQ ioctl Pengcheng Yang
2023-11-21 11:22 ` [PATCH bpf-next v2 3/3] tcp_diag: Add the data length in skmsg to rx_queue Pengcheng Yang
2023-11-22 15:16 ` [PATCH bpf-next v2 0/3] skmsg: Add the data length in skmsg to SIOCINQ ioctl and rx_queue Daniel Borkmann
2023-11-23 11:20   ` Pengcheng Yang [this message]
2023-11-23 13:31     ` Daniel Borkmann

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='000001da1dff$223ed4e0$66bc7ea0$@wangsu.com' \
    --to=yangpc@wangsu.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=jakub@cloudflare.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --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).