From patchwork Thu Dec 7 04:06:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 120917 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7886510qgn; Wed, 6 Dec 2017 20:07:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMb9kVlXOAF9LTy9CxiO/8TqZFd/aEcXEqtGiH2/+s9n2MMDUN/UDaUJEcN0+h9qACnX78ia X-Received: by 10.84.248.145 with SMTP id q17mr23694534pll.416.1512619640626; Wed, 06 Dec 2017 20:07:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512619640; cv=none; d=google.com; s=arc-20160816; b=JWeGSo0u7xAyXQrcdrji41MmAbpCTivxlJIDvuK8OMyyQDHR/DKUc5B88XTZrE2ONB g4UCv5roqCYyBNrjA2fzz9Vm3t2DnuBUila53eU94LT1zSVzFWlEigvTcuOW3NuUXagx 5LuD8GkxAp3hXKARZXJToIdL8Z2aMl/AsReJMtDgWJVOVSMCzBt2BIZMqonaLoh+AMyt jkjql+v4C522ptSelao5HCW5ypHy66XtMr71pduwrywWiSinLCR47pyYrEsOoe9mTBKz oiZuYTjKSISVSGT66M+MFlDK18ya8V3DNEQ3pliROC/Ccne5JMv24sQxB2Gx7Mp68wPd NfLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:user-agent:content-disposition:mime-version :message-id:to:from:date:dkim-signature:delivered-to :arc-authentication-results; bh=fv2M1L94yxReK6l3+rkxv5yNbN4Jw/GtBOnDa1HlJwQ=; b=Y1jgvAbI6CY9hbzm4B56oXp6NSG7SYzipYsS0i3RPb5RMiuPTFnd0aN3p5Ue42YVtI QgrjK/3mJM3VdeKAOCNUQYVZevH9TYIAuI9gNu92XljLOo3w/UhnIkVy0NtXfCxDjpTx AnW30eH4wD2UvTkSxU8fHhmU+KxncHI3qSWQDHyDcIofp9X6VmvW/EnQiJ28t5qUEQDb Asb9Y67dQsq1wacljq9O5fnLnhuLdUGS0kYy1nYiT4ppC/xBzfSrznUYMKdeTkCmzqnf w5uBAuizZTDPcfLZ9gLx5/Lgued1W5rcjyIwzVuSCn+TR6qsrjPkUHEuLr+3PILR7K1J n6Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cWKMbg/3; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id e29si2762666pga.132.2017.12.06.20.07.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 20:07:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cWKMbg/3; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E47732218E93B; Wed, 6 Dec 2017 20:02:46 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c00::242; helo=mail-pf0-x242.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C34312218E921 for ; Wed, 6 Dec 2017 20:02:45 -0800 (PST) Received: by mail-pf0-x242.google.com with SMTP id u25so3729188pfg.5 for ; Wed, 06 Dec 2017 20:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=72158Jdvg/3/EGzlfkR42WTr65hYxfpy2/yvfLK19HY=; b=cWKMbg/3nC0E4IKsAXBhjGdcZA+6ABiU45VzYJKVdUG3rvJxLftR8DUvWKuWfUikOD wnsgvP5wQrx3G0f9OmmKpNHrwr6bPeg9tJSTKZBAoTXB5SWp/1IZWVkQcxQHvLE8Dywg fo7kqqOvsTKH0le4v1NyH/urpX4/F0tqFCu/c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=72158Jdvg/3/EGzlfkR42WTr65hYxfpy2/yvfLK19HY=; b=DW3c/1RWLdD+QBEYfRGNp7gBCJGaWbTB80ZWTNZE+nsdekK1cv2mX6gwuOYI7jbP1S J7OE7g9i3pnlnuuChHnBmtp+YwEZnhiLHrw8qZXNG7+oxubLMRvepLhv1FW9YCBTKrZz O+c9ITQiRZ3TCulVE1+NDvzMUgNw0zJ/PfRbdcu4wDlEFJ+vvbPZNbzCqjHxciYI4z5c 5xnfodiu5aQJuED5KBHdYWmA6OI5h9shlkt3IiY608b/jsFRDNA8CScAucfcB81O85wO /140dG1UxlZjSy/bx+K3Q/GS0Jeo/WZkzaaWmuy0U3xMo2/spONAfq3CEwpAurEvVxLK 39Qg== X-Gm-Message-State: AJaThX4ONoVxFjWAfPSmeupG3rnBcBV5+3c7WdilBViQLirfNQCGoqAW INf9n3SWe72s/4Cw6A4WcYsq4ReHXLA= X-Received: by 10.159.247.198 with SMTP id v6mr23701795plz.265.1512619637760; Wed, 06 Dec 2017 20:07:17 -0800 (PST) Received: from SZX1000114654 ([45.56.155.36]) by smtp.gmail.com with ESMTPSA id 67sm5457892pgg.50.2017.12.06.20.07.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 20:07:17 -0800 (PST) Date: Thu, 7 Dec 2017 12:06:50 +0800 From: Guo Heyi To: "edk2-devel@lists.01.org" Message-ID: <20171207040650.GA62959@SZX1000114654> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Subject: [edk2] MdeModulePkg/UefiPxeBcDxe: Question about IcmpErrorListenHandler in PxeBcImpl.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Siyuan Fu , Jiaxin Wu , Eric Dong , Star Zeng Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Hi folks, In PxeBcImpl.c, we have IcmpErrorListenHandler which seems to process ICMP errors. But in EfiPxeBcStart function, we can see Private->IcmpErrorRcvToken.Event is only a common event and Ip4->Receive is called to receive IP4 packets. So will IcmpErrorListenHandler receive all IP4 packets belonging to this network interface, or will it only receive ICMP error packets? If it is the latter situation, how do we make it? The background of this question is that when we flush the network with deprecated ICMP packets (type 15, 16, ...), RxData will not be recycled and the list of UEFI events becomes longer and longer, which finally impacts system performance a lot. If only error ICMP will be received by IcmpErrorListenHandler, we'd like to patch it as below: We tested and it worked, but we are still not sure whether it will impact other code in the network stack. Please let me know your comments. Thanks, Gary (Heyi Guo) _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c index 6d4f33f..f74b264 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c @@ -216,8 +216,6 @@ IcmpErrorListenHandlerDpc ( CopiedPointer += CopiedLen; } - goto Resume; - CleanUp: gBS->SignalEvent (RxData->RecycleSignal);