From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A500AA04A2; Tue, 5 Nov 2019 18:21:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3733A1BE0C; Tue, 5 Nov 2019 18:21:06 +0100 (CET) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 792645B32 for ; Tue, 5 Nov 2019 18:21:04 +0100 (CET) Received: by mail-pl1-f193.google.com with SMTP id w8so9781253plq.5 for ; Tue, 05 Nov 2019 09:21:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XQXiOiyt0pZ+17upSO9VcIgVl+ASysLz3rUrAWHtVvs=; b=v/GQDTutHvoMpzZXRsWtronYZn+vRIfpB13GeFjmjfvyHOi/LiblTS6xBVi3Yy0OaZ EOCNaptvNkGTCmUfgDzg8O8bfnM7a+CX6RcJBnKdRgSRSybhzF+zPIiRJU7JEWV6gz1h wZ9Rk8IP938+lsT+2UUL9lct69EIVTw9kBJrJX3nWjlhJMIuHtemAS35eKd73e1nB3CP UK8J7B0GIqckpQwfETtpnyBY02xC7yAbCwC8cGoN1DrWTjyzJF3m9IUoK0sZJ3+W9XRL tiWNTqThS1EkUXGAbIOQwdndHkUs8vY6lUhj9I7pJOCqCIH0vT0F3yEt55nXAK1az/rH wrYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XQXiOiyt0pZ+17upSO9VcIgVl+ASysLz3rUrAWHtVvs=; b=YclU4fY77aNSqAddgl9l/X7H0NLnz6WpvShzzOczRGlGL01rCEMSNBN5qbROeRELEw CXfmt/06sWnSmUJUNbxh0qs7uQjdWUqRP5UaSIGlCwrBQ4RLE0Z7OHpCptrHjpdx4a+a A7qJQtPe9aD9Awo3QDkjZhvR713IAyIc/QDXQS90bKqGJI5dDJKVWTEXiGExCf+Se+ZX sG48cHpHaL34ngtjiYwMvRgxC9Sv8KuVnVIsGyV1OlKgjleFIfuXWPUBj7zCUzsUGaUl UsOs8KHViC/P4I09i3NJXYIFs9AjoIrB2vrCMp1Nq2Pj8T2lv5Bn062kwBEaXblyiwOY RSYA== X-Gm-Message-State: APjAAAVK3+aQWl6UtIaesj7PO+OEaJDZQY+s8/nbsdWH7HMSpfltrEyP qQ+ILd0I2+XfNoC8+nIjHLIBLrxFA0Yzjg== X-Google-Smtp-Source: APXvYqyvjf5SoaT8RqWgBa+oWgTk5v/eE8dHLUX+ZSA/3giUc8PuwZC/LssvRouahwP4vLXcEIhYJQ== X-Received: by 2002:a17:902:59d9:: with SMTP id d25mr33155761plj.250.1572974463407; Tue, 05 Nov 2019 09:21:03 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d25sm27812064pfq.70.2019.11.05.09.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2019 09:21:03 -0800 (PST) Date: Tue, 5 Nov 2019 09:20:59 -0800 From: Stephen Hemminger To: Bing Zhao Cc: orika@mellanox.com, viacheslavo@mellanox.com, rasland@mellanox.com, dev@dpdk.org Message-ID: <20191105092059.25770f57@hermes.lan> In-Reply-To: <1572967680-93338-1-git-send-email-bingz@mellanox.com> References: <1572967680-93338-1-git-send-email-bingz@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/mlx5: introduce mlx5 hash list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 5 Nov 2019 17:28:00 +0200 Bing Zhao wrote: > Introduce simple hash list to the mlx5 utilities. User can define > its own data structure containing the mlx5_hlist_entry and create > the hash list table via the creation interface. Then the entry will > be inserted into the table and linked to the corresponding list > head. User should guarantee there is no collision of the key and > provide a callback function to handle all the remaining entries in > the table when destroying the hash list. User should define a proper > number of the list heads in the table in order to get a better > performance. The LSB of the 'key' is used to calculate the index of > the head in the list heads array. > This implementation is not multi-threads safe right now. > > Signed-off-by: Bing Zhao There is already a plethora of hash routines in DPDK, why introduce a chained hash list like Linux kernel?