]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/VirtioNetDxe: map caller-supplied Tx packet to device-address
authorBrijesh Singh <brijesh.singh@amd.com>
Thu, 14 Sep 2017 21:22:46 +0000 (16:22 -0500)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 14 Sep 2017 21:54:18 +0000 (23:54 +0200)
commit8fa54a8a948fb5ea28be0caa27cedded64243741
tree82c5df09a8f9a153436d1fe9d62447473d3aa021
parentbd114d9f776bfd26a1cf4c731429112821c9e944
OvmfPkg/VirtioNetDxe: map caller-supplied Tx packet to device-address

When device is behind the IOMMU, driver is require to pass the device
address of caller-supplied transmit buffer for the bus master operations.

The patch uses VirtioNetMapTxBuf() to map caller-supplied Tx packet to a
device-address and enqueue the device address in VRING for transfer and
perform the reverse mapping when transfer is completed so that we can
return the caller-supplied buffer.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/VirtioNetDxe/SnpGetStatus.c
OvmfPkg/VirtioNetDxe/SnpTransmit.c