<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/virtio, branch release/12.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-08-05T20:05:26Z</updated>
<entry>
<title>virtio: enable VTNET_LEGACY_TX when ALTQ is enabled.</title>
<updated>2021-08-05T20:05:26Z</updated>
<author>
<name>Luiz Otavio O Souza</name>
<email>loos@FreeBSD.org</email>
</author>
<published>2017-10-26T02:30:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=973304077ff865a6ebeb55aa1d38f8d44b7dc3b4'/>
<id>urn:sha1:973304077ff865a6ebeb55aa1d38f8d44b7dc3b4</id>
<content type='text'>
ALTQ only works on network drivers which use if_start (rather than
if_transmit). vtnet uses if_start if built with VTNET_LEGACY_TX. Default
to that the kernel is built with ALTQ enabled, to reduce user surprise.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 5afe81a7b23afd27289ca40e04a6a764134d6273)
</content>
</entry>
<entry>
<title>netmap: vtnet: stop krings during interface reset</title>
<updated>2021-01-17T13:38:09Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2021-01-09T22:34:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fa1a4ff944f4b3e841df0cdd67c6373a589ffdd5'/>
<id>urn:sha1:fa1a4ff944f4b3e841df0cdd67c6373a589ffdd5</id>
<content type='text'>
Similarly to what done for iflib in 1d238b07d5d4d9660ae0e,
this patch prevents access to the krings during the interface
reset triggered by netmap_register().

MFC after:	1 week

(cherry picked from commit 9ac59d42c0b4b6cd9c36a5dace7f49753c2e175a)

netmap: vtnet: enable/disable krings on any interface reinit

See 3d65fd97e85ab807f3b for a detailed explanation.

PR:             252453
MFC after:      1 week

(cherry picked from commit bb714db6d39583a9fbf5d11849c5e2365e7c0d80)

netmap: vtnet: fix RX initialization after netmap_reset()

At device reset, we must not publish those netmap receive buffers
that are owned by userspace (nm_kr_rxspace).

MFC after:	1 week

(cherry picked from commit 3005e10ddbfbec3ecf46a080607bb0d85986eee5)
</content>
</entry>
<entry>
<title>MFC r360229, r363255</title>
<updated>2020-09-10T21:01:22Z</updated>
<author>
<name>Allan Jude</name>
<email>allanjude@FreeBSD.org</email>
</author>
<published>2020-09-10T21:01:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3b327c7dbac942960db8a7f1a81c34bdfe8d61ac'/>
<id>urn:sha1:3b327c7dbac942960db8a7f1a81c34bdfe8d61ac</id>
<content type='text'>
r360229:
Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend

This will advertise support for TRIM to the guest virtio-blk driver and
perform the DIOCGDELETE ioctl on the backing storage if it supports it.

Thanks to Jason King and others at Joyent and illumos for expanding on
my original patch, adding improvements including better error handling
and making sure to following the virtio spec.

r363255:
Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver

If the hypervisor advertises support for the DISCARD command then the
guest can perform TRIM commands, freeing space on the backing store.

If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE

Tested with FreeBSD guests on bhyve and KVM

Relnotes:	yes
Sponsored by:	Klara Inc.
</content>
</entry>
<entry>
<title>MFC r362204</title>
<updated>2020-07-01T19:42:23Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-07-01T19:42:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9b8f0814882923c3cbbb39ad852bcd5460d1fa4a'/>
<id>urn:sha1:9b8f0814882923c3cbbb39ad852bcd5460d1fa4a</id>
<content type='text'>
if_vtnet: let vtnet_rx_vq_intr() and vtnet_rxq_tq_intr() share code

Since the two functions are similar, introduce a common function
(vtnet_rx_vq_process()) to share common code.
This also improves locking, by ensuring vrxs_rescheduled is accessed
under the RXQ lock, and taskqueue_enqueue() is not called under the
lock (therefore avoiding a spurious duplicate lock warning).

Reported by:    jrtc27
</content>
</entry>
<entry>
<title>MFC r362183</title>
<updated>2020-06-23T20:41:10Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-06-23T20:41:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e2573c8c1836ac4c91d5fd042c69e0d4932a2ea4'/>
<id>urn:sha1:e2573c8c1836ac4c91d5fd042c69e0d4932a2ea4</id>
<content type='text'>
netmap: vtnet: fix races in vtnet_netmap_reg()

