<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/vmware, 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-10-17T15:31:53Z</updated>
<entry>
<title>vmci: fix panic due to freeing unallocated resources</title>
<updated>2021-10-17T15:31:53Z</updated>
<author>
<name>Mark Peek</name>
<email>mp@FreeBSD.org</email>
</author>
<published>2021-10-09T21:21:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b5d236785dc352a65bc29d97c8a89b40387eb7a0'/>
<id>urn:sha1:b5d236785dc352a65bc29d97c8a89b40387eb7a0</id>
<content type='text'>
Summary:
An error mapping PCI resources results in a panic due to unallocated
resources being freed up. This change puts the appropriate checks in
place to prevent the panic.

PR:		252445
Reported by:	Marek Zarychta &lt;zarychtam@plan-b.pwste.edu.pl&gt;
Tested by:	marcus
MFC after:	1 week
Sponsored by:	VMware

Test Plan:
Along with user testing, also simulated error by inserting a ENXIO
return in vmci_map_bars().

Reviewed by:	marcus
Subscribers:	imp
Differential Revision: https://reviews.freebsd.org/D32016

(cherry picked from commit 0f14bcbe384091c729464cb770372aeb79061070)
</content>
</entry>
<entry>
<title>iflib: ensure that tx interrupts enabled and cleanups</title>
<updated>2021-10-03T02:03:11Z</updated>
<author>
<name>Matt Macy</name>
<email>mmacy@FreeBSD.org</email>
</author>
<published>2020-12-19T01:08:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a5a91bd2a09ffe748b6dd7d5f996fe725c22c774'/>
<id>urn:sha1:a5a91bd2a09ffe748b6dd7d5f996fe725c22c774</id>
<content type='text'>
Doing a 'dd' over iscsi will reliably cause stalls. Tx
cleaning _should_ reliably happen as data is sent.
However, currently if the transmit queue fills it will
wait until the iflib timer (hz/2) runs.

This change causes the the tx taskq thread to be run
if there are completed descriptors.

While here:

- make timer interrupt delay a sysctl

- simplify txd_db_check handling

- comment on INTR types

Background on the change:

Initially doorbell updates were minimized by only writing to the register
on every fourth packet. If txq_drain would return without writing to the
doorbell it scheduled a callout on the next tick to do the doorbell write
to ensure that the write otherwise happened "soon". At that time a sysctl
was added for users to avoid the potential added latency by simply writing
to the doorbell register on every packet. This worked perfectly well for
e1000 and ixgbe ... and appeared to work well on ixl. However, as it
turned out there was a race to this approach that would lockup the ixl MAC.
It was possible for a lower producer index to be written after a higher one.
On e1000 and ixgbe this was harmless - on ixl it was fatal. My initial
response was to add a lock around doorbell writes - fixing the problem but
adding an unacceptable amount of lock contention.

The next iteration was to use transmit interrupts to drive delayed doorbell
writes. If there were no packets in the queue all doorbell writes would be
immediate as the queue started to fill up we could delay doorbell writes
further and further. At the start of drain if we've cleaned any packets we
know we've moved the state machine along and we write the doorbell (an
obvious missing optimization was to skip that doorbell write if db_pending
is zero). This change required that tx interrupts be scheduled periodically
as opposed to just when the hardware txq was full. However, that just leads
to our next problem.

Initially dedicated msix vectors were used for both tx and rx. However, it
was often possible to use up all available vectors before we set up all the
queues we wanted. By having rx and tx share a vector for a given queue we
could halve the number of vectors used by a given configuration. The problem
here is that with this change only e1000 passed the necessary value to have
the fast interrupt drive tx when appropriate.

Reported by: mav@
Tested by: mav@
Reviewed by:    gallatin@
MFC after:      1 month
Sponsored by:   iXsystems
Differential Revision:  https://reviews.freebsd.org/D27683

