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 0764AA0032 for ; Tue, 12 Jul 2022 09:45:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEB5D410EF; Tue, 12 Jul 2022 09:45:30 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 960DE410EF for ; Tue, 12 Jul 2022 09:45:30 +0200 (CEST) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 258543FD85 for ; Tue, 12 Jul 2022 07:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657611928; bh=1Jb9w/YUrDcsASXakap83EHoNHZnXFcA35UPzts64gM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=iGQ5kOL+Xg+di3WidhCGQrLwrMCIM1EkzGjQnZ9S3WaHAwc1RExYMd+ytHcLGwyj0 BnKW4fXT9nn5w8t4c+LvfzpJfZ0mDQBK4Otf4byrIKRTLNblzfcp8F1EByqd8rZMyv ZArjg682gbUn34tsogqAfzztRXfBMeIVN9rkaXMluUD48+04eD2dIepKREXe8CYRhi eH7P4QtNmn9h2ohbb3r9uhogaLIDS58sqUVRRkBkP7J1l+nds+1bv5BrQGtL/QUGQ9 uH6GT4IQpW3iP8hPh13lSuibkwSZ2InIEXrTGaZxW9ubFLxII+VJkO8TICP1gLYC93 2c3/VZWropD8g== Received: by mail-ed1-f69.google.com with SMTP id w15-20020a056402268f00b0043ac600a6bcso4639297edd.6 for ; Tue, 12 Jul 2022 00:45:28 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=1Jb9w/YUrDcsASXakap83EHoNHZnXFcA35UPzts64gM=; b=oN1VOWMmLmYrwNs6Ot+4YNfgw1iHIRoEHMYprQ1RfGNpco3gREJI+b1LNNikSgG2rL 32BzKx9i1Utl3KkuDjCgFoOn7rK+tMlHhSt486HsKHsGY2Jo8VF8egQib93mH9KBf6B2 Nn0hv9GyYxwYAv12QshMxlh1fZRqH/d2KJERNhodKRQzaEl4txmh0ozEYcrzYTjWnFJW ofvG4tIxCsIYzCEtXn8hCr6nvInJXjvOVC5CE+Pu4TUB6b1l/CiX7o0YFVWeiULIzSm7 yRCUI9YfFpGsgH0bNvKLfrl027E8wQnrh1+MikA8BOjqf1RhjCC8wUJ3INyBxraSAV1h zXjQ== X-Gm-Message-State: AJIora/WO89WgVvH/KmJ5lHo85kqHfKQAKPhNYT6UkP6s8Lil0Rt3YI2 iIaeKtUO2bL2Vl3IikHHG8np11qV+j7YOkqo732EJogBG7+tNQ0fjxfhyUs/kLvEWW03MYAV1aw pKkRarkY1UTwu8hc+zauPj0cM X-Received: by 2002:a05:6402:5299:b0:435:61da:9bb9 with SMTP id en25-20020a056402529900b0043561da9bb9mr30295200edb.21.1657611927592; Tue, 12 Jul 2022 00:45:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uNDdML1KUj5k6kG7w/BcjntsOHcJOMBCvu+aeUr+k1KiMby/0vIl15q7GKwS/buffzGrWFmg== X-Received: by 2002:a05:6402:5299:b0:435:61da:9bb9 with SMTP id en25-20020a056402529900b0043561da9bb9mr30295184edb.21.1657611927354; Tue, 12 Jul 2022 00:45:27 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:782f:b1cc:ad02:593b]) by smtp.gmail.com with ESMTPSA id en19-20020a056402529300b0043aecea29a6sm617661edb.3.2022.07.12.00.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 00:45:26 -0700 (PDT) From: christian.ehrhardt@canonical.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 19.11.13 Date: Tue, 12 Jul 2022 09:45:21 +0200 Message-Id: <20220712074522.3704914-1-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 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 19.11.13 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/44bd653285d4ee919052ec5cffc15ba3f2dc2fe1 Thanks. Christian Ehrhardt --- >From 44bd653285d4ee919052ec5cffc15ba3f2dc2fe1 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 26595bb47a..174888eaae 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -99,9 +99,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 @@ -368,6 +369,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.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-12 09:44:11.717895611 +0200 +++ 0001-examples-link_status_interrupt-fix-stats-refresh-rat.patch 2022-07-12 09:44:11.676834710 +0200 @@ -1 +1 @@ -From 14d460b888c290e16c00cff4ae809d14fe799aec Mon Sep 17 00:00:00 2001 +From 44bd653285d4ee919052ec5cffc15ba3f2dc2fe1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 14d460b888c290e16c00cff4ae809d14fe799aec ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 551f0524da..9699e14ce6 100644 +index 26595bb47a..174888eaae 100644 @@ -24 +25 @@ -@@ -101,9 +101,10 @@ struct lsi_port_statistics { +@@ -99,9 +99,10 @@ struct lsi_port_statistics { @@ -37 +38 @@ -@@ -370,6 +371,8 @@ lsi_parse_args(int argc, char **argv) +@@ -368,6 +369,8 @@ lsi_parse_args(int argc, char **argv)