From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=tzy.way.ooi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A9E9C211E2C1C for ; Thu, 21 Mar 2019 05:19:58 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2019 05:19:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,252,1549958400"; d="scan'208";a="329330750" Received: from ubuntu-twooi.png.intel.com (HELO Ubuntu-twooi) ([10.226.240.21]) by fmsmga006.fm.intel.com with SMTP; 21 Mar 2019 05:19:55 -0700 Received: by Ubuntu-twooi (sSMTP sendmail emulation); Thu, 21 Mar 2019 20:19:54 +0800 Message-ID: <6bf059810e1ec59303439513272348fb4fcb16fb.camel@intel.com> From: twooi To: Jaben Carsey , ruiyu.ni@intel.com, edk2-devel@lists.01.org Date: Thu, 21 Mar 2019 20:19:54 +0800 X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Subject: Enquiry on GetTimerPeriod function in Ping.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Mar 2019 12:19:58 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I am enabling an UEFI ethernet driver in our platform. While I tried to test the driver with ping command, I noticed that ping operation is aborted due to the GetTimerPeriod function return a value 0. In the function GetTimerPeriod in ping.c, the function will return the value of StallCounter/RttTimerTick once it completed all the operations. However, the value return in my platform is zero due to StallCounter is having smaller value than RttTimerTick. I am not sure what is the usage of GetTimerPeriod function and how it works. The GetTimerPeriod function will return 0 if any of the operation having an error during the execution. However, I suspect that this function should not return 0 when StallCounter is having less value than RttTimerTick? This is because the function actually did not encounter any error. Please correct me if I m wrong. Thank you Best regards, Tzy Way