diff options
author | Fu Siyuan <siyuan.fu@intel.com> | 2015-09-14 09:06:26 +0000 |
---|---|---|
committer | sfu5 <sfu5@Edk2> | 2015-09-14 09:06:26 +0000 |
commit | 49c9f74cc1bd967ea042bcfc948c849207fa71bf (patch) | |
tree | e9766c1f606789cdd96721f0def325c3534b5884 /NetworkPkg/HttpDxe/HttpProto.c | |
parent | ccb71333c2d3af870dee201274271397ed92c5e1 (diff) | |
download | edk2-platforms-49c9f74cc1bd967ea042bcfc948c849207fa71bf.tar.xz |
NetworkPkg: Update Http driver to use DPC mechanism.
This patch updates the HttpDxe driver to use the DPC mechanism to avoid long
time delay when single event.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18451 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpProto.c')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpProto.c | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 9b06e24bed..8fbd454110 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -38,20 +38,18 @@ HttpCommonNotify ( /**
The notify function associated with TxToken for Tcp4->Transmit().
- @param[in] Event The event signaled.
@param[in] Context The context.
**/
VOID
EFIAPI
-HttpTcpTransmitNotify (
- IN EFI_EVENT Event,
+HttpTcpTransmitNotifyDpc (
IN VOID *Context
)
{
HTTP_TOKEN_WRAP *Wrap;
- if ((Event == NULL) || (Context == NULL)) {
+ if (Context == NULL) {
return ;
}
@@ -80,16 +78,35 @@ HttpTcpTransmitNotify ( }
/**
+ Request HttpTcpTransmitNotifyDpc as a DPC at TPL_CALLBACK.
+
+ @param Event The receive event delivered to TCP for transmit.
+ @param Context Context for the callback.
+
+**/
+VOID
+EFIAPI
+HttpTcpTransmitNotify (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
+{
+ //
+ // Request HttpTcpTransmitNotifyDpc as a DPC at TPL_CALLBACK
+ //
+ QueueDpc (TPL_CALLBACK, HttpTcpTransmitNotifyDpc, Context);
+}
+
+
+/**
The notify function associated with RxToken for Tcp4->Receive ().
- @param[in] Event The event signaled.
@param[in] Context The context.
**/
VOID
EFIAPI
-HttpTcpReceiveNotify (
- IN EFI_EVENT Event,
+HttpTcpReceiveNotifyDpc (
IN VOID *Context
)
{
@@ -99,7 +116,7 @@ HttpTcpReceiveNotify ( EFI_STATUS Status;
HTTP_PROTOCOL *HttpInstance;
- if ((Event == NULL) || (Context == NULL)) {
+ if (Context == NULL) {
return ;
}
@@ -174,6 +191,27 @@ HttpTcpReceiveNotify ( }
/**
+ Request HttpTcpReceiveNotifyDpc as a DPC at TPL_CALLBACK.
+
+ @param Event The receive event delivered to TCP for receive.
+ @param Context Context for the callback.
+
+**/
+VOID
+EFIAPI
+HttpTcpReceiveNotify (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
+{
+ //
+ // Request HttpTcpTransmitNotifyDpc as a DPC at TPL_CALLBACK
+ //
+ QueueDpc (TPL_CALLBACK, HttpTcpReceiveNotifyDpc, Context);
+}
+
+
+/**
Create events for the TCP4 connection token and TCP4 close token.
@param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.
|