(cherry picked from commit 81be655266fac2b333e25f386f32c9bcd17f523d)
</content>
</entry>
<entry>
<title>vmci(4): Shorten interrupt descriptions.</title>
<updated>2021-08-05T00:35:08Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2021-07-22T16:58:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b3ffcbec1ccb4832529408e4a391cf9a62ddd54d'/>
<id>urn:sha1:b3ffcbec1ccb4832529408e4a391cf9a62ddd54d</id>
<content type='text'>
We have no space there for such a long strings.  Also it makes no
sense to set description if there is only one interrupt.

MFC after:	2 weeks

(cherry picked from commit ab38c12b4a488c011ea85252621430ded6e87139)
</content>
</entry>
<entry>
<title>Add MODULE_PNP_INFO() to vmci(4).  This allows devd(8) to load the</title>
<updated>2020-12-29T21:48:32Z</updated>
<author>
<name>Hiroki Sato</name>
<email>hrs@FreeBSD.org</email>
</author>
<published>2019-08-25T18:46:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6338833c50a7566d006b722c791a6a92071309b8'/>
<id>urn:sha1:6338833c50a7566d006b722c791a6a92071309b8</id>
<content type='text'>
kernel module automatically when FreeBSD is running on VMware.

Reviewed by:		mp
Differential Revision:	https://reviews.freebsd.org/D21182

(cherry picked from commit 639eac208771e9eb3d1141882514be35377abeee)
</content>
</entry>
<entry>
<title>MFC r365061</title>
<updated>2020-09-22T21:43:43Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-09-22T21:43:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b03f8f9615d3eb916718042b896d70f1de7a5687'/>
<id>urn:sha1:b03f8f9615d3eb916718042b896d70f1de7a5687</id>
<content type='text'>
iflib: leave only 1 receive descriptor unused

The pidx argument of isc_rxd_flush() indicates which is the last valid
receive descriptor to be used by the NIC. However, current code has
multiple issues:
  - Intel drivers write pidx to their RDT register, which means that
    NICs will only use the descriptors up to pidx-1 (modulo ring size N),
    and won't actually use the one pointed by pidx. This does not break
    reception, but it is anyway confusing and suboptimal (the NIC will
    actually see only N-2 descriptors as available, rather than N-1).
    Other drivers (if_vmx, if_bnxt, if_mgb) adhere to this semantic.
  - The semantic used by Intel (RDT is one descriptor past the last
    valid one) is used by most (if not all) NICs, and it is also used
    on the TX side (also in iflib). Since iflib is not currently
    using this semantic for RX, it must decrement fl-&gt;ifl_pidx
    (modulo N) before calling isc_rxd_flush(), and then the
    per-driver callback implementation must increment the index
    again (to match the real semantic). This is confusing and suboptimal.
  - The iflib refill function is also called at initialization.
    However, in case the ring size is smaller than 128 (e.g. if_mgb),
    the refill function will actually prepare all the receive
    descriptors (N), without leaving one unused, as most of NICs assume
    (e.g. to avoid RDT to overrun RDH). I can speculate that the code
    looks like this right now because this issue showed up during
    testing (e.g. with if_mgb), and it was easy to workaround by
    decrementing pidx before isc_rxd_flush().

The goal of this change is to simplify the code (removing a bunch
of instructions from the RX fast path), and to make the semantic of
isc_rxd_flush() consistent across drivers. To achieve this, we:
  - change the semantics of the pidx argument to the usual one (that
    is the index one past the last valid one), so that both iflib and
    drivers avoid the decrement/increment dance.
  - fix the initialization code to prepare at most N-1 descriptors.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D26191
</content>
</entry>
<entry>
<title>MFC r358996 (by pkelsey):</title>
<updated>2020-08-04T15:48:12Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2020-08-04T15:48:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b9d11857a80a92249f5039642c77092cf104ca4b'/>
<id>urn:sha1:b9d11857a80a92249f5039642c77092cf104ca4b</id>
<content type='text'>
Fix iflib zero-length fragment handling

MFC r358997 (by pkelsey):
Remove freelist contiguous-indexes assertion from rxd_frag_to_sd()

MFC r358998 (by pkelsey):
Allow iflib drivers to specify the buffer size used for each receive queue

MFC r358999 (by pkelsey):
Remove refill budget from iflib

MFC r359000 (by pkelsey):
Fix if_vmx receive checksum offload bug and harden against the device
skipping receive descriptors

