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.20; helo=mga02.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 467762034D8C1 for ; Thu, 22 Feb 2018 00:26:57 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2018 00:32:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,377,1515484800"; d="scan'208";a="32680095" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.13]) ([10.239.9.13]) by fmsmga001.fm.intel.com with ESMTP; 22 Feb 2018 00:32:56 -0800 To: Meenakshi Aggarwal , "Carsey, Jaben" , "edk2-devel@lists.01.org" , "lersek@redhat.com" References: <1518770711-6331-1-git-send-email-meenakshi.aggarwal@nxp.com> From: "Ni, Ruiyu" Message-ID: <246c3714-d6b9-9ae7-5e66-13192931d824@Intel.com> Date: Thu, 22 Feb 2018 16:32:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [RFC] ShellPkg/Ping: fix loss of first packet X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2018 08:26:57 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 2/20/2018 2:18 PM, Meenakshi Aggarwal wrote: > Hi Ray, > > Please share your comments. > > > Thanks, > Meenakshi > >> -----Original Message----- >> From: Carsey, Jaben [mailto:jaben.carsey@intel.com] >> Sent: Friday, February 16, 2018 8:51 PM >> To: Meenakshi Aggarwal ; Ni, Ruiyu >> ; edk2-devel@lists.01.org; lersek@redhat.com >> Subject: RE: [edk2] [RFC] ShellPkg/Ping: fix loss of first packet >> >> Seems good to me. I will let Ray review also. >> >> Reviewed-by: Jaben Carsey >> >>> -----Original Message----- >>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >>> Meenakshi >>> Sent: Friday, February 16, 2018 12:45 AM >>> To: Ni, Ruiyu ; Carsey, Jaben >>> ; edk2-devel@lists.01.org; lersek@redhat.com >>> Subject: [edk2] [RFC] ShellPkg/Ping: fix loss of first packet >>> Importance: High >>> >>> From: Meenakshi Aggarwal >>> >>> Issue: >>> Reply for first ping packet was getting dropped. >>> >>> Cause: >>> Sometimes reply message comes even before trasmit >>> function returns, hence missing 1st reply >>> >>> Fix: >>> Prepare the TxList before calling Transmit function. >>> >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> Signed-off-by: Meenakshi Aggarwal >>> --- >>> ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c | 5 ++++- >>> 1 file changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c >>> b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c >>> index bec9535..46ba701 100644 >>> --- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c >>> +++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c >>> @@ -784,14 +784,17 @@ PingSendEchoRequest ( >>> } >>> >>> ASSERT(Private->ProtocolPointers.Transmit != NULL); >>> + >>> + InsertTailList (&Private->TxList, &TxInfo->Link); >>> + >>> Status = Private->ProtocolPointers.Transmit (Private->IpProtocol, TxInfo- >>>> Token); >>> >>> if (EFI_ERROR (Status)) { >>> + RemoveEntryList (&TxInfo->Link); >>> PingDestroyTxInfo (TxInfo, Private->IpChoice); >>> return Status; >>> } >>> >>> - InsertTailList (&Private->TxList, &TxInfo->Link); >>> Private->TxCount++; >>> >>> return EFI_SUCCESS; >>> -- >>> 1.9.1 >>> >>> _______________________________________________ >>> edk2-devel mailing list >>> edk2-devel@lists.01.org >>> >> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist >> s.01.org%2Fmailman%2Flistinfo%2Fedk2- >> devel&data=02%7C01%7Cmeenakshi.aggarwal%40nxp.com%7C1d7bd63786b >> 044ba3c9508d57550d50a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0 >> %7C636543912439710731&sdata=Bn%2Febt4emmCvayFNmcKCi3xJuFfV52Vq >> 4aQLVSNNti8%3D&reserved=0 Reviewed-by: Ruiyu Ni -- Thanks, Ray