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 2CCACA0573; Thu, 5 Mar 2020 03:01:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC09F1BFAB; Thu, 5 Mar 2020 03:01:56 +0100 (CET) Received: from huawei.com (szxga03-in.huawei.com [45.249.212.189]) by dpdk.org (Postfix) with ESMTP id 3BE1A3B5; Thu, 5 Mar 2020 03:01:27 +0100 (CET) Received: from DGGEML404-HUB.china.huawei.com (unknown [172.30.72.53]) by Forcepoint Email with ESMTP id 3A96261E624048E750AB; Thu, 5 Mar 2020 10:01:24 +0800 (CST) Received: from DGGEML421-HUB.china.huawei.com (10.1.199.38) by DGGEML404-HUB.china.huawei.com (10.3.17.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 5 Mar 2020 10:01:23 +0800 Received: from DGGEML529-MBX.china.huawei.com ([169.254.6.178]) by dggeml421-hub.china.huawei.com ([10.1.199.38]) with mapi id 14.03.0439.000; Thu, 5 Mar 2020 10:01:19 +0800 From: "Lilijun (Jerry)" To: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: Question about rte_hash ext flags on mulitithread read/write Thread-Index: AdXykd+rlyhXzVH8RbSBnlaf/BDuxA== Date: Thu, 5 Mar 2020 02:01:18 +0000 Message-ID: <40280F65B1B0B44E8089ED31C01616EBA48C5236@dggeml529-mbx.china.huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.133.202.165] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: [dpdk-dev] Question about rte_hash ext flags on mulitithread read/write 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" Hi All, There is some description about RTE hash's multi-thread support in Program= mer's Guide. After reading that I still have some questions as follows: 1) There is a sentence " In all modes of operation lookups are thread-= safe meaning lookups can be called from multiple threads concurrently.".=20 But if the extra_flag is only set RTE_HASH_EXTRA_FLAGS_EXT_TABLE, R= TE hash will use a link list to store extend buckets due to excessive hash = collisions. So how can we make sure the link list accesses are safe with readin= g/writing concurrently? 2) Can we support multithread writing with RTE_HASH_EXTRA_FLAGS_RW_CON= CURRENCY_LF being set? Do we need add RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_AD= D flag? Any reply will be appreciated very much. Thanks. Jerry