Page MenuHomeFreeBSD
Feed Search

Aug 5 2025

gallatin updated the diff for D51748: iflib: don't pullup UDP payloads to the TCP header size.

Address Eric's style(9) nits and remove space in front of parans in sizeof

Aug 5 2025, 7:30 PM
gallatin added inline comments to D51748: iflib: don't pullup UDP payloads to the TCP header size.
Aug 5 2025, 6:27 PM
gallatin updated the diff for D51748: iflib: don't pullup UDP payloads to the TCP header size.

Update diff to address Gleb's feedback

Aug 5 2025, 6:26 PM
gallatin added a reviewer for D51748: iflib: don't pullup UDP payloads to the TCP header size: glebius.
Aug 5 2025, 6:09 PM
gallatin requested review of D51748: iflib: don't pullup UDP payloads to the TCP header size.
Aug 5 2025, 6:05 PM

Jul 26 2025

gallatin committed rG83a352bcac0a: lagg: Fix if_hw_tsomax_update() not being called.
Jul 26 2025, 8:42 PM

Jul 12 2025

gallatin committed rG78bdaa57cfba: lagg: Fix if_hw_tsomax_update() not being called.
Jul 12 2025, 10:40 PM

Jun 29 2025

gallatin committed rG20e15e905c58: mlx5: Decrease FW init timeout from 120 seconds to 5 seconds.
Jun 29 2025, 8:53 PM

Jun 24 2025

gallatin accepted D51000: sysctl net.inet.tcp.ktlslist: do not rely on global generation for ktls sessions.

Thank you for moving to this solution, away from a global atomic.

Jun 24 2025, 1:30 PM
gallatin added inline comments to D50653: Add sysctl net.inet.tcp.ktlslist.
Jun 24 2025, 2:31 AM
gallatin added inline comments to D50653: Add sysctl net.inet.tcp.ktlslist.
Jun 24 2025, 1:16 AM

Jun 9 2025

gallatin added inline comments to D50546: hwpmc: Support an older application running the old ABI.
Jun 9 2025, 5:24 PM

May 28 2025

gallatin added a comment to D50546: hwpmc: Support an older application running the old ABI.

This generally seems fine to me, but I'm not familiar with the original change and wonder why the compat shims are so coupled to the one application.

May 28 2025, 8:48 PM
gallatin added a comment to D50546: hwpmc: Support an older application running the old ABI.

Should we put the sysctl in the manual?

May 28 2025, 6:39 PM

May 27 2025

gallatin requested review of D50546: hwpmc: Support an older application running the old ABI.
May 27 2025, 4:40 PM

Apr 22 2025

gallatin accepted D49920: so_splice: Disallow splicing with KTLS-enabled sockets.
Apr 22 2025, 11:56 AM

Apr 15 2025

gallatin committed rGb836c229aa5a: ip6: leave room for link headers in UDP.
Apr 15 2025, 11:46 PM
gallatin closed D49840: ipv6: leave room for link headers in UDP.
Apr 15 2025, 11:46 PM
gallatin updated the diff for D49840: ipv6: leave room for link headers in UDP.

Update to use hlen, which already holds the size of the ip6 hdr, as suggested by glebius

Apr 15 2025, 7:15 PM
gallatin requested review of D49840: ipv6: leave room for link headers in UDP.
Apr 15 2025, 5:38 PM

Apr 14 2025

gallatin accepted D49814: so_splice: Synchronize so_unsplice() with so_splice().
Apr 14 2025, 10:29 PM

Mar 22 2025

gallatin accepted D49437: socket: Fix a race in the SO_SPLICE state machine.
Mar 22 2025, 12:02 AM

Mar 20 2025

gallatin committed rGb429d50df97b: ifconfig: fix reporting optics on most 100g interfaces.
Mar 20 2025, 3:29 PM

Mar 14 2025

gallatin accepted D49349: uma: Avoid excessive per-CPU draining.
Mar 14 2025, 5:38 PM
gallatin accepted D49215: In Memoriam: Hans Petter Selasky.
Mar 14 2025, 5:35 PM

