From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.2.80; helo=eur01-db5-obe.outbound.protection.outlook.com; envelope-from=meenakshi.aggarwal@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0080.outbound.protection.outlook.com [104.47.2.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 638DB223C1762 for ; Mon, 19 Feb 2018 22:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Umcx0Ol7+5sZZ5/S64v+bhJNoFJ454/LfMBPdamj54E=; b=kz6etQLfv7p8B/SnlfPgWBgGQbVkeATNddKsj5ecZtR8Pws8dcRFnsG2OFbLIjfGBH1HeJQstGHH1hib41ouKn+5w4Ql2XEP5F9KxxPf1DdYwfWKl1TFGz+LboQ6pSHb9AbmnQCka8Nb1laFmGXY61JDVTvl+sMoorTRC/NHueQ= Received: from DB5PR04MB0998.eurprd04.prod.outlook.com (10.161.199.12) by DB5PR04MB0936.eurprd04.prod.outlook.com (10.161.195.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Tue, 20 Feb 2018 06:18:54 +0000 Received: from DB5PR04MB0998.eurprd04.prod.outlook.com ([fe80::5b4:dfb7:891f:32ce]) by DB5PR04MB0998.eurprd04.prod.outlook.com ([fe80::5b4:dfb7:891f:32ce%13]) with mapi id 15.20.0506.023; Tue, 20 Feb 2018 06:18:53 +0000 From: Meenakshi Aggarwal To: "Carsey, Jaben" , "Ni, Ruiyu" , "edk2-devel@lists.01.org" , "lersek@redhat.com" Thread-Topic: [edk2] [RFC] ShellPkg/Ping: fix loss of first packet Thread-Index: AQHTpwKde2ea7B+3PEqcMAbbAPMIU6OnJVqAgAWx0uA= Date: Tue, 20 Feb 2018 06:18:53 +0000 Message-ID: References: <1518770711-6331-1-git-send-email-meenakshi.aggarwal@nxp.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=meenakshi.aggarwal@nxp.com; x-originating-ip: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR04MB0936; 7:OgrJ/IJKHUXJbE0Ao/1S4Jga0zhNWC4WDr0vxdAr28FNv9sOxh6qD/b63vsxQBQYcZhicrGLbiSzigP3Z5Yr/iePWtUi7b1ShnwSH5dArLN2mPbpA13Y2O6iczeyxBd+t+QHHJTndMwxNZHD2SmY82G4WZmX9k6IPH6XWJJYIannpbE0JUUAMsfYW5bcbjPIFSBS9VTSLsqIK3lX3E5WaoGaaseh2opPW48RnD4FM7zdP4U7ny43VqfP09mHN2r2 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: d53659e6-fde8-468c-5a1d-08d57829d107 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:DB5PR04MB0936; x-ms-traffictypediagnostic: DB5PR04MB0936: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189930954265078)(185117386973197)(162533806227266)(45079756050767)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001056)(6040501)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231101)(944501161)(93006095)(93001095)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:DB5PR04MB0936; BCL:0; PCL:0; RULEID:; SRVR:DB5PR04MB0936; x-forefront-prvs: 05891FB07F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39380400002)(396003)(39860400002)(376002)(13464003)(199004)(189003)(305945005)(74316002)(5250100002)(2501003)(102836004)(53546011)(3280700002)(105586002)(3846002)(3660700001)(7736002)(6506007)(2906002)(59450400001)(25786009)(5660300001)(7696005)(6116002)(86362001)(76176011)(53936002)(6246003)(68736007)(2201001)(106356001)(14454004)(966005)(478600001)(2900100001)(33656002)(186003)(316002)(110136005)(99286004)(26005)(8676002)(81166006)(81156014)(9686003)(55016002)(97736004)(45080400002)(229853002)(2950100002)(66066001)(6306002)(6436002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB0936; H:DB5PR04MB0998.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ndHumsFFAWsMb5BrgKSVxJlQjQcUzzM1AGx+qPD2WQBOE1heznQQUctBUzHuDnqsLX0jfLLkrR4JYuOmnH4+xAXpiZy5BDZG/q0rpGsqbd6FOQqd4I/k/Ir9kgViRhPO2BgiBF/fv6ncww1KgWExNO90rmpl5kWZQ2r6wJ0zSvI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d53659e6-fde8-468c-5a1d-08d57829d107 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2018 06:18:53.7767 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB0936 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: Tue, 20 Feb 2018 06:13:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable 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 >=20 > Seems good to me. I will let Ray review also. >=20 > Reviewed-by: Jaben Carsey >=20 > > -----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 !=3D NULL); > > + > > + InsertTailList (&Private->TxList, &TxInfo->Link); > > + > > Status =3D 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=3Dhttps%3A%2F%2Flist > s.01.org%2Fmailman%2Flistinfo%2Fedk2- > devel&data=3D02%7C01%7Cmeenakshi.aggarwal%40nxp.com%7C1d7bd63786b > 044ba3c9508d57550d50a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0 > %7C636543912439710731&sdata=3DBn%2Febt4emmCvayFNmcKCi3xJuFfV52Vq > 4aQLVSNNti8%3D&reserved=3D0