Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci vio9p: Bump max tag len to match QEMU.
details: https://anonhg.NetBSD.org/src/rev/dc30ff8390d3
branches: trunk
changeset: 365207:dc30ff8390d3
user: uwe <uwe%NetBSD.org@localhost>
date: Wed Apr 13 15:24:42 2022 +0000
description:
vio9p: Bump max tag len to match QEMU.
QEMU defines it to 32 but includes the final zero byte into the limit.
Our code counts the final zero byte separately, so adjust this define
appropriately.
diffstat:
sys/dev/pci/vio9p.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r d1eb0bca4808 -r dc30ff8390d3 sys/dev/pci/vio9p.c
--- a/sys/dev/pci/vio9p.c Wed Apr 13 15:08:52 2022 +0000
+++ b/sys/dev/pci/vio9p.c Wed Apr 13 15:24:42 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vio9p.c,v 1.7 2022/04/13 15:08:52 uwe Exp $ */
+/* $NetBSD: vio9p.c,v 1.8 2022/04/13 15:24:42 uwe Exp $ */
/*
* Copyright (c) 2019 Internet Initiative Japan, Inc.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vio9p.c,v 1.7 2022/04/13 15:08:52 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vio9p.c,v 1.8 2022/04/13 15:24:42 uwe Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,7 +77,12 @@
#define VIO9P_SEGSIZE PAGE_SIZE
#define VIO9P_N_SEGMENTS (VIO9P_MAX_REQLEN / VIO9P_SEGSIZE)
-#define P9_MAX_TAG_LEN 16
+/*
+ * QEMU defines this as 32 but includes the final zero byte into the
+ * limit. The code below counts the final zero byte separately, so
+ * adjust this define to match.
+ */
+#define P9_MAX_TAG_LEN 31
CTASSERT((PAGE_SIZE) == (VIRTIO_PAGE_SIZE)); /* XXX */
Home |
Main Index |
Thread Index |
Old Index