diff options
| author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-02-23 19:20:06 +0900 |
|---|---|---|
| committer | Jason Wang <jasowang@redhat.com> | 2023-03-10 15:35:38 +0800 |
| commit | 55daf493f7659b512e668f61ce4561dc60a27302 (patch) | |
| tree | c69718bbea9a39bfb0f63f05ccd493adcfd5c10f /hw/net/vmxnet3.c | |
| parent | 481c52320a26e2e3a3c8a1cdac3d1460b9b15d13 (diff) | |
| download | focaccia-qemu-55daf493f7659b512e668f61ce4561dc60a27302.tar.gz focaccia-qemu-55daf493f7659b512e668f61ce4561dc60a27302.zip | |
hw/net/net_tx_pkt: Automatically determine if virtio-net header is used
The new function qemu_get_using_vnet_hdr() allows to automatically determine if virtio-net header is used. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/vmxnet3.c')
| -rw-r--r-- | hw/net/vmxnet3.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index d7d492ac5a..eab8fa4d0b 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1521,8 +1521,7 @@ static void vmxnet3_activate_device(VMXNET3State *s) /* Preallocate TX packet wrapper */ VMW_CFPRN("Max TX fragments is %u", s->max_tx_frags); - net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s), - s->max_tx_frags, s->peer_has_vhdr); + net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s), s->max_tx_frags); net_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr); /* Read rings memory locations for RX queues */ @@ -2402,8 +2401,7 @@ static int vmxnet3_post_load(void *opaque, int version_id) { VMXNET3State *s = opaque; - net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s), - s->max_tx_frags, s->peer_has_vhdr); + net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s), s->max_tx_frags); net_rx_pkt_init(&s->rx_pkt, s->peer_has_vhdr); if (s->msix_used) { |