From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.1.61; helo=eur01-ve1-obe.outbound.protection.outlook.com; envelope-from=meenakshi.aggarwal@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0061.outbound.protection.outlook.com [104.47.1.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 10B7E223230CB for ; Fri, 16 Feb 2018 00:40:27 -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=0IhmG+1QW1rJKKWLP48l9ILJMjoM8aza9IVwCLvB2Bs=; b=pvj6MXKmKpOckODl53pk+du0WkCaIcAcXaNkRVQdwLPRXVRLJLZ8+MC+caYVH3697UICEJoX2aHYfPZodqW6A6jofGMVivUJwN4S0FDB/+hOg4LrOtxxXiK6C6TdsIvVOYvfpHHYQ/O698Pplka35mWulEHAjfXqN9mGpw2hz44= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=meenakshi.aggarwal@nxp.com; Received: from idcbfarm.ap.freescale.net (192.88.169.1) by DB5PR04MB0998.eurprd04.prod.outlook.com (2a01:111:e400:510b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Fri, 16 Feb 2018 08:46:14 +0000 From: Meenakshi To: ruiyu.ni@intel.com, jaben.carsey@intel.com, edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 16 Feb 2018 14:15:11 +0530 Message-Id: <1518770711-6331-1-git-send-email-meenakshi.aggarwal@nxp.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: SG2PR06CA0099.apcprd06.prod.outlook.com (2603:1096:3:14::25) To DB5PR04MB0998.eurprd04.prod.outlook.com (2a01:111:e400:510b::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a0405508-6b00-4cd1-7376-08d57519bd9c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:DB5PR04MB0998; X-Microsoft-Exchange-Diagnostics: 1; DB5PR04MB0998; 3:R4f0Iht/xLpy1/r1e1SUqsWnHmtXyQ3GFNulVG26mOjg0dpvPR/o4bSkA/eLgktErBKs/sJNUdcJc2aimKSdQ1rAH/hUlAi8EyvpoyaNiQShVd8L/S9hp7XaqSQBcZYk46+iGyKybD9r3pewvlFpeR3H3Wv+NcQ4pWtfT2n8xVZ81TwrFGS84C5GWh0rRZAgqv4qe6Ruc9/W+w9duMTRwj9Sc3QDK5nV3nEdg/vljqU7Td4jiYexOeShjPy+KNuN; 25:BcAhwb19hLr7Eik50OutcLciTuQS6L8Vrv7tWwJzba85zweq9T05xZhh+5TNWJB9KU8bh4r4eGaqUTumlb/F9XXuhNT6JzVILOsPECd1xNtZL6iU5q/gYNSxYVCK+oS4VIHEiPppLcBgO43gD0Ht7NqaVQayA6XIRq4i5xDMow30rHhXZE0sXLKv48hA9B9vPoAtOh6cKhWYI80+dG7ViDH4glgrhg1Ei40Cl9EoVmAJHo9f/PU1sAXn8qiKKsMcD4xXmewL0IWTk1vCBpnSWW51JgZKGkSYFakBg2ks4wrFYhuX/vOO9GPe2BuF4sAmOp6HCQCpdOgh+U3zZwTdZQ==; 31:dgy/IH2bvWBdA4CblUZyTy7l61KsgyJwcdHwiQZsMh7h/tFAjRT1dbf+NcurPN4MqeKgaRkpp05zw573aqVGjeap5t73gxCRGPgM6kqSO2Bh0LHKR1en2cf6Z2fmLEXWOJ4FehHrxzNTR7v0NBE5Wxu82Jbt/zYKOpT8SKUM+vLrWo1WY2lKa3iEgy8vnQ2YjVCWRQIcuxl4iKX77DkzQmPktx6kbc2DPj16VKX6FoY= X-MS-TrafficTypeDiagnostic: DB5PR04MB0998: X-Microsoft-Exchange-Diagnostics: 1; DB5PR04MB0998; 20:WH028TpkhvEpRDUNbeRI9U4CXFzk838dqOwaNtwILuxu+7IjtwkY6/Ac/7qxaRgWYzLF3qDng92XX9KEX1hZ5CCDKcthXkXC3r/QBhfRvVOgirsNBj5ySKf6ayWHJLcJ0RVZwf2QlKBznQxgILBHYailJ6SlwZXxPYKhs5m1dw3Ru+UfG958TyenAh7TBMdaPIyM8WeTb7OTTZjDUjABd4hVUA/zCcY92af8ymbfKwtob8TVgb8ypGcUiygACKxVGv/P+SJoydl5V41m+JDgmOJIKjjTpuEIPcGLoK9rbNHbgshD0KzshyV+vSCxHo0nCcEXAZ0Mh60HsZaKW9esBiHI2D6Erdg8JO4C/17W7uKPx3KhLQns//ilOb9dmJnpP5quzQyH5T7hnQ2SINM/pSAeTPEMeXh+VPFi2vs4zft8IaLpzZ0reJgpPN8WHrgk6qxmklA1Xsg6DvYtNeTnuJjPESGm2DniWqQoS7vAbIKTbwFgHCBTq/sEGWIvpUZo; 4:JOGTaOeo3EjUVKSLFQQgbGzKoFKzY2cThRJp2o7x+C9mmLdUeKLByg6Pa2w9UZWyYWkQMYiJeCn741Mz49bvydyklgjZTEhMA+vdNA2vFNOMSNUHtyUe8cDkKyAGx5lphmKkzaukkwoRg34QBfhPFSJwmxITlwcdLToBFcc1qHjra2o1LxYcRLoKSepZqWllTsTTkfcT0UtzF0op3CZ+ZblNtI/Nub/dGZtQbzvZG4DkZ5vMYVqfo1xbQcqdEejgYu3EP/27wPVQ3nmKDx4WO6zXPUkXVrvUpukZ9VHBb00WAhbSmhKSQ5EoLSZotp7j X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3231101)(944501161)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:DB5PR04MB0998; BCL:0; PCL:0; RULEID:; SRVR:DB5PR04MB0998; X-Forefront-PRVS: 0585417D7B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(346002)(376002)(39380400002)(39860400002)(189003)(199004)(106356001)(86362001)(52116002)(25786009)(97736004)(51416003)(47776003)(50466002)(16526019)(305945005)(4326008)(7736002)(48376002)(186003)(81156014)(66066001)(81166006)(2906002)(3846002)(50226002)(105586002)(8936002)(6666003)(5660300001)(6116002)(59450400001)(36756003)(16586007)(478600001)(6506007)(26005)(68736007)(8676002)(53936002)(316002)(386003)(6486002)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB0998; H:idcbfarm.ap.freescale.net; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR04MB0998; 23:RQn2B6lDIkyKL51gQsQEaUOdMJxMJmpV7qPJiH0fh?= =?us-ascii?Q?WaluVZAFyKMsjhECA6D4SaIDa87ZBOJtcZ2WvRJSItvdjQuDP5LWRWaYXXA6?= =?us-ascii?Q?5nn/lNSbdGSBPBxM4oeiUygr7LJLXlOmKWUZ+XnuYc2l29B+ZPNkrOaJZ3ws?= =?us-ascii?Q?8U0RS3IC3M/0Iw9MibXEMFDJ6WZ1zLQHvJFlDFNScJ6pgk9ZbUAhWHB59rxL?= =?us-ascii?Q?zdsoyIczbFqQtfra/jNHqkADFBynMH3O+WHELXQl07HIdPu6N/jFF682ozGF?= =?us-ascii?Q?GRejiWuONMpDRYXTD0LDN8fjyx4CKQQx8MOhOJy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YStswbqFWWrRYVB6c9FGPi0lo7iNiQSgkZcsd5Rmpxtn6QZaeN4F80mW++GGJSdWPzvvGlGWRtw7K2SGDde7IHw07FdZISrG8BGX7aHXBGiZQsk2WhqQlI8zHXjUp3cWDPvCi0q02VGE0vHVqKPWqcxtqzzlFDTbcT6kEYRxsYMNfyoBty29sPsXSObWjc2y51lpYPLVFH/Vqcxjj0Ql3XHSgoH5ABi0nAiaivrLkkKJtie7xb+BSsE97qpb8CSZUQWC/h3E=; 5:RSxyn9RTj598J22wBRMB6qrIU7Ei436JGXeomXKxvCSeIgnvnX9bQ2/R8ONlTZcAAqPAk+C3Dnfe8DVHPcYWMWovds0CpCgZAmjoFay1BnpPzzvK30o0WJbLyfCsSPbOatzNGhw602Az0Hv1vEqs2wETyNg56czmvOw1aa7rDKg=; 24:lwoaR6LV+Qg1O5NSS3EWH6jQRfelk86gC6eyTuS3F4hCPteT56KEd/ek7DKoBGesmQ8plUaHreyAXW42CiC96zLJ5VAqz5oUOehMtdn6Qq0=; 7:72kmfOrWcTQk5OVD9eP582SxFCbXrxFSWlV+kvkDhIInnpM+Y6azU+JG6EmUNJcOtr7ROFqoQoQpQ4nFzn9ZjdkdWfYdle5DwCAPEQDr6z1Tj+8OIE+fNM1RbFJkcvnHznuM8L10qG0vTqdGPK46ONiFCpSs2mF5rmbDGSiXNLN7XDGClmnV1p1koTxjai7JT6l/TO/JaYuIYf24h3zbU5KwrN5euThGkAwbeMDoY9xQFdq/ppVvO0eU8YRFYFPE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2018 08:46:14.0447 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0405508-6b00-4cd1-7376-08d57519bd9c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB0998 Subject: [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, 16 Feb 2018 08:40:29 -0000 Content-Type: text/plain 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