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 DFB0CA00C4; Thu, 4 Jun 2020 19:58:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D9AB1D5D8; Thu, 4 Jun 2020 19:58:28 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id EF3CF1D5CE for ; Thu, 4 Jun 2020 19:58:26 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id o8so3809624pgm.7 for ; Thu, 04 Jun 2020 10:58:26 -0700 (PDT) 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=9sK9b3WffSz+jNiO3ghiOMhcvDig+hH+g24l/vSifeY=; b=Fj/lNU/6oA2LmuV8LHdB3JAVIN9iN6XGeKHInuKtj6gbmawnycWpoNQDgfzq5YjUfX rx624NIq17Hv8Vf9XfF1wlm0eCavWzsglcICiIPPHL41ai/A7QWIP88OiiK7HHAB14Tb 32+Yj7v1mpS/v3ByfL1VRx3maeE+QsLH7jFBal0aIJikI473z13b7hvHhI6fg+mqyWDP yzBFtCu7dNTSnOJrGHRemSFz70Va2nsHtceWsqoMuAyx66FvpjY3CElhIwbBqjLMrWJG wb7i44RND3Q+DHK6xzFX0FMdGjd+TJudAp+Dr1gd3tXTKDUe0cMS1CQPKLDV+q3QW64R jDbQ== 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=9sK9b3WffSz+jNiO3ghiOMhcvDig+hH+g24l/vSifeY=; b=U3iK4iWaA+MFGFjDnhZKMmUM4GFPi91X3o67Mqf89XEYLzSeGMHoqkozc5+H8y/I8s 8QNOyR88DNs2C52Nf9BzztYRa0MoQVvIA2SXsQGaCnoN+Y44eMomzVEEcPPIMKLJ51Xo kvgR9NQ4W9xHGe0rYnE/QTnFcQy9HK7kGjg0mtY+wdQW5lgqAY1RRRoNRTIWNqaqDqPg 17Om0YcOW2qh0zmiqjg/d+9nxoNbBkET2H9qghMJixYlJ1tw+NJejhNVqgIKWly64s0b W6RgB7RglYwkSzpw9Vi3mbsoQhDeBLXWLuF8+SNuv36eJNo8MfazRysX5WTJGI86vsI6 ZpPw== X-Gm-Message-State: AOAM530QYEMK0FZ1psNjEiPqMwuaZz7k6sSp2+xfm3STM1hks4+vg0K9 0xgnDWixoURO/WJKuSu6kXaBAQ== X-Google-Smtp-Source: ABdhPJzhvEzBr530WLAHRi9gCjZvDtOkgapJPXLXPlTBigKyWswugAqG1mfCWxlg96yzKBYeV+1auQ== X-Received: by 2002:a62:7706:: with SMTP id s6mr5494892pfc.285.1591293505707; Thu, 04 Jun 2020 10:58:25 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w10sm4629733pgm.70.2020.06.04.10.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 10:58:25 -0700 (PDT) Date: Thu, 4 Jun 2020 10:58:17 -0700 From: Stephen Hemminger To: Honnappa Nagarahalli Cc: Yipeng Wang , Sameh Gobriel , Bruce Richardson , "dev@dpdk.org" , "pablo.de.lara.guarch@intel.com" , nd Message-ID: <20200604105817.1a3a2749@hermes.lan> In-Reply-To: References: <20200604171731.6738-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] hash: document breakage with multi-writer thread 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 Thu, 4 Jun 2020 17:51:43 +0000 Honnappa Nagarahalli wrote: > > > > Subject: [PATCH] hash: document breakage with multi-writer thread > > > > The code in rte_cuckoo_hash multi-writer support is broken if write > > operations are called from a non-EAL thread. > > > > rte_lcore_id() wil return LCORE_ID_ANY (UINT32_MAX) for non EAL thread > > and that leads to using wrong local cache. > > > > Add error checks and document the restriction. > Having multiple non-EAL writer threads is a valid use case. Should we fix the issue instead? Discovered this the hard way... Fixing is non-trivial. Basically, the local cache has to be take out and that leads to having to do real locking or atomic operations.