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 B05FEA0543 for ; Tue, 21 Jun 2022 10:05:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC20E427F4; Tue, 21 Jun 2022 10:05:06 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2066.outbound.protection.outlook.com [40.107.102.66]) by mails.dpdk.org (Postfix) with ESMTP id 0816240151 for ; Tue, 21 Jun 2022 10:05:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=muVexrzcA0tvan8iupXJyN2cZVsxBuWHHEsgBsgYUwYZusCUe58xfFR0DSV41W/pZAkjitF1PYKVowZjdLJy1t7v+HHr4Svx/BbVTkz3dOCMp7Gano+JsMvel9SnFoIX1WDb6B0QYHxcVjOPp2EH8DkVZ5WfCD59M+3DdpmRE7Ym8+aHKpCkQ4Qa7MYXBlofl9IaV8ZgC3laIUHovz9+8qB6IB6klQOJPnM77kuaHDxYOjsTIOLC2PheEneGPRpLumOF2EnHx15OHUydyx4nU6dp5TxqyUavg8IqMNk3LzLoxkVpDMIZkSZFQAF78BPTaLmcmjnasMEkJgpqZBlVsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/7LoTU4t1RXAEA4nzrKXxCbzI2ooXHtsMDERhV1VKeI=; b=HFeR8KH+/kAB2g6JReEUyf2u+BJI08+CG8/bga1uhZtfITxImZwuCAJMxgfftx9rOL9rR7CcehE6JsFvYKWsHZVNkjxpWF1+6JXcslzmZRPYi8KOvqrk+Wm0605p+9FtpB1+0e0E8eJHBQUeSbw96tjFT8t8oWkRG2XpYI8VfRjHpEUcqFLAzeP6ORGRye/HQdTpkW4GLdtZMOIYew3c9IYyOF26SfxugheWl6NwXpXP9IOhp3YNTHLxVNYMQfCdhOpLPnshUcEPs7ieAWhd0VxHAwF4z525jvvPZT0NHdpKhgTgOVVXnlqolR3pwNcVCyERSMKKr/nQ9kOvLw7d4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/7LoTU4t1RXAEA4nzrKXxCbzI2ooXHtsMDERhV1VKeI=; b=tExZfuQNLlYv2TFwuOPOPPJpt6paBLV5ixyXwWw90R1JBp+DmtksxWHgm2lqj7UlKgdXFra6hCeiZHnqhY6lfi3D7COs5hBY0Zv1QAy8TWU/d4HPTsB8zPEYGG0X7pZtyKWVSS2tW623wxj45EH7qj7pA3RpjHjzMRYVdId9ckq46SQZiYzf9n44vPiT4s/USolnLchuSwdimxwQ1QLlTiWLok3TfklyWBMvXkLERtdEDY2FE14wzA7kG+tKJW+LWOzpGJh+6BTHwd8Q7qQdUm83kw3542aJVfKWgkbB4O93kMiGVoLw66x4AUBPvnUPM4n1cVg3ctPHaXwePiSUsA== Received: from BN6PR22CA0038.namprd22.prod.outlook.com (2603:10b6:404:37::24) by BL3PR12MB6594.namprd12.prod.outlook.com (2603:10b6:208:38d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.22; Tue, 21 Jun 2022 08:05:03 +0000 Received: from BN8NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:404:37:cafe::62) by BN6PR22CA0038.outlook.office365.com (2603:10b6:404:37::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.22 via Frontend Transport; Tue, 21 Jun 2022 08:05:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT022.mail.protection.outlook.com (10.13.176.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:05:03 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:05:02 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:05:00 -0700 From: Xueming Li To: Raja Zidane CC: Matan Azrad , Akhil Goyal , "dpdk stable" Subject: patch 'examples/l2fwd-crypto: fix stats refresh rate' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:27 +0300 Message-ID: <20220621080301.2315720-22-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 086aa6b5-b3a1-45fd-f6f3-08da535cbf01 X-MS-TrafficTypeDiagnostic: BL3PR12MB6594:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vwfC/7+7uIejkXI2OxRq+8yQKzmotsWVro7chmCfc04YanJkjX4vIcU/YTUHwr14HP4ndzHXk63IWva37yumnqWFWS8mHjgYpIxhzGj4RXYl+ofp7CnxndTtGZwXvQdZFzvXS+WyRwunbma+QDpAsqcwOUxIZ1MgS1/CU0m4BYoIECy/CjDrHC8b2CiYWA59UUItlbnaAN5bpQtbKQZP/4AaULW/Gxt8nZIpJ/BZ48T3IiQqFuT27zYiGTI66xKUH8t0qQ1YyrTadf98Usi0jYUgqr0A2nDGUEkzO46zl+cL1z+kVEZ5Jhx/ENXGl3X1aMrTgWKHwuKSTrPb5rZ9aIpaAc+t2jB9/drBALEUxLlqvBeOakxufB6CHm8cLj2Ha+RJomKdbb1ej24FWRkugEYUmxqfePkKk95yOD6CNu4HW7N/q6sWPBdQh8dFB0DtsiPiSnXXf2u+eNc6dUrGtqsYX6sXkl+PcZQsjYa7Kdcbx3HCD16JO/DYPLC1nPf7uter6RVIBpxZLUixBSni8ybMidiGnsZoyvr/LujFV7vYzh+0SCBP12pA+RiQ4MNZToRuDeJAu+YqHucz1tq2q5NJgImWISJhOHqh+jWCqVs/q76IM23hb62T6BY7fX5m2hx2gs8yZ69eluK0joEjoBZdT6e7kOBhn+euCSjbE+OS4EvEjjL5wg7S95fNrXIxlokzaFPaQBlCiz+28YLveGABmOTXfZ+AvGmhq2MtDyfUTvNH4w9yHeOs1nvxfN3y6+Ye0Ucu+hpk8HWs2LipMNzY/OC5P8XZYNCbolxELbcQvD27JTY07O4iVX2rHfFrIBrRWSuOWzqGe9/B+SaTNuBxoSLCcAoAf9WxdPUQb0Q= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(396003)(346002)(39860400002)(136003)(46966006)(40470700004)(36840700001)(356005)(55016003)(40480700001)(36756003)(82740400003)(54906003)(6636002)(37006003)(81166007)(36860700001)(83380400001)(316002)(82310400005)(47076005)(16526019)(186003)(2906002)(26005)(6286002)(336012)(426003)(70206006)(70586007)(4326008)(8676002)(5660300002)(8936002)(6862004)(53546011)(478600001)(41300700001)(2616005)(966005)(7696005)(1076003)(40460700003)(86362001)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:05:03.1301 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 086aa6b5-b3a1-45fd-f6f3-08da535cbf01 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6594 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/c29b05c2168877a7045ea3d5ffedfcdcdbf212d5 Thanks. Xueming Li --- >From c29b05c2168877a7045ea3d5ffedfcdcdbf212d5 Mon Sep 17 00:00:00 2001 From: Raja Zidane Date: Thu, 7 Apr 2022 14:42:49 +0300 Subject: [PATCH] examples/l2fwd-crypto: fix stats refresh rate Cc: Xueming Li [ upstream commit af676be9e6671b25c69af2aa5fc2d40d562137f6 ] TIMER_MILLISECOND is defined as the number of cpu cycles per millisecond, current definition is correct for cores with frequency of 2GHZ, for cores with different frequency, it caused different periods between refresh, (i.e. the definition is about 14ms on ARM cores). The devarg that stated the period between stats print was not used, instead, it was always defaulted to 10 seconds (on 2GHZ core). Use DPDK API to get CPU frequency, to define TIMER_MILLISECOND. Use the refresh period devarg instead of defaulting to 10s always. Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application") Signed-off-by: Raja Zidane Acked-by: Matan Azrad Acked-by: Akhil Goyal --- examples/l2fwd-crypto/main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index c1e26f5dd4..755a28f341 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -252,11 +252,9 @@ struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; struct l2fwd_crypto_statistics crypto_statistics[RTE_CRYPTO_MAX_DEVS]; /* A tsc-based timer responsible for triggering statistics printout */ -#define TIMER_MILLISECOND 2000000ULL /* around 1ms at 2 Ghz */ +#define TIMER_MILLISECOND (rte_get_tsc_hz() / 1000) #define MAX_TIMER_PERIOD 86400UL /* 1 day max */ - -/* default period is 10 seconds */ -static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000; +#define DEFAULT_TIMER_PERIOD 10UL /* Print out statistics on packets dropped */ static void @@ -879,18 +877,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options) } /* if timer is enabled */ - if (timer_period > 0) { + if (options->refresh_period > 0) { /* advance the timer */ timer_tsc += diff_tsc; /* if timer has reached its timeout */ if (unlikely(timer_tsc >= - (uint64_t)timer_period)) { + options->refresh_period)) { /* do this only on main core */ - if (lcore_id == rte_get_main_lcore() - && options->refresh_period) { + if (lcore_id == rte_get_main_lcore()) { print_stats(); timer_tsc = 0; } @@ -1451,7 +1448,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options) { options->portmask = 0xffffffff; options->nb_ports_per_lcore = 1; - options->refresh_period = 10000; + options->refresh_period = DEFAULT_TIMER_PERIOD * + TIMER_MILLISECOND * 1000; options->single_lcore = 0; options->sessionless = 0; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:50.262673845 +0800 +++ 0021-examples-l2fwd-crypto-fix-stats-refresh-rate.patch 2022-06-21 15:37:48.994451098 +0800 @@ -1 +1 @@ -From af676be9e6671b25c69af2aa5fc2d40d562137f6 Mon Sep 17 00:00:00 2001 +From c29b05c2168877a7045ea3d5ffedfcdcdbf212d5 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit af676be9e6671b25c69af2aa5fc2d40d562137f6 ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ -index bbdb263143..b1e2613ccf 100644 +index c1e26f5dd4..755a28f341 100644 @@ -44 +46 @@ -@@ -894,18 +892,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options) +@@ -879,18 +877,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options) @@ -66 +68 @@ -@@ -1481,7 +1478,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options) +@@ -1451,7 +1448,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)