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 040EAA0547; Wed, 21 Apr 2021 21:12:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EA1D40687; Wed, 21 Apr 2021 21:12:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 049A440150 for ; Wed, 21 Apr 2021 21:12:40 +0200 (CEST) IronPort-SDR: zXXpIJeYo6UiJFQs0gZbI/kClLBTnGXWgfDLxh0RdfbM8bC7YnibcYGEx6jnBhOydlSrXrDVYH MLoUbVcsEKFQ== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="175246209" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="175246209" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 12:12:39 -0700 IronPort-SDR: ubg9iH2xlEmZNN/EzCtKMeMd6RYVbsX1HJLYGs8YAp4WAVMzJtcRpZXDG5H1S9cmn4o6Cm4RWP VhCUYOeS1kAw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="421099817" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga008.fm.intel.com with ESMTP; 21 Apr 2021 12:12:39 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 21 Apr 2021 12:12:39 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Wed, 21 Apr 2021 12:12:39 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 21 Apr 2021 12:12:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QnymNjSjQ3Ge0Bl6vrgZSjeb7a0ZLy3gBHSiajhlHwV3GMF340NVmBzLsd8k/2TNZ9o7n8GkdREXodAAngZGxTUdByXuftPkwBRWY3rdbGhHHY6+OOIsfO7ep2buT8l9gJzJ+XdRLNNOvkh0h14YHFb4tOsPkw8uiQmHMsxWElNtNZELt+O2YdHzwjR8rxSQ0U6CGb+KjC5fzrM3acCa0Bj3Ym58ew1s590b6Iy79b9z9NlouNV0Fn0kHmNpmeLvDLI/enVQXQ0kaIk8k+Czw3x5j6j3ilUJlONkeZrSrF6NTos1XcHpAqodEkgW/2M8t/yP9usKyVIZ16idg0I3Iw== 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-SenderADCheck; bh=2cxFAsbbCaMTrq1Are5Ypx3Fz6W+0sV1ZV3iypjbA+w=; b=XZvVktyOBE49h1sUEJo/uhkt5fzWg/8cO85iqjS+lbpjIWhaOVVYTtC3dLmNSWcvKqo06YX5wu8Iu7VGdUzMuyNt4jg/xsJrBUa5NNVVF4AIGOp50scFQH8Zmh0TCl11ghBImVAeQIBQsEC/gM9cqyCYwIqWY5C6XWMEoifN1Dw7k4TtkVJqmqMo4k6FpxaGgsRMmNulxP5s3yECzaK5xMxmOuuoAtP9ZDI/AL2GbWQ5a2lJ0HOi6OLYQmzbTZ/O5haZAql+mKgHyzppWXfh+T5Qn70XL8yVESbRLHeesdQGMp3Sr0GiF+kb8ITYcn+ieunmVxpu2yqx19TE8+BY0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2cxFAsbbCaMTrq1Are5Ypx3Fz6W+0sV1ZV3iypjbA+w=; b=FRsAF6CsnltvwIzaTmLq80GXg84xBnDcAO4VyecY3SMpiZGMNHhclvB3uTj38V0voI5VSYqXeTfKR1YLWDhKbimMmCF75fQ+TEPO53HFBE4kc7rTu/qfQuyIuzfF5c7EU0igYZ27OQujFS13CYAyxRxuxODi0Nbiy+PYYB7ypSg= Received: from SA2PR11MB5196.namprd11.prod.outlook.com (2603:10b6:806:119::18) by SN6PR11MB3325.namprd11.prod.outlook.com (2603:10b6:805:b7::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Wed, 21 Apr 2021 19:12:33 +0000 Received: from SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::e5ae:2c7e:c1b4:c0ae]) by SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::e5ae:2c7e:c1b4:c0ae%7]) with mapi id 15.20.4020.023; Wed, 21 Apr 2021 19:12:32 +0000 From: "Carrillo, Erik G" To: "Min Hu (Connor)" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "rsanford@akamai.com" Thread-Topic: [PATCH] examples/timer: fix incorrect time interval Thread-Index: AQHXMcbQkRqpSzJJ2kmf9W5Pt4v6s6q/X4Pw Date: Wed, 21 Apr 2021 19:12:32 +0000 Message-ID: References: <1618470748-12369-1-git-send-email-humin29@huawei.com> In-Reply-To: <1618470748-12369-1-git-send-email-humin29@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [136.49.192.164] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ebe548e1-9284-4af7-d7c9-08d904f96a80 x-ms-traffictypediagnostic: SN6PR11MB3325: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2657; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DSIqcznxuBGKRISCubkVYeK9e1Yo4FSpGqEoFGFRcDQo0bXfniYNXmlhjvmp5/J2sJYtPsBOa4mI5VQfd9GaMPdt5RPFNUJOBWuMRImfLrbx1wEIvht2Al6RxUcAJDhpkpzQ+ArvKPbwCAWjnturK60JYcNFSqQc4UKDBCbugLGq7mf8QcRf46xaHcfTN3Yc9JUXPBm/znLaK3ex5+eBfnwodbRJk86DEJ+Pl6i4xCv9/+8eEbCwxOU5AxSwWm3Xiw6/kznYLWn/ENofOiSqPslIH4x4rMhHdzIL7WkbwajutlAAerKYR5CBekml6IxsjVTyq6mjJ+JwUOghBYHuj9biyOGiHpL3wbXBLqjcE+f4rl9YWlDfYp/SCXTC1wXkqoafPXgyWc3ZgTvcSGXQzJJwIFym7DVPajzFeYZ7y6SPkzVWplPI1g8Z8CP04vrR+SzANgQbkwbIUIPXKZ7hQdNIvuxhinauV8nduCuLmYFVns6NotjTSuWznRS8MpLG6WFmOYLrvjXrI2W96V70JwfqFGp1lZrKBNCy5FF1j7pFC/6xA8sP5q4kIiWynn5nd4Lzk4Kj15Ss28xJ0+Aixo4iOBSP++WiTLYVBMjT+g4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR11MB5196.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(136003)(346002)(366004)(396003)(376002)(54906003)(9686003)(52536014)(83380400001)(6506007)(66556008)(8676002)(110136005)(186003)(71200400001)(478600001)(4744005)(86362001)(55016002)(66446008)(8936002)(66476007)(76116006)(2906002)(26005)(4326008)(7696005)(5660300002)(316002)(53546011)(33656002)(64756008)(66946007)(122000001)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?RBJG/kUbzVTJWAY3M+85A+3kwirqms58IGzx7KZcDAYNu4kx7sORE4Suvb?= =?iso-8859-1?Q?fXHHTbkRPjJgTbk7fHN3fJR0W77gGIW+gJ/r/JFSOFwl0bSl9rqIgfEk8M?= =?iso-8859-1?Q?sC5mag9pHjVzPKyJNte4AU5ldEoiNjvBoVfe/nXWwIZytjwSSvMr9fCryq?= =?iso-8859-1?Q?SoRZyCuqBowAnCCM5t0YOR9aL/KEzdKRspjs+tvLEPhi4H6w76RCZEuqMA?= =?iso-8859-1?Q?opp+X+NfoGZgvE/2Zp7051p/Bq6pE62VSFYxBN5wDYNUm6Lw/xGKbh9JCb?= =?iso-8859-1?Q?UQNp93D3JakuJHRrsSFKHRaz28k/zzS+HgsiAy7ekudKicTiSdi6Q8dRpZ?= =?iso-8859-1?Q?jbFYIAhNew2n8Xmccf/+T2Gj/vPCW2XVilQPBfXrUXNXzyrjsIWzkILtOM?= =?iso-8859-1?Q?qDMu9lA3XGy6Xc+8N5A01sBruM3MXcx5I5S+aGiKZP6tRvSR1X2f7BNrqV?= =?iso-8859-1?Q?Mhkon3R2lKGQZ3jmiWETw4sATa0fgc9lW1Y9SuvRCUJNvAkO9uEYp0PaRv?= =?iso-8859-1?Q?mLTsxYQ9g3/ECyi+9G70S746Bi2HJ1FkIcsG6fenn0X7hC0KtDuJZy+U4p?= =?iso-8859-1?Q?gH/CuzZEwR4ffl+UaxlHrTEVbVj9afx2WKC/KNPbD9EIsASiViMkrgqhcO?= =?iso-8859-1?Q?R36t8Grr+py+Li3asbVCNkwcUQkaGZv8+3eN0DFuFmMd6Y2+LMaheDwOr3?= =?iso-8859-1?Q?+0SHMYSyvPMVQSgMWX08vSO0JMAXNtdjZF5NR/eK8m7V3IU4L5G18pkyJL?= =?iso-8859-1?Q?HQiyvT+ubQg8zBxBSyYK7UeXuNeYD3XnHIEL6lG5YOjcTfepnl/qvJ6oIy?= =?iso-8859-1?Q?jqt4m0fDLh5H3S51OaVZsbg/MiuRUmXzfu2Flig+sjdMNMYrJAVzpxA3IW?= =?iso-8859-1?Q?WtlEm9uv1Ctbl+ziN8hszQT1GQBRLR2shjWj1ZyPV2137TMrnE6g2KY9KZ?= =?iso-8859-1?Q?L2ELHQE5qGYZfmNbomh7WI9AIbaEKuVSDTOOyYxB+dOiwcGJbUW7NfHpDf?= =?iso-8859-1?Q?8vP1pDQtTHxALYTbdxhXtXDt42PB5h4w49A1gbNrO7V3vhtYPtKJ8t2Z/h?= =?iso-8859-1?Q?VcMhQZPfLWE9O+LGY4MkTDvhQTc9+pbCqICvhJFxjhaEIrgyaBZ9MLwJoA?= =?iso-8859-1?Q?RCtvtJ5aWIXETFRn9tSGJnQJFGpNqjeVJfKsLL0QGCFOqddQ+CTNZlgEL9?= =?iso-8859-1?Q?MFCSxu2GGHUIYXm3Vn29IUukzIQ1QfxsycWgzp78o9eBqJUR4QqfRl7Pt+?= =?iso-8859-1?Q?japoCgwVUHLSlSuK5dy6e1a8zPkYghuCktkYCDZf9NetAlPBtyN7sjBAdF?= =?iso-8859-1?Q?iVXkzotDt7ms9oE+6xkZhoy2LUEvvNiezVq6sFa9cpVAYytxR3XVe8a4Tr?= =?iso-8859-1?Q?tc/+HQ9aK1?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB5196.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebe548e1-9284-4af7-d7c9-08d904f96a80 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2021 19:12:32.8836 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AOCwsEb68ZE14j4X4rQ6f779DMq9aKkd36+xSbN0dsY5LqM/huDFc+GTUVu4qX1HRvao8myWYfKQPn/Bul/J4powq4UVdkAWkokCw5KS5dE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3325 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] examples/timer: fix incorrect time interval X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Min Hu (Connor) > Sent: Thursday, April 15, 2021 2:12 AM > To: dev@dpdk.org > Cc: Yigit, Ferruh ; rsanford@akamai.com; Carrillo= , > Erik G > Subject: [PATCH] examples/timer: fix incorrect time interval >=20 > From: Chengchang Tang >=20 > Timer sample example assumes that the frequency of the timer is about > 2Ghz to control the period of calling rte_timer_manage(). But this > assumption is easy to fail. For example. the frequency of tsc on ARM64 is > much less than 2Ghz. >=20 > This patch uses the frequency of the current timer to calculate the corre= ct > time interval to ensure consistent result on all platforms. >=20 > In addition, the rte_rdtsc() is replaced with the more recommended > rte_get_timer_cycles function in this patch. >=20 > Fixes: af75078fece3 ("first public release") > Cc: stable@dpdk.org >=20 > Signed-off-by: Chengchang Tang > Signed-off-by: Min Hu (Connor) This LGTM - thanks. Acked-by:=A0Erik Gabriel Carrillo