From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net-next v2] net_sched: use idr to allocate u32 filter handles Date: Thu, 28 Sep 2017 09:44:14 -0700 (PDT) Message-ID: <20170928.094414.1459303908421305365.davem@davemloft.net> References: <20170925171351.4956-3-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, chrism@mellanox.com, jhs@mojatatu.com To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:48608 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbdI1QoO (ORCPT ); Thu, 28 Sep 2017 12:44:14 -0400 In-Reply-To: <20170925171351.4956-3-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Mon, 25 Sep 2017 10:13:51 -0700 > Instead of calling u32_lookup_ht() in a loop to find > a unused handle, just switch to idr API to allocate > new handles. u32 filters are special as the handle > could contain a hash table id and a key id, so we > need two IDR to allocate each of them. > > Cc: Chris Mi > Cc: Jamal Hadi Salim > Signed-off-by: Cong Wang Applied.