MFC r359001 (by pkelsey):
Adjust if_vmx default receive parameters for better out-of-box performance

MFC r359002 (by pkelsey):
Remove extraneous code from iflib

MFC r359029 (by pkelsey):
Restore power-of-2 queue count constraint from r290948

Tested by:	marcus, mav
</content>
</entry>
<entry>
<title>MFC r357042: vmxnet3: add support for RSS kernel option</title>
<updated>2020-02-27T15:08:43Z</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2020-02-27T15:08:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ab34c862ad64afd2d79b013edb864c1c3b0454c5'/>
<id>urn:sha1:ab34c862ad64afd2d79b013edb864c1c3b0454c5</id>
<content type='text'>
We observe at least one problem: if a UDP socket is connect(2)-ed, then a
received packet that matches the connection cannot be matched to the
corresponding PCB because of an incorrect flow ID.  That was oberved for DNS
requests from the libc resolver.  We got this problem because FreeBSD
r343291 enabled code that can set rsstype of received packets to values
other than M_HASHTYPE_OPAQUE_HASH.  Earlier that code was under 'ifdef
notyet'.

The essence of this change is to use the system-wide RSS key instead of
some historic hardcoded key when the software RSS is enabled and it is
configured to use Toeplitz algorithm (the default).
In all other cases, the driver reports the opaque hash type for received
packets while still using Toeplitz algorithm with the internal key.

PR:		242890
Sponsored by:	Panzura
</content>
</entry>
<entry>
<title>MFC r356703</title>
<updated>2020-01-20T22:15:33Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2020-01-20T22:15:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=25021662487db847bceb3f8c098e950e7ce3d3ca'/>
<id>urn:sha1:25021662487db847bceb3f8c098e950e7ce3d3ca</id>
<content type='text'>
vmx: fix initialization of TSO related descriptor fields

Fix a mistake introduced by r343291, which ported the vmx(4)
driver to iflib.
In case of TSO, the hlen field of the (first) tx descriptor must
be initialized to the cumulative length of Ethernet, IP and TCP
headers. The length of the TCP header was missing.

PR:             236999
Reported by:    pkelsey
Reviewed by:    avg
Differential Revision:  https://reviews.freebsd.org/D22967
</content>
</entry>
<entry>
<title>MFC r352906:</title>
<updated>2019-10-03T14:55:07Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2019-10-03T14:55:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b5fea837855772dad3d09f2292d10fe26f66f990'/>
<id>urn:sha1:b5fea837855772dad3d09f2292d10fe26f66f990</id>
<content type='text'>
Add IFLIB_SINGLE_IRQ_RX_ONLY.

PR:	239118
</content>
</entry>
<entry>
<title>MFC r343291:</title>
<updated>2019-02-11T23:24:39Z</updated>
<author>
<name>Patrick Kelsey</name>
<email>pkelsey@FreeBSD.org</email>
</author>
<published>2019-02-11T23:24:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=66c1bcdf52f6a34438cfe9d38473c393d8f0aa8d'/>
<id>urn:sha1:66c1bcdf52f6a34438cfe9d38473c393d8f0aa8d</id>
<content type='text'>
Convert vmx(4) to being an iflib driver.

Also, expose IFLIB_MAX_RX_SEGS to iflib drivers and add
iflib_dma_alloc_align() to the iflib API.

Performance is generally better with the tunable/sysctl
dev.vmx.&lt;index&gt;.iflib.tx_abdicate=1.

Reviewed by:	shurd
Relnotes:	yes
Sponsored by:	RG Nets
Differential Revision:	https://reviews.freebsd.org/D18761

MFC r343301:
Add missing dependency to vmxnet3 Makefile and clean it up a bit otherwise.

MFC r343688:
Fix interrupt index configuration when using MSI interrupts.

When in MSI mode, the device was only being configured with one
interrupt index, but it needs two - one for the actual interrupt and
one to park the tx queue at.

Also clarified comments relating to interrupt index assignment.

Reported by:	Yuri Pankov &lt;yuripv@yuripv.net&gt;
</content>
</entry>
</feed>
