diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-05-23 11:43:14 +0900 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2023-05-23 15:20:15 +0800 |
commit | 1c5618a267640c8d315bf25ab0b84b24980d2458 (patch) | |
tree | 522f8d6156f138b4b02c0f75faeed95b447a1478 /hw/net | |
parent | 5c867340252cd5c4c3dcd50b51da961f2f6cb83d (diff) | |
download | qemu-1c5618a267640c8d315bf25ab0b84b24980d2458.zip qemu-1c5618a267640c8d315bf25ab0b84b24980d2458.tar.gz qemu-1c5618a267640c8d315bf25ab0b84b24980d2458.tar.bz2 |
vmxnet3: Reset packet state after emptying Tx queue
Keeping Tx packet state after the transmit queue is emptied but this
behavior is unreliable as the state can be reset anytime the migration
happens.
Always reset Tx packet state always after the queue is emptied.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/vmxnet3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 05f41b6..18b9edf 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -681,6 +681,8 @@ static void vmxnet3_process_tx_queue(VMXNET3State *s, int qidx) net_tx_pkt_unmap_frag_pci, PCI_DEVICE(s)); } } + + net_tx_pkt_reset(s->tx_pkt, net_tx_pkt_unmap_frag_pci, PCI_DEVICE(s)); } static inline void @@ -1159,7 +1161,6 @@ static void vmxnet3_deactivate_device(VMXNET3State *s) { if (s->device_active) { VMW_CBPRN("Deactivating vmxnet3..."); - net_tx_pkt_reset(s->tx_pkt, net_tx_pkt_unmap_frag_pci, PCI_DEVICE(s)); net_tx_pkt_uninit(s->tx_pkt); net_rx_pkt_uninit(s->rx_pkt); s->device_active = false; |