View | Details | Raw Unified | Return to bug 236922 | Differences between
and this patch

Collapse All | Expand All

(-)sys/dev/virtio/scsi/virtio_scsi.c (+23 lines)
Lines 81-86 Link Here
81
		    struct virtio_scsi_config *);
81
		    struct virtio_scsi_config *);
82
static int	vtscsi_maximum_segments(struct vtscsi_softc *, int);
82
static int	vtscsi_maximum_segments(struct vtscsi_softc *, int);
83
static int	vtscsi_alloc_virtqueues(struct vtscsi_softc *);
83
static int	vtscsi_alloc_virtqueues(struct vtscsi_softc *);
84
static void	vtscsi_check_sizes(struct vtscsi_softc *);
84
static void	vtscsi_write_device_config(struct vtscsi_softc *);
85
static void	vtscsi_write_device_config(struct vtscsi_softc *);
85
static int	vtscsi_reinit(struct vtscsi_softc *);
86
static int	vtscsi_reinit(struct vtscsi_softc *);
86
87
Lines 311-316 Link Here
311
		goto fail;
312
		goto fail;
312
	}
313
	}
313
314
315
	vtscsi_check_sizes(sc);
316
314
	error = vtscsi_init_event_vq(sc);
317
	error = vtscsi_init_event_vq(sc);
315
	if (error) {
318
	if (error) {
316
		device_printf(dev, "cannot populate the eventvq\n");
319
		device_printf(dev, "cannot populate the eventvq\n");
Lines 478-483 Link Here
478
}
481
}
479
482
480
static void
483
static void
484
vtscsi_check_sizes(struct vtscsi_softc *sc)
485
{
486
	int rqsize;
487
488
	if ((sc->vtscsi_flags & VTSCSI_FLAG_INDIRECT) == 0) {
489
		/*
490
		 * Ensure the assertions in virtqueue_enqueue(),
491
		 * even if the hypervisor reports a bad seg_max.
492
		 */
493
		rqsize = virtqueue_size(sc->vtscsi_request_vq);
494
		if (sc->vtscsi_max_nsegs > rqsize) {
495
			device_printf(sc->vtscsi_dev,
496
			    "clamping seg_max (%d %d)\n", sc->vtscsi_max_nsegs,
497
			    rqsize);
498
			sc->vtscsi_max_nsegs = rqsize;
499
		}
500
	}
501
}
502
503
static void
481
vtscsi_write_device_config(struct vtscsi_softc *sc)
504
vtscsi_write_device_config(struct vtscsi_softc *sc)
482
{
505
{
483
506
(-)sys/dev/virtio/network/if_vtnet.c (-4 lines)
Lines 70-76 Link Here
70
#include <netinet/udp.h>
70
#include <netinet/udp.h>
71
#include <netinet/tcp.h>
71
#include <netinet/tcp.h>
72
#include <netinet/tcp_lro.h>
72
#include <netinet/tcp_lro.h>
73
#include <netinet/sctp.h>
74
#include <netinet/netdump/netdump.h>
73
#include <netinet/netdump/netdump.h>
75
74
76
#include <machine/bus.h>
75
#include <machine/bus.h>
Lines 1816-1824 Link Here
1816
	case IPPROTO_UDP:
1815
	case IPPROTO_UDP:
1817
		m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR;
1816
		m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR;
1818
		m->m_pkthdr.csum_data = 0xFFFF;
1817
		m->m_pkthdr.csum_data = 0xFFFF;
1819
		break;
1820
	case IPPROTO_SCTP:
1821
		m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
1822
		break;
1818
		break;
1823
	default:
1819
	default:
1824
		/*
1820
		/*

Return to bug 236922