/* The signal handle of IP4's recycle event. It is called back when the upper layer release the packet. */
VOID EFIAPI Ip4OnRecyclePacket(IN EFI_EVENT Event, IN VOID *Context)
/* The signal handle of IP4's recycle event. It is called back when the upper layer release the packet. */
VOID EFIAPI Ip4OnRecyclePacket(IN EFI_EVENT Event, IN VOID *Context)
{
  IP4_RXDATA_WRAP  *Wrap;
  Wrap = (IP4_RXDATA_WRAP *)Context;
  EfiAcquireLockOrFail (&Wrap->IpInstance->RecycleLock);
  RemoveEntryList (&Wrap->Link);
  EfiReleaseLock (&Wrap->IpInstance->RecycleLock);
  ASSERT (!NET_BUF_SHARED (Wrap->Packet));
  NetbufFree (Wrap->Packet);
  gBS->CloseEvent (Wrap->RxData.RecycleSignal);
  FreePool (Wrap);
}