The nm_register callback needs to call nm_set_native_flags()
or nm_clear_native_flags() once the device has been stopped.
However, in the current implementation this is not true,
as the device is stopped by vtnet_init_locked(). This causes
race conditions where the driver crashes as soon as it
dequeues netmap buffers assuming they are mbufs (or the other
way around).
To fix the issue, we extend vtnet_init_locked() with a second
argument that, if not zero, will set/clear the netmap flags.
This results in a huge simplification of the nm_register
callback itself.
Also, use netmap_reset() to check if a ring is going to be
re-initialized in netmap mode.
</content>
</entry>
<entry>
<title>MFC r362076</title>
<updated>2020-06-18T10:03:17Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-06-18T10:03:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eb49c2778b3b0cfc38eb5659ec94a48bd5d251c9'/>
<id>urn:sha1:eb49c2778b3b0cfc38eb5659ec94a48bd5d251c9</id>
<content type='text'>
netmap: introduce netmap_kring_on()

This function returns NULL if the ring identified by
queue id and direction is in netmap mode. Otherwise
return the corresponding kring.
Use this function to replace vtnet_netmap_queue_on().
</content>
</entry>
<entry>
<title>MFC r361758</title>
<updated>2020-06-10T20:04:20Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-06-10T20:04:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0dd06b856e0076af19d1a828f6751342b75c8e49'/>
<id>urn:sha1:0dd06b856e0076af19d1a828f6751342b75c8e49</id>
<content type='text'>
netmap: vtnet: add vtnrx_nm_refill index to receive queues

The new index tracks the next netmap slot that is going
to be enqueued into the virtqueue. The index is necessary
to prevent the receive VQ and the netmap rx ring from going
out of sync, considering that we never enqueue N slots, but
at most N-1. This change fixes a bug that causes the VQ
and the netmap ring to go out of sync after N-1 packets
have been received.
</content>
</entry>
<entry>
<title>MFC r361745</title>
<updated>2020-06-10T20:02:38Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-06-10T20:02:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c3c61399d66e6ba3b6c0dba7d30be7f87528c29c'/>
<id>urn:sha1:c3c61399d66e6ba3b6c0dba7d30be7f87528c29c</id>
<content type='text'>
netmap: vtnet: call netmap_rx_irq() under VQ lock

The netmap_rx_irq() function normally wakes up user-space threads
waiting for more packets. In this case, it is not necessary to
call it under the driver queue lock. However, if the interface is
attached to a VALE switch, netmap_rx_irq() ends up calling rxsync
on the interface (see netmap_bwrap_intr_notify()). Although
concurrent rxsyncs are serialized through the kring lock
(see nm_kr_tryget()), the lock acquire operation is not blocking.
As a result, it may happen that netmap_rx_irq() is called on
an RX ring while another instance is running, causing the
second call to fail, and received packets stall in the receive VQ.
We fix this issue by calling netmap_irx_irq() under the VQ lock.
</content>
</entry>
<entry>
<title>MFC r361744</title>
<updated>2020-06-10T19:59:11Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-06-10T19:59:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4e13200941b362f02f4331a47e081c9596fcf74c'/>
<id>urn:sha1:4e13200941b362f02f4331a47e081c9596fcf74c</id>
<content type='text'>
netmap: vtnet: honor NM_IRQ_RESCHED

The netmap_rx_irq() function may return NM_IRQ_RESCHED to inform the
driver that more work is pending, and that netmap expects netmap_rx_irq()
to be called again as soon as possible.
This change implements this behaviour in the vtnet driver.
</content>
</entry>
<entry>
<title>MFC r357040: virtio_scsi: use max target ID plus one as the initiator ID</title>
<updated>2020-02-27T14:52:55Z</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2020-02-27T14:52:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4f6e8eeebe3020a3ec366e8f86c79a1e7b650799'/>
<id>urn:sha1:4f6e8eeebe3020a3ec366e8f86c79a1e7b650799</id>
<content type='text'>
This bus does not really have a concept of the initiator ID, so use
a guaranteed dummy one that won't conflict with any real target.

This change fixes a problem with virtio_scsi on GCE where disks get
sequential target IDs starting from one.  If there are seven or more
disks, then a disk with the target ID of seven would not be discovered
by FreeBSD as that ID was reserved as the initiator ID -- see
scsi_scan_bus().

Sponsored by:	Panzura
</content>
</entry>
</feed>
