Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177573717
D61582.1794778182.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
931 B
Referenced Files
None
Subscribers
None
D61582.1794778182.diff
View Options
diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c
--- a/usr.sbin/bhyve/pci_virtio_net.c
+++ b/usr.sbin/bhyve/pci_virtio_net.c
@@ -366,6 +366,8 @@
* number of bytes that we wrote.
*/
if (!sc->rx_merge) {
+ if (sc->vhdrlen == sizeof(struct virtio_net_rxhdr))
+ hdr->vrh_bufs = 1;
vq_relchain(vq, info[0].idx, ulen);
} else {
uint32_t iolen;
@@ -721,9 +723,12 @@
if (negotiated_features & VIRTIO_NET_F_MRG_RXBUF) {
sc->vhdrlen = sizeof(struct virtio_net_rxhdr);
sc->rx_merge = 1;
+ } else if (negotiated_features & VIRTIO_F_VERSION_1) {
+ sc->vhdrlen = sizeof(struct virtio_net_rxhdr);
+ sc->rx_merge = 0;
} else {
/*
- * Without mergeable rx buffers, virtio-net header is 2
+ * Without mergeable rx buffers, legacy virtio-net header is 2
* bytes shorter than sizeof(struct virtio_net_rxhdr).
*/
sc->vhdrlen = sizeof(struct virtio_net_rxhdr) - 2;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 9:29 PM (20 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41748835
Default Alt Text
D61582.1794778182.diff (931 B)
Attached To
Mode
D61582: bhyve/pci_virtio_net: Fix modern virtio header handling
Attached
Detach File
Event Timeline