/* Unmap (aka reverse mapping) device mapped TxBuf buffer to the system physical address */
EFI_STATUS EFIAPI VirtioNetUnmapTxBuf(IN VNET_DEV *Dev, OUT VOID **Buffer, IN EFI_PHYSICAL_ADDRESS DeviceAddress)
/* Unmap (aka reverse mapping) device mapped TxBuf buffer to the system physical address */
EFI_STATUS EFIAPI VirtioNetUnmapTxBuf(IN VNET_DEV *Dev, OUT VOID **Buffer, IN EFI_PHYSICAL_ADDRESS DeviceAddress)
{
  ORDERED_COLLECTION_ENTRY  *Entry;
  TX_BUF_MAP_INFO           *TxBufMapInfo;
  VOID                      *UserStruct;
  Entry = OrderedCollectionFind (Dev->TxBufCollection, &DeviceAddress);
  if (Entry == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  OrderedCollectionDelete (Dev->TxBufCollection, Entry, &UserStruct);
  TxBufMapInfo = UserStruct;
  *Buffer = TxBufMapInfo->Buffer;
  Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, TxBufMapInfo->BufMap);
  FreePool (TxBufMapInfo);
  return EFI_SUCCESS;
}