mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
hw/net/net_rx_pkt: Remove net_rx_pkt_has_virt_hdr
When virtio-net header is not set, net_rx_pkt_get_vhdr() returns zero-filled virtio_net_hdr, which is actually valid. In fact, tap device uses zero-filled virtio_net_hdr when virtio-net header is not provided by the peer. Therefore, we can just remove net_rx_pkt_has_virt_hdr() and always assume NetTxPkt has a valid virtio-net header. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
55daf493f7
commit
aac8f89dba
6 changed files with 9 additions and 45 deletions
|
@ -3718,7 +3718,7 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp)
|
|||
QTAILQ_INIT(&n->rsc_chains);
|
||||
n->qdev = dev;
|
||||
|
||||
net_rx_pkt_init(&n->rx_pkt, false);
|
||||
net_rx_pkt_init(&n->rx_pkt);
|
||||
|
||||
if (virtio_has_feature(n->host_features, VIRTIO_NET_F_RSS)) {
|
||||
virtio_net_load_ebpf(n);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue