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 EA749A034C for ; Wed, 20 Jul 2022 10:27:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E582040697; Wed, 20 Jul 2022 10:27:19 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2062.outbound.protection.outlook.com [40.107.237.62]) by mails.dpdk.org (Postfix) with ESMTP id 0FA8F4003C for ; Wed, 20 Jul 2022 10:27:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RtGYfq3sNOR0jvOJnloEp/Yt/CTgxVDKcaQmqNREH5RE6cr0kjvf8JxEz5spQlNFJMPNaTJ+7ZCezA2XauVDnIMBuQ9kwTlP5jOwAIaV4GZjb6w2TQwBCNiUZTOhFNK5VSC7DuhMwMXGDunljrmyoKFSj+z3kgSNyeU7hZHB/kyVcnlEQa5nnnKXD19KloguRZwjcyRRDYhtsDFfcJU+V1uXX5zpUkFlsYvjS7Km2rKgZa2Hz241YKyoDSC1uWNcvp0OjwWFcUqmOvZwu1fKcE2ouUtrEXUGX9Fy541LfihfouCL6JUvT1KNY1VPvQsMrJGkwuwlhbZL9RYMIQePHQ== 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=4w0EEF0KQEoXhcnV1exPHHMM0WmzgbjyVd6fh3wvyR4=; b=Ln+P6LiX3sCy5tbMdvoHo9G+kWISqk9HJJhLD1BBGZDVAkTmBOQhfwT71ZCg3ZFLtuhcEJWie+2UkO2kyV+CZnT4lWBu8iPZT0P2LImSvYa11zFZEzLeYzraqLnOK8w+lTmd1C7YyzLeAHHBd3xoV3Y2ujtDVOpWJBtjyBAb0uR+2kawxL8OlK2s+82ShoNiFWPl/um5d8qEGM/QXx1hbIu23gCXioWhp51k60OiSVi6FxiqPQJ1R/4B6YWRXRhIKOgq0pxAygj28pBUb0KSJwMkSi8VvcRp/Zn9Hk0/EGjVcFqpvWRw3HhjZ909+P13NZUXIi9iBUegdXEe+hNGBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) 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=4w0EEF0KQEoXhcnV1exPHHMM0WmzgbjyVd6fh3wvyR4=; b=TsZl8sPqOCMl1RxNjSa1VgC43zgMM/3Eighb2IdHKeJtactJ/ZqGqt98u44nYT/AzK341l9E+/6sjau9UDhSb/siNg1/9pHPsWO245JES54Foa5VxLa0eZF82FB+gW2rAh2D0cjsuUeeq9RW9JUEOif/5OoX9iU9x9AJW4Pyn5djKkzlNvrzKABbaAe0PC+mnvLmwORtT2jtPcIGur6jA8M8wNJucZvRybJrgsMQbRuUhF4rP4+SJFsDJXLQpiQRIl7SylSredd9nkndSXFqh+66VlNmfcDntLyCuiPg+eNffpl3KLetLKpq34+Dn2puT+lJ8LiCPxYHyw2NvuNbKA== Received: from MW2PR2101CA0032.namprd21.prod.outlook.com (2603:10b6:302:1::45) by BY5PR12MB4209.namprd12.prod.outlook.com (2603:10b6:a03:20d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.13; Wed, 20 Jul 2022 08:27:17 +0000 Received: from CO1NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:302:1:cafe::ab) by MW2PR2101CA0032.outlook.office365.com (2603:10b6:302:1::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.5 via Frontend Transport; Wed, 20 Jul 2022 08:27:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT006.mail.protection.outlook.com (10.13.174.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:27:17 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:27:16 +0000 Received: from nvidia.com (10.126.231.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.26; Wed, 20 Jul 2022 01:27:14 -0700 From: Xueming Li To: Raja Zidane CC: , Omar Awaysa , dpdk stable Subject: patch 'examples/link_status_interrupt: fix stats refresh rate' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:21:32 +0300 Message-ID: <20220720082132.3954126-63-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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: e10216e3-5516-4453-e988-08da6a29a815 X-MS-TrafficTypeDiagnostic: BY5PR12MB4209:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ClZIwxkTJWQthdUCuktzE0y+qD6srvj2cz4WfTwrs25JZfo3JWK+uJxQlvRt?= =?us-ascii?Q?c/F61hoZnaLpn/XIRNQ5SJr4rJBqj0q/MsR1E2Ooo2DEKnchuMjQiEfmK1P6?= =?us-ascii?Q?PGH8qcaHxLOg3i6ge8B+XbvFfuoU6ajHIuXgebxcv00EKp43anHmAHWa71/K?= =?us-ascii?Q?68aIgDuF/CdN9TEv3sQbsqU9wsBlvXL5uvb7E8g+uFD/MabV4k2QJxTfnMEn?= =?us-ascii?Q?yodQF9nfBJ7R7iwUKeq5YmIxfQRYhZOyub4pdttlzuWhLbNPqw7xVGAjuo+1?= =?us-ascii?Q?7lkfqwwRul5zWV02WRXyvwFSqhjhA2nrorYtxXag421R17ipBAKYxp19ch3D?= =?us-ascii?Q?5OsFFzqbbw9AkSOSX7m7syu8eASpA4G7Mmw7BbEfK+g+bLfF5S/Rg36tlIDl?= =?us-ascii?Q?K8ApNf7o85jQT5GKTIc/oEl58fzUo3eUtL8k2wBBnd5mtu2hQVQ3H5UiiXzC?= =?us-ascii?Q?GhG3igl250UQPWvUdi9VYqzrT0y51NWejc5Ry0pHHedNI26KYvGdpF8TFkqC?= =?us-ascii?Q?qtAlaFp8gqweJcUX3TJrjd38etW4/qDDq5JvjSAeP0wLzrQAhqvPDGU15vIa?= =?us-ascii?Q?N8nuStqIcS+vMm040/53TAo210ElgVb5IYOANo0FafDwGAV1GNPAuUDuwBZI?= =?us-ascii?Q?6GcqyGMN5tVtmunZGEVYYNXG5XgobnYiPVbfcSge4biDj6MLiBLybu5q5o/U?= =?us-ascii?Q?N3OAHgoWBrM39Lf2ylVllIrkSL2CbRyBmR0XI12YrWr090KpvHjsxrAjdRTL?= =?us-ascii?Q?aeSILioZRUiTFuqZaqa/TrxcL2yXnIecUGU3uajDI4FHiDNoqRGmbNk9YjKa?= =?us-ascii?Q?7q8bgZSXrXkylcncnYNSgfsDPMqdyKNttYl4EBNrlDHqpBRaMrmn5KnTrWQq?= =?us-ascii?Q?1LBDJ/oRyvCAkGw87msFKXvN9A8Q5Qu7aJZrw1IM2vtlxzbpfQ3RXmBuwSZb?= =?us-ascii?Q?rTHHiazx0Zk2lDlLnnVDgA=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(39860400002)(346002)(396003)(376002)(36840700001)(40470700004)(46966006)(55016003)(356005)(40480700001)(82740400003)(6286002)(36756003)(82310400005)(36860700001)(81166007)(316002)(83380400001)(54906003)(37006003)(8936002)(41300700001)(426003)(1076003)(8676002)(2906002)(6666004)(2616005)(4326008)(5660300002)(70206006)(966005)(186003)(7696005)(6636002)(70586007)(40460700003)(16526019)(86362001)(478600001)(6862004)(53546011)(47076005)(26005)(336012)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:27:17.1308 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e10216e3-5516-4453-e988-08da6a29a815 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.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4209 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 07/22/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/0e41becd40c25f53deb589cb37578c4966ea5f73 Thanks. Xueming Li --- >From 0e41becd40c25f53deb589cb37578c4966ea5f73 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 Cc: Xueming Li [ 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 6cffd5a827..a022791673 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 @@ -365,6 +366,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.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:01:01.670822815 +0800 +++ 0063-examples-link_status_interrupt-fix-stats-refresh-rat.patch 2022-07-20 15:00:58.811000334 +0800 @@ -1 +1 @@ -From 14d460b888c290e16c00cff4ae809d14fe799aec Mon Sep 17 00:00:00 2001 +From 0e41becd40c25f53deb589cb37578c4966ea5f73 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 14d460b888c290e16c00cff4ae809d14fe799aec ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 551f0524da..9699e14ce6 100644 +index 6cffd5a827..a022791673 100644 @@ -24 +26 @@ -@@ -101,9 +101,10 @@ struct lsi_port_statistics { +@@ -99,9 +99,10 @@ struct lsi_port_statistics { @@ -37 +39 @@ -@@ -370,6 +371,8 @@ lsi_parse_args(int argc, char **argv) +@@ -365,6 +366,8 @@ lsi_parse_args(int argc, char **argv)