MdeModulePkg/NetworkPkg: Locate IpSec on IP packet processing only if it's installed.

Modified the logic in Ip4Dxe and Ip6Dxe to not locate EFI_IPSEC2_PROTOCOL on each
message transmit/receive. Instead, register a callback in the drivers entry points
on the IpSec protocol installation, and process only if the protocol is installed.
This speeds up the network stacks when IpSec is not installed since there is a
penalty associated with searching the entire handle database on each packet processing.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18365 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Samer El-Haj-Mahmoud
2015-08-31 07:44:12 +00:00
committed by sfu5
parent 34297cef1e
commit c79de074b6
6 changed files with 92 additions and 0 deletions

View File

@@ -2,6 +2,8 @@
IP4 input process.
Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -512,6 +514,11 @@ Ip4IpSecProcessPacket (
IP4_HEAD ZeroHead;
Status = EFI_SUCCESS;
if (!mIpSec2Installed) {
goto ON_EXIT;
}
Packet = *Netbuf;
RecycleEvent = NULL;
IpSecWrap = NULL;