From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F15D42B90; Wed, 24 May 2023 20:31:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB18E40156; Wed, 24 May 2023 20:31:34 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id DAF1E400EF for ; Wed, 24 May 2023 20:31:33 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1ae79528d4dso5136335ad.2 for ; Wed, 24 May 2023 11:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684953093; x=1687545093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=lvASpQaGHIwy1rSQkrtXjCpWCkbSHKkTXmdNxXpmHdg=; b=GuS+Wj40FuUELSUX3saNqKDRj7FrPtJDibI2Q+NMlALBvzRuR99BPKvjtG6PaQeuEz G5/rwLgOuL4Em4H4nfj/XamwRjzPMmhS4rZnk2XqYpiyx8mEgQrYraXpDCmCyFwWhB0W j67KdpUIPRVyOQgjnWG9FrxalZXatA90P3I3FrKvahJFi/pCtY0ZooWVxKAjUxk0mhaE fp2mlyL0Ya68EAP0lDoj9K/hDAGOdKFdNAYsDkzV5NePyD2cGK6YsdoiRG0p7hL5CjcE a6KdX8/mNLd3fQek6YEUEeWntFtg0gLcCiT2ekgtH1TNuZ4ENht/nb1zEWvV8v2O3Ct3 BUfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684953093; x=1687545093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lvASpQaGHIwy1rSQkrtXjCpWCkbSHKkTXmdNxXpmHdg=; b=iwa4UDOQWheFSfIG2yCxENpyvUKlWmIZGVMNQL5IHxS8ILoun74CIpywS0tgUPyF8x cu35afxfsVvYHsPLmKFntAA8rBU381f2ONFhU7m0+Fgm6glb7kRvsq2s1cWW3MhHbBUX fIKPa2CLbAYV29dxBcpyUcm+fekMn+/ICuIe2S5Bme3U/JcZmLVa1+Sgoh2d+2JVRfw2 3PvllVYos1g4O9OkqKnBSUUlGJ/KbsLgzFaR98M40qkYDv7o6lE94hNZkxfXwgf3Rs1c hMRXhaRALITmamLUCWf+siTfjgvK9Vju/h1f/Yn6/kesTDOS/QvserARjmkx0GdOxro4 kVcw== X-Gm-Message-State: AC+VfDwQE0iRxuCWVQ14QiopC7gxviLotu+dgxbIZFsJQwDyg84we1B9 +J87dWcxghCCLSj98nT/JnaIXw== X-Google-Smtp-Source: ACHHUZ7YSXiNQIJJOeXtihAcwjYFlfSwEICicXOjwkmOpo+8f1d5N0iIoKtlydHXrstHSAqsfWsOKA== X-Received: by 2002:a17:902:b48f:b0:1ae:6a3:d058 with SMTP id y15-20020a170902b48f00b001ae06a3d058mr16578892plr.36.1684953093058; Wed, 24 May 2023 11:31:33 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jc1-20020a17090325c100b001a1b66af22fsm9108875plb.62.2023.05.24.11.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 11:31:32 -0700 (PDT) Date: Wed, 24 May 2023 11:31:30 -0700 From: Stephen Hemminger To: Anoob Joseph Cc: Thomas Monjalon , Akhil Goyal , Jerin Jacob , Konstantin Ananyev , Bernard Iremonger , Volodymyr Fialko , Hemant Agrawal , Mattias =?UTF-8?B?UsO2bm5ibG9t?= , Kiran Kumar K , , Olivier Matz Subject: Re: [PATCH v3 21/22] pdcp: add thread safe processing Message-ID: <20230524113130.242a9b81@hermes.local> In-Reply-To: <20230524160116.304-22-anoobj@marvell.com> References: <20230414174512.642-1-anoobj@marvell.com> <20230524160116.304-1-anoobj@marvell.com> <20230524160116.304-22-anoobj@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 24 May 2023 21:31:15 +0530 Anoob Joseph wrote: > From: Volodymyr Fialko > > PDCP state has to be guarded for: > > - Uplink pre_process: > - tx_next atomic increment > > - Downlink pre_process: > - rx_deliv - read > > - Downlink post_process: > - rx_deliv, rx_reorder, rx_next - read/write > - bitmask/reorder buffer - read/write > > When application requires thread safe processing, the state variables > need to be updated atomically. Add config option to select this option > per entity. > > Signed-off-by: Anoob Joseph > Signed-off-by: Volodymyr Fialko NAK Conditional locking is a bad design pattern. It leads to lots of problems, and makes it almost impossible for analysis tools.