Module Name:    src
Committed By:   uwe
Date:           Wed Apr 13 15:24:42 UTC 2022

Modified Files:
        src/sys/dev/pci: vio9p.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/vio9p.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/vio9p.c
diff -u src/sys/dev/pci/vio9p.c:1.7 src/sys/dev/pci/vio9p.c:1.8
--- src/sys/dev/pci/vio9p.c:1.7	Wed Apr 13 15:08:52 2022
+++ src/sys/dev/pci/vio9p.c	Wed Apr 13 15:24:42 2022
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: vio9p.c,v 1.
 #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 */
 

Reply via email to