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 9890545733 for ; Sun, 11 Aug 2024 18:17:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DC14402CF; Sun, 11 Aug 2024 18:17:25 +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 5D1AF400D7 for ; Sun, 11 Aug 2024 18:17:22 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1fc6ee64512so26034585ad.0 for ; Sun, 11 Aug 2024 09:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1723393041; x=1723997841; darn=dpdk.org; 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=tXdKvxjGp7vG+ATRB/T5zQuI9ZhMPmZDPfZ/UuUO+2Y=; b=Bk3niJoGvedDgWO+UNQ2vbA2xtneCs3Q1G2AmNNrnwjTX0jgmfUTVR7z8pu58dpFT8 fFiKEy1eOISqoI82DuK2glLGagvMgeCKAjM8ImFtX4ny7EEFYzK3LnJKH7c9lidA0g5M KEdtYWUdB2VqSP5SAfBoqII6zSD+677lHO22DsAcRr4WOoMbAEZCREfFgA/tftI2Ehl1 jH8+JXHbglox47Joq5Ce9mvo6T9qTevKZKHqNv4xX/op5i+yVCEFlgwTEtLHbPQ+FEzz bVdCjwMrgnxho9/TKBMm5PH+FvuzH7CCi5efonzQF9Gv1c417K7p6WJJaN6BbPuMToxp FTag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723393041; x=1723997841; 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=tXdKvxjGp7vG+ATRB/T5zQuI9ZhMPmZDPfZ/UuUO+2Y=; b=s4UMlMQDzVS0B/Me+OHS5ceDIRyh1CQ3wfT9EDe3K7IkGTPHBg367j+ZLQ2zL+OIie Xwi+4VQpKL+OEkcRm30V7os8hxEca7hkKemneW9atKkgF6cws++RnifSmnU10IdVk3r4 1obGraYsg8tyNWRGFNS9fVDu32o24NG3RKOMP8OCaozy04xOjMXV+lM3kHcRld/ZmTn4 OwW/iOqbEdyWGgNf/enQbI7aRMl9TEIG6XGJcReEQNq9v8h3cMsqed++mAT8XtP6tYgs sgqDclPTJydxTOy84+zKavt0ryn0lFOtBEppXNzjbTC/WZtNwOxwSMFW2nGeC0ac1QLv 71kw== X-Forwarded-Encrypted: i=1; AJvYcCUeE7ypJ4ZCOrwmwc7kzXjDd9WSRWFPoke/VQrW6q/y8hjUKHUk5UxOAgVEoKMQzM/REn5FvMF1z+mjLSdzCbE= X-Gm-Message-State: AOJu0Yz4+dJwY4qXD4N7Ss22fvY2/zxtESPNQ15Zo0tQoBFdb8zp5axy J7b/8LXUt0YBN/TL4c8DvzZg/JNbpIspgekSvBhgEs8OZV91vRSrsihgpJY0fyc= X-Google-Smtp-Source: AGHT+IEOrd0gGPyXMWyiSLaDnHUF/Kx9X30/1o0YjeKJ/DBgn1f+f5AsfkT73DcVg7/io3nC+VkdJQ== X-Received: by 2002:a17:903:1c1:b0:1fd:8c25:415d with SMTP id d9443c01a7336-200ae5cfea6mr46811875ad.36.1723393041289; Sun, 11 Aug 2024 09:17:21 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-200bba01937sm24333825ad.200.2024.08.11.09.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Aug 2024 09:17:21 -0700 (PDT) Date: Sun, 11 Aug 2024 09:17:19 -0700 From: Stephen Hemminger To: Rakesh Kudurumalla Cc: , , , , , , , Subject: Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability Message-ID: <20240811091719.37512e55@hermes.local> In-Reply-To: <20240811155957.576645-1-rkudurumalla@marvell.com> References: <20240811065819.575759-1-rkudurumalla@marvell.com> <20240811155957.576645-1-rkudurumalla@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Sun, 11 Aug 2024 21:29:57 +0530 Rakesh Kudurumalla wrote: > Race condition between jobstats and time metrics > for forwarding and flushing is maintained using spinlock. > Timer metrics are not displayed properly due to the > frequent unavailability of the lock.This patch fixes > the issue by introducing a delay before acquiring > the lock in the loop. This delay allows for betteravailability > of the lock, ensuring that show_lcore_stats() can > periodically update the statistics even when forwarding > jobs are running. > > Fixes: 204896f8d66c ("examples/l2fwd-jobstats: add new example") > Cc: stable@dpdk.org > > Signed-off-by: Rakesh Kudurumalla Would be better if this code used RCU and not a lock