<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mana, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-12-23T07:00:38Z</updated>
<entry>
<title>mana: support jumbo packet size</title>
<updated>2025-12-23T07:00:38Z</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2025-12-23T07:00:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0a2bd2765b365c4be9b17c29306f848953e55a5'/>
<id>urn:sha1:d0a2bd2765b365c4be9b17c29306f848953e55a5</id>
<content type='text'>
Remove the restriction of up to 4k packet size. Now the driver
supports up to MJUM16BYTES size packets as long as hardware
supporting it.

Tested on VMs in Azure.

Tested by:	whu
MFC after:	1 week
Sponsored by:	Microsoft
</content>
</entry>
<entry>
<title>mana: remove redundant doorbell in mana_poll_rx_cq()</title>
<updated>2025-03-14T05:51:34Z</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2025-03-14T05:26:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=47f4137e44b8079c7784604d220a298db07a19a1'/>
<id>urn:sha1:47f4137e44b8079c7784604d220a298db07a19a1</id>
<content type='text'>
With the last commit to refill the rx mbuf in batch, the doorbell
in mana_poll_rx_cq() becomes redundant. Remove it to save a few
microseconds spent in mmio call.

Reported by:	NetApp
Reviewed by:	Tallamraju, Sai
Tested by:	whu
Fixes:		9b8701b8 ("mana: refill the rx mbuf in batch")
MFC after:	3 days
Sponsored by:	Microsoft
</content>
</entry>
<entry>
<title>mana: refill the rx mbuf in batch</title>
<updated>2025-02-27T08:08:13Z</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2025-02-27T08:02:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9b8701b81f14f0fa0787425eb9761b765d5faab0'/>
<id>urn:sha1:9b8701b81f14f0fa0787425eb9761b765d5faab0</id>
<content type='text'>
Set the default refill threshod to be one quarter of the rx queue
length. User can change this value with hw.mana.rx_refill_thresh
in loader.conf. It improves the rx completion handling by saving
10% to 15% of overall time with this change.

Tested by:	whu
MFC after:	2 weeks
Sponsored by:	Microsoft
</content>
</entry>
<entry>
<title>mana: Increase default tx and rx ring size to 1024</title>
<updated>2025-02-24T13:56:06Z</updated>
<author>
<name>Wei Hu</name>
<email>whu@FreeBSD.org</email>
</author>
<published>2025-02-24T13:56:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a18e99945414fb1f9d455b780c6fcf2d09cc68d8'/>
<id>urn:sha1:a18e99945414fb1f9d455b780c6fcf2d09cc68d8</id>
<content type='text'>
Tcp perfomance tests show high number of retries under heave tx
traffic. The numbers of queue stops and wakeups also increase.
Further analysis suggests the FreeBSD network stack tends to send
TSO packets with multiple sg entries, typically ranging from
10 to 16. On mana, every two sgs takes one unit of tx ring.
Therefore, adding up one unit for the head, it takes 6 to 9 units
of tx ring to send a typical TSO packet.

Current default tx ring size is 256, which can get filled up
quickly under heavy load. When tx ring is full, the send queue
is stopped waiting for the ring space to be freed. This could
cause the network stack to drop packets, and lead to tcp
retransmissions.

Increase the default tx and rx ring size to 1024 units. Also
introduce two tuneables allowing users to request tx and rx ring
size in loader.conf:
        hw.mana.rx_req_size
        hw.mana.tx_req_size
When mana is loading, the driver checks these two values and
round them up to power of 2. If these two are not set or
the request values are out of the allowable range, it sets the
default ring size instead.

Also change the tx and rx single loop completion budget to 8.

Tested by:	whu
MFC after:	2 weeks
Sponsored by:	Microsoft
</content>
</entry>
<entry>
<title>Check for errors when detaching children first, not last</title>
<updated>2024-11-05T01:30:33Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-11-05T01:30:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d412c07617eb35435668b024bc2cecda05f57f1f'/>
<id>urn:sha1:d412c07617eb35435668b024bc2cecda05f57f1f</id>
<content type='text'>
These detach routines in these drivers all ended with 'return
(bus_generic_detach())' meaning that if any child device failed to
detach, the parent driver was left in a mostly destroyed state, but
still marked attached.  Instead, bus drivers should detach child
drivers first and return errors before destroying driver state in the
parent.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47387
</content>
</entry>
<entry>
<title>mana: Remove stray semicolons</title>
<updated>2024-10-24T15:04:49Z</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-10-24T15:04:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6ccf4f4071c5bf85a9aad593e92d1623e949c039'/>
<id>urn:sha1:6ccf4f4071c5bf85a9aad593e92d1623e949c039</id>
<content type='text'>
MFC after:	1 week
</content>
</entry>
<entry>
<title>gdma: use ispower2</title>
<updated>2024-09-28T21:17:03Z</updated>
<author>
<name>Doug Moore</name>
<email>dougm@FreeBSD.org</email>
</author>
<published>2024-09-28T21:17:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=65c4ec887eec1f1967557cc3f2656df76b5898bb'/>
<id>urn:sha1:65c4ec887eec1f1967557cc3f2656df76b5898bb</id>
<content type='text'>
It's faster to use ispower2(n) than it is to compute
roundup_pow_of_two and do a comparison.  So do the former.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D46838
</content>
</entry>
<entry>
<title>mana: Stop checking for failures from malloc/mallocarray/buf_ring_alloc(M_WAITOK)</title>
<updated>2024-09-03T10:25:30Z</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-09-03T10:25:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1dc7a7b74b5ad37ff7c8dc22f1a710460a5f1dcd'/>
<id>urn:sha1:1dc7a7b74b5ad37ff7c8dc22f1a710460a5f1dcd</id>
<content type='text'>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
</content>
</entry>
<entry>
<title>net: Remove unneeded NULL check for the allocated ifnet</title>
<updated>2024-06-28T10:16:29Z</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-06-28T10:16:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aa3860851b9f6a6002d135b1cac7736e0995eedc'/>
<id>urn:sha1:aa3860851b9f6a6002d135b1cac7736e0995eedc</id>
<content type='text'>
Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().

No functional change intended.

Reviewed by:	kp, imp, glebius, stevek
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45740
</content>
</entry>
<entry>
<title>log2: move log2 functions from linuxkpi to libkern</title>
<updated>2024-06-24T07:00:31Z</updated>
<author>
<name>Doug Moore</name>
<email>dougm@FreeBSD.org</email>
</author>
<published>2024-06-24T07:00:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c8b0c33b03ac072413b27bed2bdae2ae27426f3a'/>
<id>urn:sha1:c8b0c33b03ac072413b27bed2bdae2ae27426f3a</id>
<content type='text'>
Linux has a header file that defines an ilog2 function and some simple
functions/macros that use it: roundup_pow_of_two, is_power_of_2,
rounddown_pow_of_two, and order_base_2.  This change moves three of
those simple functions (all but is_power_of_2) from linuxkpi to
libkern.  It also deletes a few implementations of these functions
that have previously been copied into code for various device drivers,
so that they can use the libkern version.  The is_power_of_2 macro was
not moved because powerof2 in param.h provides almost the same service
already (except that they disagree about whether 0 is a power of two).

Since the linux definitions of these functions were copied into
FreeBSD 11 years ago, linux has improved them, and this change
provides those improvements.  In particular, a giant table of log
values for evaluating ilog2 for constant values is no longer
necessary.

Reviewed by:	alc, markj (previous version)
Differential Revision:	https://reviews.freebsd.org/D45536
</content>
</entry>
</feed>
