From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] net: sched: refactor flower walk to iterate over idr Date: Fri, 13 Jul 2018 18:24:39 -0700 (PDT) Message-ID: <20180713.182439.193766005610062658.davem@davemloft.net> References: <1531132151-2321-1-git-send-email-vladbu@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us To: vladbu@mellanox.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:40024 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729771AbeGNBlq (ORCPT ); Fri, 13 Jul 2018 21:41:46 -0400 In-Reply-To: <1531132151-2321-1-git-send-email-vladbu@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Vlad Buslov Date: Mon, 9 Jul 2018 13:29:11 +0300 > Extend struct tcf_walker with additional 'cookie' field. It is intended to > be used by classifier walk implementations to continue iteration directly > from particular filter, instead of iterating 'skip' number of times. > > Change flower walk implementation to save filter handle in 'cookie'. Each > time flower walk is called, it looks up filter with saved handle directly > with idr, instead of iterating over filter linked list 'skip' number of > times. This change improves complexity of dumping flower classifier from > quadratic to linearithmic. (assuming idr lookup has logarithmic complexity) > > Reviewed-by: Jiri Pirko > Signed-off-by: Vlad Buslov Applied, thank you.