From: John Fastabend <john.fastabend@gmail.com>
To: zijianzhang@bytedance.com, bpf@vger.kernel.org
Cc: martin.lau@linux.dev, daniel@iogearbox.net,
john.fastabend@gmail.com, ast@kernel.org, andrii@kernel.org,
eddyz87@gmail.com, song@kernel.org, yonghong.song@linux.dev,
kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
jolsa@kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, mykolal@fb.com,
shuah@kernel.org, jakub@cloudflare.com, liujian56@huawei.com,
zijianzhang@bytedance.com, cong.wang@bytedance.com
Subject: RE: [PATCH bpf 3/8] selftests/bpf: Fix total_bytes in msg_loop_rx in test_sockmap
Date: Wed, 23 Oct 2024 21:48:17 -0700 [thread overview]
Message-ID: <6719d191d8a9c_1cb220842@john.notmuch> (raw)
In-Reply-To: <20241020110345.1468595-4-zijianzhang@bytedance.com>
zijianzhang@ wrote:
> From: Zijian Zhang <zijianzhang@bytedance.com>
>
> total_bytes in msg_loop_rx should also take push into account, otherwise
> total_bytes will be a smaller value, which makes the msg_loop_rx end early.
>
> Besides, total_bytes has already taken pop, so we don't need to subtract
> some bytes from iov_buf in sendmsg_test. The additional subtraction may
> make total_bytes a negative number, and msg_loop_rx will just end without
> checking anything.
>
> Fixes: 18d4e900a450 ("bpf: Selftests, improve test_sockmap total bytes counter")
> Fixes: d69672147faa ("selftests, bpf: Add one test for sockmap with strparser")
> Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
> ---
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
next prev parent reply other threads:[~2024-10-24 4:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-20 11:03 [PATCH bpf 0/8] Fixes to bpf_msg_push/pop_data and test_sockmap zijianzhang
2024-10-20 11:03 ` [PATCH bpf 1/8] selftests/bpf: Add txmsg_pass to pull/push/pop in test_sockmap zijianzhang
2024-10-24 4:06 ` John Fastabend
2024-10-20 11:03 ` [PATCH bpf 2/8] selftests/bpf: Fix SENDPAGE data logic " zijianzhang
2024-10-24 4:47 ` John Fastabend
2024-10-20 11:03 ` [PATCH bpf 3/8] selftests/bpf: Fix total_bytes in msg_loop_rx " zijianzhang
2024-10-24 4:48 ` John Fastabend [this message]
2024-10-20 11:03 ` [PATCH bpf 4/8] selftests/bpf: Add push/pop checking for msg_verify_data " zijianzhang
2024-10-24 5:20 ` John Fastabend
2024-10-20 11:03 ` [PATCH bpf 5/8] selftests/bpf: Add more tests for test_txmsg_push_pop " zijianzhang
2024-10-25 5:00 ` John Fastabend
2024-10-20 11:03 ` [PATCH bpf 6/8] bpf, sockmap: Several fixes to bpf_msg_push_data zijianzhang
2024-10-20 11:03 ` [PATCH bpf 7/8] bpf, sockmap: Several fixes to bpf_msg_pop_data zijianzhang
2024-10-25 5:20 ` John Fastabend
2024-10-20 11:03 ` [PATCH bpf 8/8] bpf, sockmap: Fix sk_msg_reset_curr zijianzhang
2024-10-26 5:05 ` John Fastabend
2024-10-26 6:17 ` Zijian Zhang
2024-10-24 4:06 ` [PATCH bpf 0/8] Fixes to bpf_msg_push/pop_data and test_sockmap John Fastabend
2024-10-24 14:43 ` Daniel Borkmann
2024-10-24 17:56 ` Zijian Zhang
2024-10-24 18:12 ` Daniel Borkmann
2024-10-24 20:48 ` Zijian Zhang
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=6719d191d8a9c_1cb220842@john.notmuch \
--to=john.fastabend@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=jakub@cloudflare.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=liujian56@huawei.com \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
--cc=zijianzhang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.