From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.0.45; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=meenakshi.aggarwal@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00045.outbound.protection.outlook.com [40.107.0.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BA61422436929 for ; Fri, 23 Feb 2018 02:20:05 -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=KmBF49eD18FSVVVmAc7Mz2JIuxGK93fw9iSigf5VnrM=; b=dxDFtL0Wcd0LkJTKxm1v4y8hLeHyHIOn4/jO+06lwkPAX8TojrCaaxUCnprwzN/VLqqOH6fcJNLxEQfeZaPJI1eJbvADSx+cg5rIgef3/v4F9YytHX4zxy/aqlAtwQ3d7EZAvERlMNL+KVaDCCRUqTpZeluOkPpq/VSK4wetqSM= Received: from DB5PR04MB0998.eurprd04.prod.outlook.com (10.161.199.12) by DB5PR04MB2086.eurprd04.prod.outlook.com (10.166.172.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Fri, 23 Feb 2018 10:26:03 +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; Fri, 23 Feb 2018 10:26:03 +0000 From: Meenakshi Aggarwal To: Laszlo Ersek , "Ni, Ruiyu" , "Carsey, Jaben" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [RFC] ShellPkg/Ping: fix loss of first packet Thread-Index: AQHTpwKde2ea7B+3PEqcMAbbAPMIU6OnJVqAgAWx0uCAA0pHgIABqYGAgAAGIICAAAGYcA== Date: Fri, 23 Feb 2018 10:26:03 +0000 Message-ID: References: <1518770711-6331-1-git-send-email-meenakshi.aggarwal@nxp.com> <246c3714-d6b9-9ae7-5e66-13192931d824@Intel.com> <81caf724-764f-e9b5-2266-76ab6aaab8bb@redhat.com> In-Reply-To: <81caf724-764f-e9b5-2266-76ab6aaab8bb@redhat.com> 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: [180.188.246.227] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR04MB2086; 7:3Pfx/6lyo+uuLJOexmsz34Gd0AvcwG3TzO5uE2UC6SgXxYKbkOt3Dagche3UYCPOqQ+w0UC7YYI3gr8KBqMpEC1TZ1D1i+igRO1u90ob75rQ2mTnMGh1Q6DStWvOQfQ6EWlcU4DW8VTqPhPdCix6ti625jZVRgbTGdn6suFw35NWe5CDhgKwEXLf7d2aY1jij+xhivOLZ3MYIDdJ/vNB9T60PZn0tVLyMdBkAtaWc5Vedol37hRiFYoXkcIVQTds x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: eccad708-d543-4bbe-a2d2-08d57aa7d7a4 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:DB5PR04MB2086; x-ms-traffictypediagnostic: DB5PR04MB2086: 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:(8211001083)(6040501)(2401047)(5005006)(8121501046)(3231101)(944501161)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:DB5PR04MB2086; BCL:0; PCL:0; RULEID:; SRVR:DB5PR04MB2086; x-forefront-prvs: 0592A9FDE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(376002)(396003)(39380400002)(346002)(199004)(189003)(53754006)(13464003)(5660300001)(7696005)(81156014)(102836004)(55016002)(7736002)(25786009)(3846002)(305945005)(6116002)(106356001)(2900100001)(99286004)(76176011)(2906002)(53936002)(6506007)(8936002)(8676002)(2501003)(59450400001)(5250100002)(81166006)(53546011)(6246003)(97736004)(74316002)(2950100002)(26005)(316002)(45080400002)(966005)(33656002)(478600001)(14454004)(110136005)(66066001)(68736007)(6306002)(86362001)(9686003)(186003)(93886005)(3280700002)(6436002)(105586002)(229853002)(3660700001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB2086; 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: ouMpVqLtlthtXPsTkT2aB2Rj2K0VMjBKimjcWIWyS5uIsPc3mrFt89GXvOaPz1dZnP4DkD6J10x3wBTnW7KwHtwOf+RYK1oNvamoVtpzjv5VgKN3QdjWONNQ543aYL7UQpHQaTGGuo2ZpCEZR6ve7HNL1B2V+/xQEou8Rbcsko8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: eccad708-d543-4bbe-a2d2-08d57aa7d7a4 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2018 10:26:03.7248 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB2086 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: Fri, 23 Feb 2018 10:20:06 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Friday, February 23, 2018 3:48 PM > To: Meenakshi Aggarwal ; Ni, Ruiyu > ; Carsey, Jaben ; edk2- > devel@lists.01.org > Subject: Re: [edk2] [RFC] ShellPkg/Ping: fix loss of first packet >=20 > On 02/23/18 10:57, Meenakshi Aggarwal wrote: > > Hi All, > > > > Any comments on this patch or is it good to go? > > > > Reviewed-by: Jaben Carsey > > Reviewed-by: Ruiyu Ni >=20 > Are you asking for someone to commit & push the patch? >=20 I request for both, comments (if any), else please push this patch. > Laszlo >=20 > >> -----Original Message----- > >> From: Ni, Ruiyu [mailto:ruiyu.ni@Intel.com] > >> Sent: Thursday, February 22, 2018 2:03 PM > >> To: Meenakshi Aggarwal ; Carsey, Jaben > >> ; edk2-devel@lists.01.org; lersek@redhat.com > >> Subject: Re: [edk2] [RFC] ShellPkg/Ping: fix loss of first packet > >> > >> 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 !=3D NULL); > >>>>> + > >>>>> + InsertTailList (&Private->TxList, &TxInfo->Link); > >>>>> + > >>>>> Status =3D Private->ProtocolPointers.Transmit (Private->IpProto= col, > >> 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 > >> Reviewed-by: Ruiyu Ni > >> > >> > >> -- > >> Thanks, > >> Ray