Feb 25 2025

gallatin committed rG709348c21351: ifconfig: fix reporting optics on most 100g interfaces.
Feb 25 2025, 7:27 PM
gallatin closed D49127: ifconfig: fix a bug where most optics on 100G and faster NICs are not properly reported.
Feb 25 2025, 7:26 PM

Feb 24 2025

gallatin updated the summary of D49127: ifconfig: fix a bug where most optics on 100G and faster NICs are not properly reported.
Feb 24 2025, 10:47 PM
gallatin requested review of D49127: ifconfig: fix a bug where most optics on 100G and faster NICs are not properly reported.
Feb 24 2025, 10:46 PM

Feb 7 2025

gallatin committed rGd942e2828cab: mlx5en: Fix SIOCSIFCAPNV.
Feb 7 2025, 3:34 PM

Feb 5 2025

gallatin committed rG194bb58b80c1: x86: Fixes for nmi/pmi interrupt sharing.
Feb 5 2025, 3:27 PM

Jan 31 2025

gallatin committed rG36fdc42c6a4c: mlx5en: Fix SIOCSIFCAPNV.
Jan 31 2025, 2:01 AM
gallatin accepted D48729: netstat: restore printing the "default" keyword, provide -nn option.

Thank you!

Jan 31 2025, 1:23 AM

Jan 29 2025

gallatin added a comment to D10320: usr.bin/netstat: -n should not print symbolic names.

I'd very much like for this to be backed out. I feel like users will be chasing the breakage caused by this for years. It broke some tests, iocage, and nstat that I know of in the 5 minutes I've been aware of the commit.

Jan 29 2025, 9:40 PM

Jan 15 2025

gallatin committed rGcf9070746742: Introduce the UMA_ZONE_NOTRIM uma zone type.
Jan 15 2025, 5:24 PM
gallatin closed D48451: add UMA_ZONE_NOTRIM & use it for the ktls_buffer zone.
Jan 15 2025, 5:23 PM

Jan 13 2025

gallatin requested review of D48451: add UMA_ZONE_NOTRIM & use it for the ktls_buffer zone.
Jan 13 2025, 7:50 PM

Nov 25 2024

gallatin accepted D47735: ktls: Enable by default.
Nov 25 2024, 3:25 PM
gallatin accepted D47720: setsockopt.2.
Nov 25 2024, 3:21 PM

Nov 15 2024

gallatin committed rG4605a99b51ab: aio: remove write-only jobid & kernelinfo.
Nov 15 2024, 3:49 PM
gallatin closed D47583: aio: remove write-only jobid & kernelinfo.
Nov 15 2024, 3:49 PM

Nov 14 2024

gallatin added a comment to D47518: aio: improve lock contention on the aio_job_mtx.

