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 8074CA04FD for ; Tue, 12 Jul 2022 21:23:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5274040F1A; Tue, 12 Jul 2022 21:23:54 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 9BF4540F1A for ; Tue, 12 Jul 2022 21:23:52 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id be14-20020a05600c1e8e00b003a04a458c54so5394132wmb.3 for ; Tue, 12 Jul 2022 12:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RFkUqCPbrzRY7DLRvAwQtUqzGWRgdhRXl1nGEvQiK3w=; b=h/bLTaioIxoTeRVElGncYWaiLKNpFzRkuQkprabLo5kyLp/WQCC4kAtsS0aiOVXY18 nSU5sH/NI2jKjJfcUVdsfWuo6riq7sxSjgmGyhe0WxNRBhc+HF7/MbBDtRrMsLeX1Q/9 +wF3Ha2beAljyhnJyItydVStpRbHQ4y11KkRj2VfWDTtnNie42X2xW1bxUpZH2aFT/wj 6UboXa7FrQD3acSVsTmhS3QgXapjmVJPttvCRVrJHAcmNm4IXYBPrcRT+KsJdCmQIwfM YRbQwBRrCETLDc37HYSipieEdTfOiFAsjHP4ahX8UOTrBZWDNlm8MnOU/jTX2UXjlECn hGHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RFkUqCPbrzRY7DLRvAwQtUqzGWRgdhRXl1nGEvQiK3w=; b=hkmFmaR/lKhV8uC95Uyos1Kl9TKjnZY2zWcPuSli8Ip9pxcjnL1muhonhkWTYW3IAK 0L6tzLRjnGp9HqUQcjM+PLIbYT5uaDp6d95ZxzS00c6u/s7oAx1vC4UC34dFFyJIqgJR N+cz5+l/Bl7qNxBopITmtHTniYhaxoVn7ACI+K5TBUMB6Kkmrh3o70bzB4Dhg0Cc+Btp M7Fbra6AVsGB5Rd/YikfPnT0We2/+CkIDOJeYXSNlO3hkCecCQh2Oqtr+GiMxftKGpYw 9FvY9u8V04deSKXa1TXq7dF32k7rRkUDYdo2rjNou6bn+Kfs9fXo2SLt6Ahgw5Mqc08h PwGQ== X-Gm-Message-State: AJIora9jSo7xzty2RCGx8O+raXZoMERgaKEFdaNg15FVr0RwWARcpWfj 2BgGI9U8i7oquzcnV5ZA9i2PxQk2WYVfMg== X-Google-Smtp-Source: AGRyM1s1Vqbwq+2BjGJmeAVDW9rcBPV41bYI24CyncZVMRuzalCuTj6nq+SOsV1APsDO4U9AlitiYg== X-Received: by 2002:a05:600c:34ce:b0:3a0:3240:92ca with SMTP id d14-20020a05600c34ce00b003a0324092camr5654803wmq.130.1657653832068; Tue, 12 Jul 2022 12:23:52 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id f12-20020adff58c000000b0021004d7d75asm9043733wro.84.2022.07.12.12.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 12:23:51 -0700 (PDT) From: luca.boccassi@gmail.com To: Raja Zidane Cc: Omar Awaysa , dpdk stable Subject: patch 'examples/link_status_interrupt: fix stats refresh rate' has been queued to stable release 21.11.2 Date: Tue, 12 Jul 2022 20:23:44 +0100 Message-Id: <20220712192349.4174428-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220706203506.3422496-31-luca.boccassi@gmail.com> References: <20220706203506.3422496-31-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9224015451386fc4e45195fd057f0a5d22fb5eba Thanks. Luca Boccassi --- >From 9224015451386fc4e45195fd057f0a5d22fb5eba Mon Sep 17 00:00:00 2001 From: Raja Zidane Date: Thu, 7 Jul 2022 08:22:34 +0000 Subject: [PATCH] examples/link_status_interrupt: fix stats refresh rate [ upstream commit 14d460b888c290e16c00cff4ae809d14fe799aec ] TIMER_MILLISECOND is defined as the number of CPU cycles per millisecond. The current definition is correct only for cores with frequency of 2GHz. Use DPDK API to get CPU frequency, and to define timer period. Fixes: af75078fece3 ("first public release") Signed-off-by: Raja Zidane Signed-off-by: Omar Awaysa --- examples/link_status_interrupt/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index 551f0524da..9699e14ce6 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -101,9 +101,10 @@ struct lsi_port_statistics { struct lsi_port_statistics port_statistics[RTE_MAX_ETHPORTS]; /* A tsc-based timer responsible for triggering statistics printout */ -#define TIMER_MILLISECOND 2000000ULL /* around 1ms at 2 Ghz */ +#define TIMER_MILLISECOND (rte_get_timer_hz() / 1000) #define MAX_TIMER_PERIOD 86400 /* 1 day max */ -static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000; /* default period is 10 seconds */ +#define DEFAULT_TIMER_PERIOD 10UL /* default period is 10 seconds */ +static int64_t timer_period; /* Print out statistics on packets dropped */ static void @@ -370,6 +371,8 @@ lsi_parse_args(int argc, char **argv) {NULL, 0, 0, 0} }; + timer_period = DEFAULT_TIMER_PERIOD * TIMER_MILLISECOND * 1000; + argvopt = argv; while ((opt = getopt_long(argc, argvopt, "p:q:T:", -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-12 20:22:33.755050206 +0100 +++ 0001-examples-link_status_interrupt-fix-stats-refresh-rat.patch 2022-07-12 20:22:33.705247081 +0100 @@ -1 +1 @@ -From 14d460b888c290e16c00cff4ae809d14fe799aec Mon Sep 17 00:00:00 2001 +From 9224015451386fc4e45195fd057f0a5d22fb5eba Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 14d460b888c290e16c00cff4ae809d14fe799aec ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org