From: Chris Mi <chrism@mellanox.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
Khalid Aziz <khalid.aziz@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Fwd: Re: Kernel panic with 4.16-rc1 (and 4.16-rc2) running selftest
Date: Mon, 26 Feb 2018 17:59:30 +0800 [thread overview]
Message-ID: <6698697d-e38e-de95-d925-08fb3ee4cce9@mellanox.com> (raw)
In-Reply-To: <20180224024641.GB15231@bombadil.infradead.org>
Hi Matthew,
Sorry for the late response. I'll add the idr test cases for the new
APIs ASAP.
Thanks,
Chris
On 2/24/2018 10:46 AM, Matthew Wilcox wrote:
> On Sat, Feb 24, 2018 at 01:49:35AM +0000, Chris Mi wrote:
>> To verify this patch, the following is a sanity test case:
>>
>> # tc qdisc delete dev $link ingress > /dev/null 2>&1;
>> # tc qdisc add dev $link ingress;
>> # tc filter add dev $link prio 1 protocol ip handle 0x80000001 parent ffff: flower skip_hw src_mac e4:11:0:0:0:2 dst_mac e4:12:0:0:0:2 action drop;
>> # tc filter show dev $link parent ffff:
>>
>> filter pref 1 flower chain 0
>> filter pref 1 flower chain 0 handle 0x80000001
> I added these tests to my local tree for now.
>
> diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c
> index 44ef9eba5a7a..28d99325a32d 100644
> --- a/tools/testing/radix-tree/idr-test.c
> +++ b/tools/testing/radix-tree/idr-test.c
> @@ -178,6 +178,29 @@ void idr_get_next_test(int base)
> idr_destroy(&idr);
> }
>
> +void idr_u32_test(struct idr *idr, int base)
> +{
> + assert(idr_is_empty(idr));
> + idr_init_base(idr, base);
> + u32 handle = 10;
> + idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL);
> + BUG_ON(handle != 10);
> + idr_remove(idr, handle);
> + assert(idr_is_empty(idr));
> +
> + handle = 0x80000001;
> + idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL);
> + BUG_ON(handle != 0x80000001);
> + idr_remove(idr, handle);
> + assert(idr_is_empty(idr));
> +
> + handle = 0xffe00000;
> + idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL);
> + BUG_ON(handle != 0xffe00000);
> + idr_remove(idr, handle);
> + assert(idr_is_empty(idr));
> +}
> +
> void idr_checks(void)
> {
> unsigned long i;
> @@ -248,6 +271,9 @@ void idr_checks(void)
> idr_get_next_test(0);
> idr_get_next_test(1);
> idr_get_next_test(4);
> + idr_u32_test(&idr, 0);
> + idr_u32_test(&idr, 1);
> + idr_u32_test(&idr, 4);
> }
>
> /*
next prev parent reply other threads:[~2018-02-26 10:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 16:05 Khalid Aziz
2018-02-23 19:00 ` Randy Dunlap
2018-02-23 23:27 ` Cong Wang
2018-02-24 0:13 ` Cong Wang
2018-02-24 0:27 ` Randy Dunlap
[not found] ` <CAFhKne9Dyx1uvRz_9rvCq7mewAbLA5T77P21oBQfOR7JzP_1aQ@mail.gmail.com>
2018-02-24 1:15 ` Fwd: " Matthew Wilcox
2018-02-24 1:49 ` Chris Mi
2018-02-24 2:46 ` Matthew Wilcox
2018-02-26 9:59 ` Chris Mi [this message]
2018-02-26 17:05 ` Khalid Aziz
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=6698697d-e38e-de95-d925-08fb3ee4cce9@mellanox.com \
--to=chrism@mellanox.com \
--cc=khalid.aziz@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willy@infradead.org \
--cc=xiyou.wangcong@gmail.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
all inboxes | Powered by JetHome®