Super helpful review, John. I just opened a new review (https://reviews.freebsd.org/D47583) for the simplest suggested change. Will work on your other suggestions.

Nov 14 2024, 11:25 PM
gallatin requested review of D47583: aio: remove write-only jobid & kernelinfo.
Nov 14 2024, 11:24 PM

Nov 13 2024

gallatin added inline comments to D47518: aio: improve lock contention on the aio_job_mtx.
Nov 13 2024, 9:54 PM

Nov 12 2024

gallatin added inline comments to D47518: aio: improve lock contention on the aio_job_mtx.
Nov 12 2024, 2:53 PM
gallatin added inline comments to D47518: aio: improve lock contention on the aio_job_mtx.
Nov 12 2024, 12:00 PM

Nov 11 2024

gallatin added inline comments to D47518: aio: improve lock contention on the aio_job_mtx.
Nov 11 2024, 10:59 PM
gallatin updated the diff for D47518: aio: improve lock contention on the aio_job_mtx.

Address Kib's feedbackj

Nov 11 2024, 10:58 PM
gallatin requested review of D47518: aio: improve lock contention on the aio_job_mtx.
Nov 11 2024, 7:14 PM

Nov 8 2024

gallatin committed rGfd67ff5c7a6c: Use the correct idle routine on recent AMD EPYC servers.
Nov 8 2024, 10:13 PM
gallatin closed D47444: Use correct idle routine on AMD.
Nov 8 2024, 10:13 PM

Nov 6 2024

gallatin added inline comments to D47444: Use correct idle routine on AMD.
Nov 6 2024, 10:39 PM

Nov 4 2024

gallatin requested review of D47444: Use correct idle routine on AMD.
Nov 4 2024, 10:25 PM

Oct 28 2024

gallatin committed rGee373c1234d3: acpi_ged: Handle events directly.
Oct 28 2024, 11:03 PM
gallatin added a comment to D47294: if_bridge: Mask MEXTPG if some members don't support it.

Why do we want or need a hardcoded list? Why can't this function be more like lagg_capabilities()? If we do want a hardcoded list, what about IFCAP_TXTLS*

That's a good question. if_bridge could probably be smarter, indeed.

Why exactly does if_bridge need to care about IFCAP_TXTLS*?

Oct 28 2024, 5:29 PM
gallatin accepted D47295: tuntap: Enable MEXTPG support.
Oct 28 2024, 2:06 PM
gallatin accepted D47294: if_bridge: Mask MEXTPG if some members don't support it.

Why do we want or need a hardcoded list? Why can't this function be more like lagg_capabilities()? If we do want a hardcoded list, what about IFCAP_TXTLS*

Oct 28 2024, 2:05 PM

Oct 25 2024

gallatin added a comment to D47287: cam: Don't log invalid cdb errors.

I'd personally want to keep these messages with bootverbose.. I can imagine it might be handy to see them at times...

Oct 25 2024, 10:48 PM

Oct 23 2024

gallatin committed rG49597c3e84c4: mlx5e: Use M_WAITOK when allocating TLS tags.
Oct 23 2024, 7:58 PM
gallatin closed D47260: mlx5e: Immediately initialize TLS send tags.
Oct 23 2024, 7:53 PM
gallatin committed rG81dbc22ce8b6: mlx5e: Immediately initialize TLS send tags.
Oct 23 2024, 7:53 PM
gallatin added inline comments to D47260: mlx5e: Immediately initialize TLS send tags.
Oct 23 2024, 3:17 PM
gallatin updated the diff for D47260: mlx5e: Immediately initialize TLS send tags.

Fix style issue pointed out by Mark

Oct 23 2024, 3:10 PM

Oct 22 2024

gallatin added a comment to D4295: Add driver backpressure.

Why is this re-surfacing?

Oct 22 2024, 11:19 PM · transport
gallatin requested review of D47260: mlx5e: Immediately initialize TLS send tags.
Oct 22 2024, 9:58 PM

Oct 16 2024

gallatin added a comment to D30155: ixgbe: Bring back accounting for tx in AIM.

The a/b results were not surprising (boring as David likes to say). Just slightly higher CPU on the canary (due to the increased irq rate). But no clear streaming quality changes.
All in all, it seems to work and do no real harm, but we'll not use it due to the increased CPU

Oct 16 2024, 6:16 PM
gallatin added a comment to D30155: ixgbe: Bring back accounting for tx in AIM.

Yeah, my ideal irq rate/queue is < 1000 . We mostly use Chelsio and Mellanox NICs that can do super aggressive irq coalescing without freaking out TCP due to using RX timestamps. Super aggressive coalescing like this lets us build packet trains in excess of 1000 packets to feed to lro via RSS assisted LRO, and we actually have useful LRO on internet workloads with tens of thousands of TCP connections per-queue. That reminds me that I should port RSS assisted LRO to iflib (eg, lro_queue_mbuf()).

Oct 16 2024, 2:41 AM
gallatin added a comment to D30155: ixgbe: Bring back accounting for tx in AIM.

@imp @gallatin if you are able to test your workload, setting this to 1 and 2 would be new behavior versus where you are currently:

I can pull this into our tree and make an image for @dhw to run on the A/B cluster. However, we're not using this hardware very much any more, and there is only 1 pair of machines using it in the A/B cluster. Lmk if you're still interested, and I'll try to build the image tomorrow so that David can test it at his leisure.

Sure, it sounds like that is only enough for one experiment so I would focus on the default algorithm the patch will boot with sysctl dev.ix.<N>.enable_aim=1

Oct 16 2024, 1:39 AM

Oct 15 2024

gallatin accepted D46785: netinet*: Add assertions for some places that don't support M_EXTPG mbufs.
Oct 15 2024, 5:10 PM
gallatin updated subscribers of D30155: ixgbe: Bring back accounting for tx in AIM.
Oct 15 2024, 2:41 AM

Oct 14 2024

gallatin added a comment to D45950: vtnet: Fix an LOR in the input path.
In D45950#1073880, @jhb wrote:

I don't think we need the taskqueue. It's probably just a design copied from the Intel drivers, and I don't think it makes much sense for those either. The other thing that can be nice to do though when making this change is to instead build a temporary list of packets linked via m_nextpkt (mbufq works for this) and pass an entire batch to if_input. This lets you avoid dropping the lock as often.

Oct 14 2024, 8:57 PM

Oct 7 2024

gallatin added a comment to D46761: mlx5en: do no call if_input() while holding the rq mutex.
In D46761#1070797, @kib wrote:

No, the lock cannot be sleepable because the processing occurs in the context of the interrupt thread.

I would implemented something with blockcount_t or even epoch, but then I realized that it would not help. blockcount cannot be used because rx memory is not type-stable. Driver-private epoch might work, but then note that the second reported backtrace in the PR 281368 shows ip stack acquiring sleepable lock. So even if I try to fix driver, the stack still tries to sleep in ip_input().

I suspect you (Netflix) did not see the deadlock because you either do not use ipv6 or use it in situation with static network configuration. The problems are visible when multicast group membership is changed, at least this is what I see in the PR.

Oct 7 2024, 8:17 PM

Oct 1 2024

gallatin accepted D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.
Oct 1 2024, 5:58 PM

Sep 26 2024

gallatin accepted D46784: ktls: Mark mbufs containing outbound encrypted TLS records read-only.
Sep 26 2024, 2:38 PM
gallatin accepted D46787: mbuf: Add M_WRITABLE_EXTPG.
Sep 26 2024, 2:37 PM
gallatin added a comment to D46786: m_unshare: Fail with a NULL return if the chain contains unmapped mbufs.

Would it be better to call mb_unmapped_to_ext() here ?

Sep 26 2024, 2:36 PM
gallatin added a comment to D46787: mbuf: Add M_WRITABLE_EXTPG.

Ah, OK, I understand now.

Sep 26 2024, 2:22 PM

Sep 25 2024

gallatin requested changes to D46761: mlx5en: do no call if_input() while holding the rq mutex.
Sep 25 2024, 11:17 PM
gallatin added a comment to D46761: mlx5en: do no call if_input() while holding the rq mutex.

I'm very afraid there will be performance implications due to new cache misses here from queing mbufs twice. On tens of thounsands of interfaces running over 8 years, we've never hit a deadlock from this lock, and I don't think fixing this is important enough to hurt performance for.

Sep 25 2024, 11:16 PM
gallatin added a comment to D46787: mbuf: Add M_WRITABLE_EXTPG.

I'm confused.. if we are marking non-writable M_EXTPG mufs as M_RDONLY, why can't we simply remove the M_EXTPG check from M_WRITABLE? Why do we need a new macro?

Sep 25 2024, 11:09 PM
gallatin accepted D46783: mbuf: Don't force all M_EXTPG mbufs to be read-only.
Sep 25 2024, 11:08 PM

Sep 9 2024

gallatin accepted D46412: tests: Add some test cases for SO_SPLICE.
Sep 9 2024, 4:08 PM
gallatin accepted D46411: socket: Implement SO_SPLICE.
Sep 9 2024, 4:07 PM

Sep 5 2024

gallatin accepted D46411: socket: Implement SO_SPLICE.

This passes basic sanity testing at netflix. Sorry for the delayed approval; we had a few integration issues with this and a local Netflix feature that made it look like splice was not working. It only just now became obvious that it was due to our local feature & how to fix it.

Sep 5 2024, 6:40 PM

Aug 16 2024

gallatin accepted D46303: socket: Split up soreceive_stream().
Aug 16 2024, 9:27 PM
gallatin accepted D46304: socket: Split up soreceive_generic().
Aug 16 2024, 9:25 PM
gallatin accepted D46305: socket: Split up sosend_generic().
Aug 16 2024, 9:24 PM

Aug 5 2024

gallatin committed rG1f628be888b7: tcp_ratelimit: provide an api for drivers to release ratesets at detach.
Aug 5 2024, 4:52 PM
gallatin closed D46221: tcp_ratelimit: provide a hook for drivers to release ratesets at detach.
Aug 5 2024, 4:52 PM
gallatin added inline comments to D46221: tcp_ratelimit: provide a hook for drivers to release ratesets at detach.
Aug 5 2024, 3:45 PM

Aug 4 2024

gallatin updated the summary of D46221: tcp_ratelimit: provide a hook for drivers to release ratesets at detach.
Aug 4 2024, 4:13 PM
gallatin requested review of D46221: tcp_ratelimit: provide a hook for drivers to release ratesets at detach.
Aug 4 2024, 4:10 PM

Jul 18 2024

gallatin accepted D46024: nvme: Always lock and only avoid processing for recovery state.
Jul 18 2024, 10:00 PM
gallatin accepted D46031: nvme: Warn if there's system interrupt issues..
Jul 18 2024, 9:56 PM

Jul 15 2024

gallatin added a comment to D45950: vtnet: Fix an LOR in the input path.

Is this safe? I think so, but I confess that I don't know the low level details in this driver very well.

I believe so, from what I see, the lock exists to synchronize with the taskqueue and to protect some non-atomic counters.

When I read a network driver, I view a lock around rx processing as an indicator there is room for improvement in the design. The reason the lock seems to exist is to serialize rx ring servicing between the ithread (the normal path) and the taskqueue (which is woken if we continually find more packets to process... or maybe if interrupts don't work..?). I don't really understand code at the bottom of vtnet_rx_vq_process(). It seems like interrupts should be disabled if switching to the taskqueue, and enabled if returning from it. It probably has something to do with the "race" mentioned in that code..

I don't quite understand that either. The comment above the definition of VTNET_INTR_DISABLE_RETRIES suggests to me that the idea is:

  • vtnet_rxq_eof() returns 0, so more == 0, i.e., there were no more descriptors to process.
  • vtnet_rxq_enable_intr() returned 1, meaning that we found some completed descriptors on the queue when enabling interrupts.
  • We should call vtnet_rxq_eof() again to collect those newly completed descriptors instead of deferring.

I'm not sure I understand the purpose of the taskqueue at all though. Why can't we handle all packets in the ithread context?

Jul 15 2024, 8:11 PM
gallatin added a comment to D45950: vtnet: Fix an LOR in the input path.

Is this safe? I think so, but I confess that I don't know the low level details in this driver very well.

Jul 15 2024, 1:11 AM

Jul 8 2024

gallatin accepted D45922: socket: Simplify synchronization in soreceive_stream().
Jul 8 2024, 7:56 PM

Jul 1 2024

gallatin accepted D45764: arm64: Add smbios to kernel.
Jul 1 2024, 6:41 PM
gallatin accepted D45763: smbios: Add length sanity checking.
Jul 1 2024, 6:40 PM

Jun 21 2024

gallatin accepted D45675: ktls: Remove the socket parameter to ktls_ocf_try().

I was concerned at first about isal, but then I remembered that @jhb had moved it from plugging in at the ktls layer to plugging in at the ocf layer

Jun 21 2024, 6:41 PM