From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:43984 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753168AbeCGOAU (ORCPT ); Wed, 7 Mar 2018 09:00:20 -0500 From: Paul Blakey To: Thomas Graf , Herbert Xu , David Miller Cc: netdev@vger.kernel.org, Yevgeny Kliteynik , Roi Dayan , Shahar Klein , Mark Bloch , Jiri Pirko , Or Gerlitz , Matan Barak , Paul Blakey Subject: [PATCH net v4 0/2] rhashtable: Fix rhltable duplicates insertion Date: Wed, 7 Mar 2018 16:00:11 +0200 Message-Id: <1520431213-61553-1-git-send-email-paulb@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: On our mlx5 driver fs_core.c, we use the rhltable interface to store flow groups. We noticed that sometimes we get a warning that flow group isn't found at removal. This rare case was caused when a specific scenario happened, insertion of a flow group with a similar match criteria (a duplicate), but only where the flow group rhash_head was second (or not first) on the relevant rhashtable bucket list. The first patch fixes it, and the second one adds a test that show it is now working. Paul. v4 --> v3 changes: * Added Herbert Xu's ack (thanks) * Removed extra commit tags v3 --> v2 changes: * Added missing fix in rhashtable_lookup_one code path as well. v2 --> v1 changes: * Changed commit messages to better reflect the change Paul Blakey (2): rhashtable: Fix rhlist duplicates insertion test_rhashtable: add test case for rhltable with duplicate objects include/linux/rhashtable.h | 4 +- lib/rhashtable.c | 4 +- lib/test_rhashtable.c | 134 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 2 deletions(-) -- 1.8.4.3