From: Songpeng Li <songpeng.li@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiaxin Wu <jiaxin.wu@intel.com>, Siyuan Fu <siyuan.fu@intel.com>,
Laszlo Ersek <lersek@redhat.com>
Subject: [PATCH 2/5] NetworkPkg: IpSecDxe: Remove the redundant code.
Date: Thu, 16 Aug 2018 09:37:54 +0800 [thread overview]
Message-ID: <20180816013757.9680-3-songpeng.li@intel.com> (raw)
In-Reply-To: <20180816013757.9680-1-songpeng.li@intel.com>
The functions that are never called have been removed.
They are Ikev2OnPacketAccepted, Ikev2SaSessionOnDeleting,
Ikev2ChildSaSessionLookupByMid, Ikev2ChildSaSessionOnDeleting
and Ikev2ChildExchangeRekeySpi.
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1064
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Songpeng Li <songpeng.li@intel.com>
---
NetworkPkg/IpSecDxe/Ikev2/Payload.c | 18 -------
NetworkPkg/IpSecDxe/Ikev2/Utility.c | 76 -----------------------------
NetworkPkg/IpSecDxe/Ikev2/Utility.h | 67 -------------------------
3 files changed, 161 deletions(-)
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Payload.c b/NetworkPkg/IpSecDxe/Ikev2/Payload.c
index 218c26f934..1bb5e2e5e5 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Payload.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/Payload.c
@@ -3104,24 +3104,6 @@ ON_EXIT:
return Status;
}
-/**
- Save some useful payloads after accepting the Packet.
-
- @param[in] SessionCommon Pointer to IKEV2_SESSION_COMMON related to the operation.
- @param[in] IkePacket Pointer to received IkePacet.
- @param[in] IkeType The type used to indicate it is in IkeSa or ChildSa or Info
- exchange.
-
-**/
-VOID
-Ikev2OnPacketAccepted (
- IN IKEV2_SESSION_COMMON *SessionCommon,
- IN IKE_PACKET *IkePacket,
- IN UINT8 IkeType
- )
-{
- return;
-}
/**
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Utility.c b/NetworkPkg/IpSecDxe/Ikev2/Utility.c
index 698aba1327..0c9c929705 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Utility.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/Utility.c
@@ -290,21 +290,6 @@ Ikev2SaSessionRemove (
return NULL;
}
-/**
- Marking a SA session as on deleting.
-
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION.
-
- @retval EFI_SUCCESS Find the related SA session and marked it.
-
-**/
-EFI_STATUS
-Ikev2SaSessionOnDeleting (
- IN IKEV2_SA_SESSION *IkeSaSession
- )
-{
- return EFI_SUCCESS;
-}
/**
Free specified Seession Common. The session common would belong to a IKE SA or
@@ -659,33 +644,6 @@ Ikev2ChildSaSessionReg (
return ;
}
-/**
- Find the ChildSaSession by it's MessagId.
-
- @param[in] SaSessionList Pointer to a ChildSaSession List.
- @param[in] Mid The messageId used to search ChildSaSession.
-
- @return Pointer to IKEV2_CHILD_SA_SESSION or NULL.
-
-**/
-IKEV2_CHILD_SA_SESSION *
-Ikev2ChildSaSessionLookupByMid (
- IN LIST_ENTRY *SaSessionList,
- IN UINT32 Mid
- )
-{
- LIST_ENTRY *Entry;
- IKEV2_CHILD_SA_SESSION *ChildSaSession;
-
- NET_LIST_FOR_EACH (Entry, SaSessionList) {
- ChildSaSession = IKEV2_CHILD_SA_SESSION_BY_IKE_SA (Entry);
-
- if (ChildSaSession->MessageId == Mid) {
- return ChildSaSession;
- }
- }
- return NULL;
-}
/**
This function find the Child SA by the specified SPI.
@@ -776,22 +734,6 @@ Ikev2ChildSaSessionRemove (
return NULL;
}
-/**
- Mark a specified Child SA Session as on deleting.
-
- @param[in] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION.
-
- @retval EFI_SUCCESS Operation is successful.
-
-**/
-EFI_STATUS
-Ikev2ChildSaSessionOnDeleting (
- IN IKEV2_CHILD_SA_SESSION *ChildSaSession
- )
-{
- return EFI_SUCCESS;
-}
-
/**
Free the memory located for the specified IKEV2_CHILD_SA_SESSION.
@@ -1137,24 +1079,6 @@ Ikev2ChildSaAssociateSpdEntry (
}
-/**
- This function finds the SPI from Create Child SA Exchange Packet.
-
- @param[in] IkePacket Pointer to IKE_PACKET to be searched.
-
- @retval SPI number or 0 if it is not supported.
-
-**/
-UINT32
-Ikev2ChildExchangeRekeySpi (
- IN IKE_PACKET *IkePacket
- )
-{
- //
- // Not support yet.
- //
- return 0;
-}
/**
Validate the IKE header of received IKE packet.
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Utility.h b/NetworkPkg/IpSecDxe/Ikev2/Utility.h
index 8383ff8dd6..79def7740d 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Utility.h
+++ b/NetworkPkg/IpSecDxe/Ikev2/Utility.h
@@ -104,19 +104,6 @@ Ikev2SaSessionRemove (
);
-/**
- Marking a SA session as on deleting.
-
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION.
-
- @retval EFI_SUCCESS Find the related SA session and marked it.
-
-**/
-EFI_STATUS
-Ikev2SaSessionOnDeleting (
- IN IKEV2_SA_SESSION *IkeSaSession
- );
-
/**
After IKE/Child SA is estiblished, close the time event and free sent packet.
@@ -211,20 +198,6 @@ Ikev2ChildSaSessionLookupBySpi (
IN UINT32 Spi
);
-/**
- Find the ChildSaSession by it's MessagId.
-
- @param[in] SaSessionList Pointer to a ChildSaSession List.
- @param[in] Mid The messageId used to search ChildSaSession.
-
- @return Pointer to IKEV2_CHILD_SA_SESSION.
-
-**/
-IKEV2_CHILD_SA_SESSION *
-Ikev2ChildSaSessionLookupByMid (
- IN LIST_ENTRY *SaSessionList,
- IN UINT32 Mid
- );
/**
Insert a Child SA Session into the specified ChildSa list..
@@ -257,18 +230,6 @@ Ikev2ChildSaSessionRemove (
IN UINT8 ListType
);
-/**
- Mark a specified Child SA Session as on deleting.
-
- @param[in] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION.
-
- @retval EFI_SUCCESS Operation is successful.
-
-**/
-EFI_STATUS
-Ikev2ChildSaSessionOnDeleting (
- IN IKEV2_CHILD_SA_SESSION *ChildSaSession
- );
/**
Free the memory located for the specified IKEV2_CHILD_SA_SESSION.
@@ -328,19 +289,6 @@ Ikev2ChildExchangeRequestType(
IN IKE_PACKET *IkePacket
);
-/**
- This function finds the SPI from Create Child Sa Exchange Packet.
-
- @param[in] IkePacket Pointer to IKE_PACKET to be searched.
-
- @retval SPI number.
-
-**/
-UINT32
-Ikev2ChildExchangeRekeySpi(
- IN IKE_PACKET *IkePacket
- );
-
/**
Associate a SPD selector to the Child SA Session.
@@ -882,21 +830,6 @@ Ikev2DecodePacket (
IN UINTN IkeType
);
-/**
- Save some useful payloads after accepting the Packet.
-
- @param[in] SessionCommon Pointer to IKEV2_SESSION_COMMON related to the operation.
- @param[in] IkePacket Pointer to received IkePacet.
- @param[in] IkeType The type used to indicate it is in IkeSa or ChildSa or Info
- exchange.
-
-**/
-VOID
-Ikev2OnPacketAccepted (
- IN IKEV2_SESSION_COMMON *SessionCommon,
- IN IKE_PACKET *IkePacket,
- IN UINT8 IkeType
- );
/**
Send out IKEV2 packet.
--
2.18.0.windows.1
next prev parent reply other threads:[~2018-08-16 1:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 1:37 [PATCH 0/5] NetworkPkg: Remove the redundant code and definition Songpeng Li
2018-08-16 1:37 ` [PATCH 1/5] NetworkPkg: IScsiDxe: " Songpeng Li
2018-08-16 19:15 ` Laszlo Ersek
2018-08-16 1:37 ` Songpeng Li [this message]
2018-08-16 1:37 ` [PATCH 3/5] NetworkPkg: TcpDxe: Remove the redundant code Songpeng Li
2018-08-16 19:17 ` Laszlo Ersek
2018-08-16 1:37 ` [PATCH 4/5] NetworkPkg: TlsDxe: Remove the redundant definition Songpeng Li
2018-08-16 19:26 ` Laszlo Ersek
2018-08-17 1:36 ` Li, Songpeng
2018-08-17 11:00 ` Laszlo Ersek
2018-08-16 1:37 ` [PATCH 5/5] NetworkPkg: UefiPxeBcDxe: Remove the redundant code Songpeng Li
2018-08-16 19:28 ` Laszlo Ersek
2018-08-23 8:25 ` [PATCH 0/5] NetworkPkg: Remove the redundant code and definition Wu, Jiaxin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180816013757.9680-3-songpeng.li@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox