From nobody Sun May 5 14:52:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 151315026264847.965735347483474; Tue, 12 Dec 2017 23:31:02 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 883B02214E347; Tue, 12 Dec 2017 23:26:21 -0800 (PST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5491B220EE103 for ; Tue, 12 Dec 2017 23:26:20 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2017 23:30:59 -0800 Received: from sfu5-mobl.ccr.corp.intel.com ([10.239.192.226]) by FMSMGA003.fm.intel.com with ESMTP; 12 Dec 2017 23:30:58 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,397,1508828400"; d="scan'208";a="11437919" From: Fu Siyuan To: edk2-devel@lists.01.org Date: Wed, 13 Dec 2017 15:30:55 +0800 Message-Id: <20171213073055.13668-1-siyuan.fu@intel.com> X-Mailer: git-send-email 2.13.0.windows.1 Subject: [edk2] [Patch] MdeModulePkg/IpIoDxe: Update API description to match the function implementation. 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: Ye Ting , Wang Fan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch updates some API descriptions in DxeIpIoLib to match the real implementation. Cc: Ye Ting Cc: Wu Jiaxin Cc: Wang Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan Reviewed-by: Jiaxin Wu --- MdeModulePkg/Include/Library/IpIoLib.h | 4 ++++ MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 34 +++++++++++++++++++++---= ---- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Include/Library/IpIoLib.h b/MdeModulePkg/Include/= Library/IpIoLib.h index aab0c68059..ecb3f11e5c 100644 --- a/MdeModulePkg/Include/Library/IpIoLib.h +++ b/MdeModulePkg/Include/Library/IpIoLib.h @@ -385,6 +385,7 @@ IpIoStop ( successfully. @retval EFI_ACCESS_DENIED The IP_IO instance is configured; av= oid =20 reopening it. + @retval EFI_UNSUPPORTED IPv4 RawData mode is no supported. @retval Others An error condition occurred. =20 **/ @@ -416,6 +417,7 @@ IpIoOpen ( @retval EFI_SUCCESS The operation completed successfu= lly. @retval EFI_NOT_STARTED The IpIo is not configured. @retval EFI_OUT_OF_RESOURCES Failed due to resource limitation= s. + @retval Others Error condition occurred. =20 **/ EFI_STATUS @@ -541,6 +543,7 @@ IpIoFindSender ( @param[out] IsHard If TRUE, indicates that it is a hard = error. @param[out] Notify If TRUE, SockError needs to be notifi= ed. =20 + @retval EFI_UNSUPPORTED Unrecognizable ICMP error code @return The ICMP Error Status, such as EFI_NETWORK_UNREACHABLE. =20 **/ @@ -574,6 +577,7 @@ IpIoGetIcmpErrStatus ( @retval EFI_INVALID_PARAMETER The Neighbor Address is invalid. @retval EFI_NOT_FOUND The neighbor cache entry is not in th= e=20 neighbor table. =20 + @retval EFI_UNSUPPORTED IP version is IPv4, which doesn't sup= port neighbor cache refresh. @retval EFI_OUT_OF_RESOURCES Failed due to resource limitations. =20 **/ diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Li= brary/DxeIpIoLib/DxeIpIoLib.c index abc07fb0ff..c880818d42 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -129,6 +129,7 @@ IpIoTransmitHandler ( =20 @retval EFI_SUCCESS The IP child is created and the IP prot= ocol interface is retrieved. + @retval EFI_UNSUPPORTED Upsupported IpVersion. @retval Others The required operation failed. =20 **/ @@ -206,6 +207,7 @@ IpIoCreateIpChildOpenProtocol ( =20 @retval EFI_SUCCESS The IP protocol is closed and the releva= nt IP child is destroyed. + @retval EFI_UNSUPPORTED Upsupported IpVersion. @retval Others The required operation failed. =20 **/ @@ -1276,6 +1278,7 @@ ReleaseIpIo: successfully. @retval EFI_ACCESS_DENIED The IP_IO instance is configured, av= oid to=20 reopen it. + @retval EFI_UNSUPPORTED IPv4 RawData mode is no supported. @retval Others Error condition occurred. =20 **/ @@ -1488,20 +1491,28 @@ IpIoDestroy ( IN OUT IP_IO *IpIo ) { + EFI_STATUS Status; + =20 // // Stop the IpIo. // - IpIoStop (IpIo); + Status =3D IpIoStop (IpIo); + if (EFI_ERROR (Status)) { + return Status; + } =20 // // Close the IP protocol and destroy the child. // - IpIoCloseProtocolDestroyIpChild ( - IpIo->Controller, - IpIo->Image, - IpIo->ChildHandle, - IpIo->IpVersion - ); + Status =3D IpIoCloseProtocolDestroyIpChild ( + IpIo->Controller, + IpIo->Image, + IpIo->ChildHandle, + IpIo->IpVersion + ); + if (EFI_ERROR (Status)) { + return Status; + } =20 gBS->FreePool (IpIo); =20 @@ -1530,6 +1541,7 @@ IpIoDestroy ( @retval EFI_SUCCESS The operation is completed succes= sfully. @retval EFI_NOT_STARTED The IpIo is not configured. @retval EFI_OUT_OF_RESOURCES Failed due to resource limit. + @retval Others Error condition occurred. =20 **/ EFI_STATUS @@ -2044,6 +2056,7 @@ IpIoFindSender ( @param[out] IsHard If TRUE, indicates that it is a hard = error. @param[out] Notify If TRUE, SockError needs to be notifi= ed. =20 + @retval EFI_UNSUPPORTED Unrecognizable ICMP error code. @return ICMP Error Status, such as EFI_NETWORK_UNREACHABLE. =20 **/ @@ -2162,6 +2175,7 @@ IpIoGetIcmpErrStatus ( @retval EFI_INVALID_PARAMETER Neighbor Address is invalid. @retval EFI_NOT_FOUND The neighbor cache entry is not in th= e=20 neighbor table. =20 + @retval EFI_UNSUPPORTED IP version is IPv4, which doesn't sup= port neighbor cache refresh. @retval EFI_OUT_OF_RESOURCES Failed due to resource limit. =20 **/ @@ -2174,10 +2188,14 @@ IpIoRefreshNeighbor ( { EFI_IP6_PROTOCOL *Ip; =20 - if (!IpIo->IsConfigured || IpIo->IpVersion !=3D IP_VERSION_6) { + if (!IpIo->IsConfigured) { return EFI_NOT_STARTED; } =20 + if (IpIo->IpVersion !=3D IP_VERSION_6) { + return EFI_UNSUPPORTED; + } + Ip =3D IpIo->Ip.Ip6; =20 return Ip->Neighbors (Ip, FALSE, &Neighbor->v6, NULL, Timeout, TRUE); --=20 2.13.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel