Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2019 19:50:22 +0000 (UTC)
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r349690 - stable/12/usr.sbin/bhyve
Message-ID:  <201907031950.x63JoMsV074679@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vangyzen
Date: Wed Jul  3 19:50:22 2019
New Revision: 349690
URL: https://svnweb.freebsd.org/changeset/base/349690

Log:
  MFC r349278
  
  bhyve: Fix vtscsi maximum segment config
  
  The seg_max value reported to the guest should be two less than the
  host's maximum, in order to leave room for the request and the
  response.  This is analogous to r347033 for virtio_block.
  
  We hit the "too many segments to enqueue" assertion on OneFS because
  we increase MAXPHYS to 256 KB.
  
  Reviewed by:	bryanv
  Discussed with:	cem jhb rgrimes
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D20529

Modified:
  stable/12/usr.sbin/bhyve/pci_virtio_scsi.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c
==============================================================================
--- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c	Wed Jul  3 19:46:05 2019	(r349689)
+++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c	Wed Jul  3 19:50:22 2019	(r349690)
@@ -309,7 +309,8 @@ pci_vtscsi_reset(void *vsc)
 	/* initialize config structure */
 	sc->vss_config = (struct pci_vtscsi_config){
 		.num_queues = VTSCSI_REQUESTQ,
-		.seg_max = VTSCSI_MAXSEG,
+		/* Leave room for the request and the response. */
+		.seg_max = VTSCSI_MAXSEG - 2,
 		.max_sectors = 2,
 		.cmd_per_lun = 1,
 		.event_info_size = sizeof(struct pci_vtscsi_event),



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907031950.x63JoMsV074679>