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.77; 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-db5eur01on0077.outbound.protection.outlook.com [104.47.2.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0A2982243693C for ; Fri, 23 Feb 2018 01:51:12 -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=cn7hC6r9/KLEj+yGfceq5+kD6EpTcEQ7Em946IBIGsM=; b=i3ttrTjP/m4PC7TaMQSxVm17YLK3xXJ6WqIUZU/+pamOeBqo9PAgV1OjxV0EATdYOsgP675JfncI05WhSr8LpsH9uzfWxOtoZyC4OoCWgYkLvhX3t6xw3ZSuNOoBEEvrt1x1I+zeiaOTUA4hse9ODc6L1yFlR2dTXOXYNC2nlZ0= Received: from DB5PR04MB0998.eurprd04.prod.outlook.com (10.161.199.12) by DB5PR04MB1574.eurprd04.prod.outlook.com (10.164.38.140) 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 09:57:11 +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 09:57:11 +0000 From: Meenakshi Aggarwal To: "Ni, Ruiyu" , "Carsey, Jaben" , "edk2-devel@lists.01.org" , "lersek@redhat.com" Thread-Topic: [edk2] [RFC] ShellPkg/Ping: fix loss of first packet Thread-Index: AQHTpwKde2ea7B+3PEqcMAbbAPMIU6OnJVqAgAWx0uCAA0pHgIABqYGA Date: Fri, 23 Feb 2018 09:57:11 +0000 Message-ID: References: <1518770711-6331-1-git-send-email-meenakshi.aggarwal@nxp.com> <246c3714-d6b9-9ae7-5e66-13192931d824@Intel.com> In-Reply-To: <246c3714-d6b9-9ae7-5e66-13192931d824@Intel.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [180.188.246.227] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR04MB1574; 7:7KS3W8SqaytRbv8utoEfhDxqV2DaUlHE5OOk5+SOgX5spwVRa1NZqtHa5ABjc3qjtA+OPvz6fPxaOistB+IkKYdhZ3aRlVwWKE62gXBitYHIL2YZSva1Cn5efyoCFF+OMeeeZ/YG2np3lIEn1UG6WtlBKLc1wfpy/0CMVRmiYD0mO9IyXb1Q9lmMApVO3KdrqemK37mKErd2BEZs9EnCSLcX2Zw0oukiioSQ0BXgacVsBil3dzOYbsbpV163Byvw x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 93e48571-7d20-40a4-2258-08d57aa3cf44 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:DB5PR04MB1574; x-ms-traffictypediagnostic: DB5PR04MB1574: 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)(3231183)(944501161)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:DB5PR04MB1574; BCL:0; PCL:0; RULEID:; SRVR:DB5PR04MB1574; x-forefront-prvs: 0592A9FDE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(346002)(39860400002)(39380400002)(366004)(189003)(199004)(53754006)(13464003)(6306002)(59450400001)(99286004)(6506007)(2900100001)(76176011)(229853002)(8676002)(81156014)(97736004)(25786009)(3660700001)(66066001)(7696005)(8936002)(33656002)(68736007)(93886005)(2201001)(6436002)(2906002)(53546011)(966005)(53936002)(2501003)(6116002)(6346003)(81166006)(6246003)(478600001)(5660300001)(2950100002)(86362001)(45080400002)(3846002)(9686003)(74316002)(7736002)(3280700002)(26005)(102836004)(5250100002)(316002)(305945005)(105586002)(55016002)(186003)(110136005)(106356001)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB1574; H:DB5PR04MB0998.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=meenakshi.aggarwal@nxp.com; x-microsoft-antispam-message-info: BJsfeHJHNil6tYoCYy9B0MODA8eQapEzaQ6Ll39KtfISiGuTD/nIgFglquxy29YJ55HB0XUfaUSjXnwtVTaoltWKRf2w3AW6sN7iGzOHCXsho00GGvhBwfKrMWTtb9j3eTvGe8evB5JsjnBl1sS/yOMaF3BJrWxS1ThW6/xnWpU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93e48571-7d20-40a4-2258-08d57aa3cf44 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2018 09:57:11.7150 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB1574 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 09:51:13 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi All, Any comments on this patch or is it good to go? Reviewed-by: Jaben Carsey Reviewed-by: Ruiyu Ni Thanks, Meenakshi > -----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 >=20 > 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->IpProtoco= l, > 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 >=20 >=20 > -- > Thanks, > Ray