netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Chris Mi <chrism@mellanox.com>
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: Fri, 23 Feb 2018 18:46:41 -0800	[thread overview]
Message-ID: <20180224024641.GB15231@bombadil.infradead.org> (raw)
In-Reply-To: <VI1PR0501MB2143077CA6E5A728B8F581BAABC30@VI1PR0501MB2143.eurprd05.prod.outlook.com>

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);
 }
 
 /*

  reply	other threads:[~2018-02-24  2:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7995f335-ccac-bfdc-bb37-46d0f887c647@oracle.com>
2018-02-23 19:00 ` Kernel panic with 4.16-rc1 (and 4.16-rc2) running selftest 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 [this message]
2018-02-26  9:59                 ` Chris Mi
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=20180224024641.GB15231@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=chrism@mellanox.com \
    --cc=khalid.aziz@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).