mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
igb: Fix DMA requester specification for Tx packet
igb used to specify the PF as DMA requester when reading Tx packets.
This made Tx requests from VFs to be performed on the address space of
the PF, defeating the purpose of SR-IOV. Add some logic to change the
requester depending on the queue, which can be assigned to a VF.
Fixes: 3a977deebe
("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
212f7b1dac
commit
f4fdaf009c
5 changed files with 17 additions and 12 deletions
|
@ -443,7 +443,7 @@ void net_tx_pkt_dump(struct NetTxPkt *pkt)
|
|||
#endif
|
||||
}
|
||||
|
||||
void net_tx_pkt_reset(struct NetTxPkt *pkt)
|
||||
void net_tx_pkt_reset(struct NetTxPkt *pkt, PCIDevice *pci_dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -467,6 +467,7 @@ void net_tx_pkt_reset(struct NetTxPkt *pkt)
|
|||
pkt->raw[i].iov_len, DMA_DIRECTION_TO_DEVICE, 0);
|
||||
}
|
||||
}
|
||||
pkt->pci_dev = pci_dev;
|
||||
pkt->raw_frags = 0;
|
||||
|
||||
pkt->hdr_len = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue