hw/net/net_rx_pkt: Remove net_rx_pkt_has_virt_hdr
commitaac8f89dba870bb263d05bb84c3d64e0204be092
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 23 Feb 2023 10:20:07 +0000 (23 19:20 +0900)
committerJason Wang <jasowang@redhat.com>
Fri, 10 Mar 2023 07:35:38 +0000 (10 15:35 +0800)
treeccf964dfe26aa3d8f9de8f8e4b9eb69213a9bbcc
parent55daf493f7659b512e668f61ce4561dc60a27302
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>
hw/net/e1000e_core.c
hw/net/net_rx_pkt.c
hw/net/net_rx_pkt.h
hw/net/trace-events
hw/net/virtio-net.c
hw/net/vmxnet3.c