From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.4530.1644564807108843445 for ; Thu, 10 Feb 2022 23:33:27 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Rx3wOuSf; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: zhichao.gao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644564807; x=1676100807; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ZfzGP+8N5EVZUWioogUZos74lVDCk7ay3xGCiMT8Tq8=; b=Rx3wOuSfEEu9uN5yNuqnNvKVJDCG3RJ+3+vN42IOIuYwCv3vLAhC9sOV 235QbUKESX6zXgd8RAgEUlvwlTT5m07RbenDOgn0Pfco0LIqBjp28qJKX RUd6GwEwZa9liFPbQmJMYun5gwWO05Qv9BFhlfKp5mrEyob1xfuHrPx7h lpW6z5wYDYjuN81vT2Pqrq+10T7exPNd9Zxb6ojtfTk3nv/jt3tpiRppT UD7rl9k2dPwVq+61Ehpr1c25zuTwRF+w3X82tehTztonxuQKt7mVnPknc p6EXmv3QgrZqIR6KpIsAF+Sif8AbYB3yzNvo+Isgw1qgMnYTb6rVrPTbd A==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="274236542" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="274236542" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 23:33:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="633993710" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 10 Feb 2022 23:33:25 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 23:33:25 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 10 Feb 2022 23:33:25 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) 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.2308.20; Thu, 10 Feb 2022 23:33:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hzHKxcKzFEwIYZU5H/wCRhUMYxs5QycM1ZlKSqNVwDMP6PWZVVeSVYlojwKcWrXN0a0WfFL/N4/2O8SgZE2mYuMkc3tLu5dWR1O/qJjnAQzekZN/JA36t5J+FJSvOHlbn5xDKR2rPEfn2m35C5q5T5/ZIfzy0uxKdqjI2BtI1SVOhbYXz/4wzOr38QXaa+udbGBEn5eRGuG+K5rL5O0wtyhn1udvsZ84MsuT2xRD8AaaRt1j8hrgNk/I8MvQ6tNixAQE+jSq3+4KVOiVZTO45pBIs7RS+zUf08SDZ8iMGCZ6/xCXXRvVr82t0VmUZUdcLiGSIp+PFTPdGsA5zfnMug== 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=ZbBU52vc3jBEbz1CfFJrwC3LvYJ6jCKZExs7B4GF/og=; b=aj2vwbbFxwKeYGjJAHxfu3Qq0AoZKIuFko8Q2ohnjdPRr9Akxj3/DcJdrd6kL8iLWssr0WFJ7VX+WdN2WjFXbSgTny0i7RtS8Cr5EqApQYAk66rFbjAkhZZZLxoQeMG2WiKpnxtv5pjgc66/ApMmsxn1adKWYdGbt6lSOjz1C3bt7UsNk/13VFCBDM05Ws+YH9ZPONIjG4l7tjOEutqyUtTqV9+kQcUygeG4vKb7Tah2H4k1sBEhsg/Jz/AKKzAxGHqLoP/vo4ZyQ8oXHdN8tnfGhjfQfbRSN5CLjaf3FliuF62kZPiYux3HyrsVs3vuKsd/iXBAm3qfXSBHcJystg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM4PR11MB5277.namprd11.prod.outlook.com (2603:10b6:5:388::23) by BN9PR11MB5500.namprd11.prod.outlook.com (2603:10b6:408:105::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.15; Fri, 11 Feb 2022 07:33:21 +0000 Received: from DM4PR11MB5277.namprd11.prod.outlook.com ([fe80::8ff:19e1:23df:426]) by DM4PR11MB5277.namprd11.prod.outlook.com ([fe80::8ff:19e1:23df:426%4]) with mapi id 15.20.4951.019; Fri, 11 Feb 2022 07:33:21 +0000 From: "Gao, Zhichao" To: "Ni, Ray" , "Rehan, MohammedX" , "devel@edk2.groups.io" , "Esakkithevar, Kathappan" , "Pethaiyan, Madhan" CC: "Thirupugal, MadhaviX" Subject: Re: [PATCH V2 1/1] ShellPkg: Fix Ping GetTimerPeriod API failure Thread-Topic: [PATCH V2 1/1] ShellPkg: Fix Ping GetTimerPeriod API failure Thread-Index: AQHYHxkFNyZp6pgOBEeFjexZxLqdUqyN9DEQ Date: Fri, 11 Feb 2022 07:33:21 +0000 Message-ID: References: <12a69cc925bcd95320cf9a62c88f961b13203bf2.1644475548.git.mohammedx.rehan@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 312f0faa-68bc-40ac-f771-08d9ed30c78e x-ms-traffictypediagnostic: BN9PR11MB5500:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:983; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6jw5yWA5D/oLy/FXJ5F4O6oyFeG5UnkR9gC0POH02TI0cDFY/pMhiTNdYmowrp/h0EVV7dpcuNVzDKnBDmeeyxgMnL7bXk6viy9izSlFuZ8KBBQcLDYTpBO6tne9MgN8yfDlbLnoHKl+2cqVtzM3hVn/BNIYVNWG6Vmh1+UTRalM5Jvg/1g0AddpJH6MXCkqQBd4GwHYFAWb4MD697SeszLhbxLu2EHao9Gt2vJsiFurLF9mvBtx4m8FuQsf0E+JMbUFRv8HMsBcrkW1658ymIzVtzdgWKGaVOYJRtcvBLyX2l+1sVlKBnidG732k2PYZgmiSFDt8eInDSvI1UbhgaTj4QUx5ciPnIVJLi5ioB+CyxWScwimRgHMfRa5Zk0DVwSIrgejhS0fePXMpHVkF7e7ixSKOEgQTNZMHxvJmBF4oNTA8S6hS0CaXcZB+gzEVmgr/BbnZVfq7w0hbYqSGd89KRoy2wTeZ2CmJANPxvyMblZtTWDlTY2f/LkWOOtnJb4Fttt3trXkpKFFWXeg40Xh0LZ1f/VRZmQNm1/VvyaU18syohb8E8PoFffwZRFuL4E7PQA9EIrTrBIIkbyVeuiu20bkE488dep/XsPhrVS7T6PEbMC3X4v+eZYAtzkRD/aVEIn+pcZxXr5McLbQRHhqrT0tlCUgT55vFKlM3X1qWC5VD/QhEARZ8hhlvWple3p2qQuPvq2i2BqMZzsZfXLjYkcPLihYywEM5aGER1fo/r8PTUTv4XsUyKuvc68b0pIu/E3BKDgiGKY4Iqhz0HD3AC6YearJFLpW3bmS4wY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB5277.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(66556008)(66446008)(64756008)(66476007)(508600001)(6506007)(8936002)(4326008)(76116006)(66946007)(186003)(966005)(2906002)(33656002)(71200400001)(86362001)(83380400001)(26005)(52536014)(107886003)(316002)(110136005)(53546011)(7696005)(55016003)(38070700005)(5660300002)(9686003)(38100700002)(122000001)(8676002)(6636002)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xt12gXMgLnm7UsDCl2XvJ0ltjxdcJBzjKmwr2J56rSwQxzZCc4bX+qWhhbsp?= =?us-ascii?Q?iUzffzPpA/eTN3dh0CvV3EZguxwNi63bj7FojeE15fIHzjKgi7FZBGkQ5fdK?= =?us-ascii?Q?lxXKzdAZI/yo+PP8N60lqdzeTiiPhvs9ksK2y02Kytkyjv1NtlFw61gTdSoh?= =?us-ascii?Q?wkFVAFSszfSs6fy9MRbcF9FD6n+tfINl8uH9+xc34sFZ/9pH1qMsJ+/1VCNz?= =?us-ascii?Q?fUraYlqCpwh0WauMx41CLgdHQAXmnepOFJmEUNsmF1X4KokJO5eexRMSN94E?= =?us-ascii?Q?jwg0ecaOyvmp4/kZKDu2SPlQ3nxqVVybtc6MOAThkH63qL3YLa0ce4TTEQ7Y?= =?us-ascii?Q?73RuciSEH9hP8I8aEb/UU07tzcAwTjqeXLPnVHFVq3Byuv6scC8L0UEZgx6U?= =?us-ascii?Q?Dqjs+Hjd8angNlfzLH3F/GOg2peIt6Wfs57m0o71LSDegr9sQBHcsE2M/I5M?= =?us-ascii?Q?CYjarJhPh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?= =?us-ascii?Q?6LDmktZYgoFB/csNG/ruCqSbTCQVolHpc7Xs/0+blMLG6A584xH1d68Wy2Ao?= =?us-ascii?Q?bIXiHZnMVuHRV0e5twviXiBdfkcWL21Qo5DtJ3JeWF2lYKaXNza3J0OuGs/k?= =?us-ascii?Q?L3b6C+qg2Xkfzjnk/Fj1OR1XLIjnbUvlRLEtkbHvVA1UX8sp78koYWKZgs01?= =?us-ascii?Q?ZDLeEIsEt33sCeTdkOx4I3anUWbnZUyWcr1TRDb+7o1XneZddRl+8jvFEcqc?= =?us-ascii?Q?YbGKsS+eMcbih9mb0JuYtP4=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5277.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 312f0faa-68bc-40ac-f771-08d9ed30c78e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Feb 2022 07:33:21.0790 (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: MC867H+MKMr92O1wwL9Q002Dy4n16NyJwg91yccg5Yei6BhpZYxYBbBtHt0q0b+TwLZ2mZY7oL113J9tGbq4ZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5500 Return-Path: zhichao.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Ni, Ray > Sent: Friday, February 11, 2022 3:29 PM > To: Rehan, MohammedX ; > devel@edk2.groups.io; Esakkithevar, Kathappan > ; Gao, Zhichao > ; Pethaiyan, Madhan > > Cc: Thirupugal, MadhaviX > Subject: RE: [PATCH V2 1/1] ShellPkg: Fix Ping GetTimerPeriod API failure >=20 > Reviewed-by: Ray Ni >=20 > -----Original Message----- > From: Rehan, MohammedX > Sent: Thursday, February 10, 2022 2:51 PM > To: devel@edk2.groups.io; Esakkithevar, Kathappan > ; Gao, Zhichao > ; Ni, Ray ; Pethaiyan, Madhan > > Cc: Thirupugal, MadhaviX ; Rehan, > MohammedX > Subject: [PATCH V2 1/1] ShellPkg: Fix Ping GetTimerPeriod API failure >=20 > [edk2-devel] [Patch V2 1/1] Please remove the patch version info in the commit message. > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3819 >=20 > Ping GetTimerPeriod API returns sometime zero value when StallCounter has > smaller value than RttTimerTick (divide by zero) which results some failu= re at > ping UEFI shell command >=20 > Signed-off-by: MohammedX Rehan > Change-Id: I4458577c921b3748102da385d2f48a21680f5687 > Signed-off-by: MohammedX Rehan Please remove the Change-Id and duplicated Signed-off-by. Others look OK to me. Thanks, Zhichao > --- > ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c > b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c > index ec1e0a188b..6a002b15e5 100644 > --- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c > +++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c > @@ -259,9 +259,11 @@ GetTimerPeriod ( > EFI_EVENT TimerEvent; >=20 > UINT32 StallCounter; >=20 > EFI_TPL OldTpl; >=20 > + UINT32 TimerPeriod; >=20 >=20 >=20 > RttTimerTick =3D 0; >=20 > StallCounter =3D 0; >=20 > + TimerPeriod =3D 0; >=20 >=20 >=20 > Status =3D gBS->CreateEvent ( >=20 > EVT_TIMER | EVT_NOTIFY_SIGNAL, >=20 > @@ -295,7 +297,12 @@ GetTimerPeriod ( > gBS->SetTimer (TimerEvent, TimerCancel, 0); >=20 > gBS->CloseEvent (TimerEvent); >=20 >=20 >=20 > - return StallCounter / RttTimerTick; >=20 > + TimerPeriod =3D StallCounter / RttTimerTick; >=20 > + if (TimerPeriod !=3D 0) { >=20 > + return TimerPeriod; >=20 > + } else { >=20 > + return 1; >=20 > + } >=20 > } >=20 >=20 >=20 > /** >=20 > -- > 2.30.0.windows.2