From: Herbert Xu Subject: Re: [PATCH v2 net-next 2/5] rhashtable: Add rhastable_walk_peek Date: Mon, 11 Dec 2017 23:02:36 +1100 Message-ID: <20171211120236.GO12014@gondor.apana.org.au> References: <20171204183145.3277-1-tom@quantonium.net> <20171204183145.3277-3-tom@quantonium.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, netdev@vger.kernel.org, rohit@quantonium.net To: Tom Herbert Return-path: Received: from [128.1.224.119] ([128.1.224.119]:44024 "EHLO ringil.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752449AbdLKMCk (ORCPT ); Mon, 11 Dec 2017 07:02:40 -0500 Content-Disposition: inline In-Reply-To: <20171204183145.3277-3-tom@quantonium.net> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Dec 04, 2017 at 10:31:42AM -0800, Tom Herbert wrote: > This function is like rhashtable_walk_next except that it only returns > the current element in the inter and does not advance the iter. > > This patch also creates __rhashtable_walk_find_next. It finds the next > element in the table when the entry cached in iter is NULL or at the end > of a slot. __rhashtable_walk_find_next is called from > rhashtable_walk_next and rhastable_walk_peek. > > end_of_table is an added field to the iter structure. This indicates > that the end of table was reached (walker.tbl being NULL is not a > sufficient condition for end of table). > > Signed-off-by: Tom Herbert Acked-by: Herbert Xu -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt