aboutsummaryrefslogtreecommitdiff
path: root/hw/net/net_rx_pkt.h
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2023-02-23 19:20:07 +0900
committerJason Wang <jasowang@redhat.com>2023-03-10 15:35:38 +0800
commitaac8f89dba870bb263d05bb84c3d64e0204be092 (patch)
treeccf964dfe26aa3d8f9de8f8e4b9eb69213a9bbcc /hw/net/net_rx_pkt.h
parent55daf493f7659b512e668f61ce4561dc60a27302 (diff)
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>
Diffstat (limited to 'hw/net/net_rx_pkt.h')
-rw-r--r--hw/net/net_rx_pkt.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/hw/net/net_rx_pkt.h b/hw/net/net_rx_pkt.h
index 048e3461f0..7277907a22 100644
--- a/hw/net/net_rx_pkt.h
+++ b/hw/net/net_rx_pkt.h
@@ -37,10 +37,9 @@ void net_rx_pkt_uninit(struct NetRxPkt *pkt);
* Init function for rx packet functionality
*
* @pkt: packet pointer
- * @has_virt_hdr: device uses virtio header
*
*/
-void net_rx_pkt_init(struct NetRxPkt **pkt, bool has_virt_hdr);
+void net_rx_pkt_init(struct NetRxPkt **pkt);
/**
* returns total length of data attached to rx context
@@ -215,15 +214,6 @@ uint16_t net_rx_pkt_get_vlan_tag(struct NetRxPkt *pkt);
bool net_rx_pkt_is_vlan_stripped(struct NetRxPkt *pkt);
/**
- * notifies caller if the packet has virtio header
- *
- * @pkt: packet
- * @ret: true if packet has virtio header, false otherwize
- *
- */
-bool net_rx_pkt_has_virt_hdr(struct NetRxPkt *pkt);
-
-/**
* attach scatter-gather data to rx packet
*
* @pkt: packet