diff options
author | Stefan Fritsch <sf@cvs.openbsd.org> | 2024-08-26 19:24:03 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@cvs.openbsd.org> | 2024-08-26 19:24:03 +0000 |
commit | 527c8407f6bfbf190bf2651489c8f0ddcc817eb4 (patch) | |
tree | 8df08c9f664a8259544d45a16e73eadd9029ddf7 /sys | |
parent | 29713555a0cb4a750add4dc160608b94f1a23144 (diff) |
vio(4): Fix hardmtu without MRG_RXBUF
Without VIRTIO_NET_F_MRG_RXBUF, we cannot chain several buffers together
and we can only receive packets up to the length of the buffers we put
into the ring.
OK bluhm@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pv/if_vio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c index 49013140134..55de44893ab 100644 --- a/sys/dev/pv/if_vio.c +++ b/sys/dev/pv/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.46 2024/08/16 13:02:44 jan Exp $ */ +/* $OpenBSD: if_vio.c,v 1.47 2024/08/26 19:24:02 sf Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -599,7 +599,7 @@ vio_attach(struct device *parent, struct device *self, void *aux) if (virtio_has_feature(vsc, VIRTIO_NET_F_MRG_RXBUF)) ifp->if_hardmtu = MAXMCLBYTES; else - ifp->if_hardmtu = MAXMCLBYTES - sc->sc_hdr_size - ETHER_HDR_LEN; + ifp->if_hardmtu = MCLBYTES - sc->sc_hdr_size - ETHER_HDR_LEN; if (virtio_alloc_vq(vsc, &sc->sc_vq[VQRX], 0, MCLBYTES, 2, "rx") != 0) goto err; |