From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: bpf@vger.kernel.org, Cong Wang <cong.wang@bytedance.com>,
Andrey Ignatov <rdna@fb.com>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Dongdong Wang <wangdongdong.6@bytedance.com>
Subject: [Patch bpf-next v2 3/5] selftests/bpf: update elem_size check in map ptr test
Date: Mon, 14 Dec 2020 12:11:16 -0800 [thread overview]
Message-ID: <20201214201118.148126-4-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <20201214201118.148126-1-xiyou.wangcong@gmail.com>
From: Cong Wang <cong.wang@bytedance.com>
In map ptr test, a hard-coded 64 is used to check hash element size.
Increase it to 72 as we increase the size of struct htab_elem. It
seems struct htab_elem is not visible here.
Cc: Andrey Ignatov <rdna@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Dongdong Wang <wangdongdong.6@bytedance.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
---
tools/testing/selftests/bpf/progs/map_ptr_kern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/progs/map_ptr_kern.c b/tools/testing/selftests/bpf/progs/map_ptr_kern.c
index d8850bc6a9f1..34f9880a1903 100644
--- a/tools/testing/selftests/bpf/progs/map_ptr_kern.c
+++ b/tools/testing/selftests/bpf/progs/map_ptr_kern.c
@@ -111,7 +111,7 @@ static inline int check_hash(void)
VERIFY(check_default_noinline(&hash->map, map));
VERIFY(hash->n_buckets == MAX_ENTRIES);
- VERIFY(hash->elem_size == 64);
+ VERIFY(hash->elem_size == 72);
VERIFY(hash->count.counter == 0);
for (i = 0; i < HALF_ENTRIES; ++i) {
--
2.25.1
next prev parent reply other threads:[~2020-12-14 20:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 20:11 [Patch bpf-next v2 0/5] bpf: introduce timeout map Cong Wang
2020-12-14 20:11 ` [Patch bpf-next v2 1/5] bpf: use index instead of hash for map_locked[] Cong Wang
2020-12-14 20:11 ` [Patch bpf-next v2 2/5] bpf: introduce timeout map Cong Wang
2020-12-15 19:27 ` Andrii Nakryiko
2020-12-15 20:06 ` Cong Wang
2020-12-15 22:03 ` Andrii Nakryiko
2020-12-15 23:23 ` Daniel Borkmann
2020-12-16 0:22 ` Cong Wang
2020-12-16 1:14 ` Alexei Starovoitov
2020-12-16 2:10 ` Cong Wang
2020-12-16 2:35 ` Alexei Starovoitov
2020-12-16 10:38 ` David Laight
2020-12-17 5:06 ` Cong Wang
2020-12-17 22:39 ` Daniel Borkmann
2020-12-16 0:15 ` Cong Wang
2020-12-16 18:35 ` Andrii Nakryiko
2020-12-17 6:29 ` Cong Wang
2020-12-17 21:14 ` Cong Wang
2020-12-18 19:14 ` Andrii Nakryiko
2020-12-18 19:13 ` Andrii Nakryiko
2020-12-14 20:11 ` Cong Wang [this message]
2020-12-14 20:40 ` [Patch bpf-next v2 3/5] selftests/bpf: update elem_size check in map ptr test Andrey Ignatov
2020-12-14 20:11 ` [Patch bpf-next v2 4/5] selftests/bpf: add a test case for bpf timeout map Cong Wang
2020-12-14 20:11 ` [Patch bpf-next v2 5/5] selftests/bpf: add timeout map check in map_ptr tests Cong Wang
2020-12-14 20:41 ` Andrey Ignatov
2020-12-15 19:28 ` [Patch bpf-next v2 0/5] bpf: introduce timeout map Andrii Nakryiko
2020-12-15 20:12 ` Cong Wang
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=20201214201118.148126-4-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=rdna@fb.com \
--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).