Page MenuHomeFreeBSD

gallatin (Andrew Gallatin)
User

Projects

User Details

User Since
Jun 22 2015, 5:21 PM (580 w, 4 d)

Recent Activity

Wed, Aug 5

gallatin accepted D58545: tests/kern: Skip Capsicum procdesc tests when capability mode is unavailable.
Wed, Aug 5, 5:23 PM

Tue, Aug 4

gallatin added inline comments to D58621: if_bnxt: rework interrupt coalescing onto the AGGINT_QCAPS scheme.
Tue, Aug 4, 8:45 PM
gallatin accepted D58619: if_bnxt: drop redundant PCI disable in bnxt_fw_reset_close().
Tue, Aug 4, 8:33 PM
gallatin accepted D58617: if_bnxt: fix HWRM failures/timeouts after repeated FW resets.
Tue, Aug 4, 8:33 PM
gallatin accepted D58600: if_bnxt: add host-based TX completion coalescing.
Tue, Aug 4, 8:30 PM
gallatin accepted D58616: if_bnxt: Never ARM Tx CQ as they are not interrupt-driven.
Tue, Aug 4, 8:27 PM
gallatin accepted D58615: if_bnxt: avoid FTQM/STQM pg_info alias on reset.
Tue, Aug 4, 8:26 PM
gallatin accepted D58614: if_bnxt: add support for HW generic stats.

Nice! These stats look really interesting.

Tue, Aug 4, 8:26 PM
gallatin accepted D58618: if_bnxt: support more Tx rings than Rx rings on P5+.
Tue, Aug 4, 8:24 PM
gallatin accepted D58613: if_bnxt: Restore Rx CQ doorbell skip-when-idle optimization on P5.
Tue, Aug 4, 8:23 PM
gallatin accepted D58612: if_bnxt: ktls: Reject new kTLS sessions once driver is detaching.
Tue, Aug 4, 8:21 PM
gallatin added inline comments to D58611: bnxt_re: Fix witness reported calltrace while unloading driver.
Tue, Aug 4, 8:20 PM
gallatin accepted D58610: if_bnxt: Collect hw stats every 250 milliseconds.
Tue, Aug 4, 8:12 PM
gallatin accepted D58609: if_bnxt: Pass HWRM cmd response to apps even if FW fails it.
Tue, Aug 4, 8:11 PM
gallatin accepted D58608: if_bnxt: honor firmware min wait before VER_GET on reset.
Tue, Aug 4, 8:10 PM
gallatin accepted D58607: if_bnxt: Fix HWRM mailbox/DMA teardown race on detach.
Tue, Aug 4, 8:08 PM
gallatin requested changes to D58638: iflib: Plumb per-packet RX hardware timestamps from drivers to mbufs.
Tue, Aug 4, 8:04 PM
gallatin accepted D58620: if_bnxt: drop epoch_arr[] to detect EPOCH bit toggle.
Tue, Aug 4, 7:43 PM
gallatin added a comment to D58606: if_bnxt: add kTLS (kernel TLS) TX offload.

Also, bnxt_ktls_pre_xmit() and bnxt_ktls_submit_mbuf() both write BDs and advance txr->prod directly, and neither

compares against the consumer.  Is that safe?
Tue, Aug 4, 4:04 PM

Mon, Aug 3

gallatin added a comment to D58602: if_ bnxt: Fix interrupt storm on Thor2.

Why is the if needed? UINT32_MAX +1 == 0

Mon, Aug 3, 11:29 PM
gallatin requested changes to D58605: if_bnxt: add bitmap search/test-and-set helpers.

Can't most these just be implemented in terms of the already existing primitives in sys/bitstring.h? Eg, bnxt_find_first_zero_bit -> bit_ffc bnxt_find_next_zero_bit -> bit_ffc_at bnxt_find_next_bit > bit_ffs_

Mon, Aug 3, 11:25 PM
gallatin accepted D58604: if_bnxt: add bnxt_compat.h version-compat shim.
Mon, Aug 3, 11:00 PM
gallatin added a comment to D58603: if_bnxt: add MPC (Mid-Path Channel) ring infrastructure.

I think every mpc allocation is leaked on detach. Eg, frees are done from bnxt_queues_free(). iflib runs bnxt_detach(), which sets mpc_info = NULL. And then runs bnxt_queues_free(), which gates freeing on if (!mpc) return;

Mon, Aug 3, 10:58 PM
gallatin accepted D58601: if_bnxt: Support backing store v2 for Thor if FW supports it.
Mon, Aug 3, 9:01 PM
gallatin added inline comments to D58599: if_bnxt: add HW-based TX completion coalescing.
Mon, Aug 3, 8:54 PM
gallatin added a comment to D58598: if_bnxt: add CAGR interrupt coalescing tick-resolution support.

Does something need to re-apply this after reset?

Mon, Aug 3, 8:15 PM
gallatin added a comment to D58596: if_bnxt: add RX timestamping support.
  • In addition to the inline comments, please make the code conform to style(9)
  • There do not seem to be licenses on the new files
Mon, Aug 3, 7:56 PM
gallatin added a comment to D58452: iflib: drain the admin task before detaching the interface.

I spent a while looking at this, and I think maybe we should do a taskqueue_drain_all() here instead. Some drivers (bnxt) use their own tasks registered via iflib_config_task_init that deal with link events and might be subject to the same issue.

Mon, Aug 3, 6:25 PM
gallatin accepted D58282: iflib: remove the unused TX queue state machine.
Mon, Aug 3, 6:07 PM
gallatin committed rG3a6bf8a72d49: ifconfig: Improve CMIS parsing of breakout configs (authored by gallatin).
ifconfig: Improve CMIS parsing of breakout configs
Mon, Aug 3, 4:55 PM
gallatin closed D58263: ifconfig: Improve CMIS parsing of breakout configs.
Mon, Aug 3, 4:54 PM
gallatin accepted D58376: iflib: clean up correctly when device attach fails.
Mon, Aug 3, 4:50 PM · iflib, network

Thu, Jul 16

gallatin added a comment to D58266: iflib: restore TX watchdog functionality.

This fires too often, maybe some false positives. I will rework.

Thu, Jul 16, 12:57 PM

Wed, Jul 15

gallatin added a comment to D58266: iflib: restore TX watchdog functionality.

The whole watchdog thing, like mp_ring, is absurdly over-complicated for no real reason. Just do it the mxge way: if we have pending transmits (eg, producer != consumer) *AND* the nic has not consumed any packets since the last time the watchdog callout ran, then reset. I get dizzy every time i look at the iflib queue-state stuff. Its just extra complexity that adds nothing.

Wed, Jul 15, 8:12 PM
gallatin added a comment to D58263: ifconfig: Improve CMIS parsing of breakout configs.

Before and after:

Wed, Jul 15, 6:24 PM
gallatin requested review of D58263: ifconfig: Improve CMIS parsing of breakout configs.
Wed, Jul 15, 5:56 PM

Tue, Jul 14

gallatin accepted D58189: mbuf: make m_unshare() allow unmapped mbufs.
Tue, Jul 14, 5:09 PM

Mon, Jul 13

gallatin added a comment to D58189: mbuf: make m_unshare() allow unmapped mbufs.

I'd write this as 'mcopydata(m,off, len, mtod(..));

Mon, Jul 13, 5:54 PM

Jul 8 2026

gallatin committed rG1cce5ef05d7b: lagg: re-check port caps after bringing up a port (authored by gallatin).
lagg: re-check port caps after bringing up a port
Jul 8 2026, 12:29 PM
gallatin closed D58062: lagg: re-check port caps after bringing up a port.
Jul 8 2026, 12:28 PM
gallatin added inline comments to D58062: lagg: re-check port caps after bringing up a port.
Jul 8 2026, 12:23 PM

Jul 6 2026

gallatin requested review of D58062: lagg: re-check port caps after bringing up a port.
Jul 6 2026, 6:55 PM

Jul 3 2026

gallatin accepted D58025: acpi_einj: Support for ACPI error injection.
Jul 3 2026, 5:30 PM
gallatin accepted D58024: acpi: Add a pseudo-bus for APEI devices to manage resources.
Jul 3 2026, 4:49 PM
gallatin accepted D58026: einj: Tool to manage APEI error injection.
Jul 3 2026, 4:45 PM

Jun 30 2026

gallatin accepted D57974: ktls: Add a tunable to disable TLS receive.
Jun 30 2026, 10:17 PM
gallatin accepted D57973: ktls: Centralize the check for CBC ciphers.
Jun 30 2026, 10:16 PM

Jun 26 2026

gallatin accepted D57557: ktls: Propagate EPG_FLAG_ANON to mapped mbufs.

I agree that its unfortunate to burn a flag on this, but in the near term, I think this fixes a real bug and should be committed.

Jun 26 2026, 8:51 PM

Jun 23 2026

gallatin committed rGfdca6b70aa7e: bnxt: Report actual link speed, rather than hard-coded 100Gbs (authored by gallatin).
bnxt: Report actual link speed, rather than hard-coded 100Gbs
Jun 23 2026, 5:02 PM
gallatin committed rG074ff8746388: iflib: handle transient errors from isc_txd_encap() (authored by gallatin).
iflib: handle transient errors from isc_txd_encap()
Jun 23 2026, 5:02 PM
gallatin closed D57550: iflib: handle transient errors from isc_txd_encap().
Jun 23 2026, 5:02 PM

Jun 17 2026

gallatin added a comment to D57537: iflib: Fix mbufs leaked by 0 len packets emitted from the if driver.
In D57537#1321127, @kp wrote:

It took me a while, but I think your patch is correct.

@gallatin Do you want to commit this, or should I? (Reid doesn't have a bit, so someone else needs to.)

Jun 17 2026, 6:10 PM · network
gallatin added a reviewer for D57550: iflib: handle transient errors from isc_txd_encap(): kp.
Jun 17 2026, 6:09 PM

Jun 15 2026

gallatin accepted D57558: socket: remove tautological condition in so_unsplice().
Jun 15 2026, 2:14 PM

Jun 12 2026

gallatin accepted D57537: iflib: Fix mbufs leaked by 0 len packets emitted from the if driver.

It took me a while, but I think your patch is correct.

Jun 12 2026, 7:37 PM · network
gallatin requested review of D57550: iflib: handle transient errors from isc_txd_encap().
Jun 12 2026, 3:38 PM

Jun 6 2026

gallatin committed rG16e5abf415ba: APEI: Provide more info on fatal hardware errors (authored by gallatin).
APEI: Provide more info on fatal hardware errors
Jun 6 2026, 12:17 AM
gallatin closed D57417: APEI: Provide more info on fatal hardware errors.
Jun 6 2026, 12:16 AM

Jun 3 2026

gallatin added inline comments to D57309: tcp: add eventlog(9) provider for TCP.
Jun 3 2026, 10:45 PM
gallatin requested review of D57417: APEI: Provide more info on fatal hardware errors.
Jun 3 2026, 5:38 PM

Jun 2 2026

gallatin committed rGe98ed8d99fd4: lacp: Simplify lacp_compose_key() (authored by gallatin).
lacp: Simplify lacp_compose_key()
Jun 2 2026, 10:51 PM
gallatin closed D57026: lacp: simplify lacp_compose_key().
Jun 2 2026, 10:51 PM

Jun 1 2026

gallatin added a comment to D56979: kern: import eventlog(9), a kernel event logging framework.

So, TL;DR, eventlog is different enough from how bblog is architected that it must be a new system.

Jun 1 2026, 6:38 PM

May 29 2026

gallatin accepted D57316: src.opts.mk: enable OPENSSL_KTLS by default on riscv64.
May 29 2026, 1:40 PM
gallatin committed rG3118f1b99f23: bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV (authored by gallatin).
bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV
May 29 2026, 1:06 PM
gallatin closed D57300: bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV.
May 29 2026, 1:06 PM

May 28 2026

gallatin requested review of D57300: bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV.
May 28 2026, 3:43 PM

May 25 2026

gallatin committed rGb97ee5e9ce7b: hwpmc: Avoid panic on AMD cpus where IBS is not available (authored by gallatin).
hwpmc: Avoid panic on AMD cpus where IBS is not available
May 25 2026, 8:35 PM

May 22 2026

gallatin committed rGfd9af1e7084c: sendfile: Fix bug when using headers with SW KTLS offload (authored by gallatin).
sendfile: Fix bug when using headers with SW KTLS offload
May 22 2026, 6:34 PM
gallatin closed D57134: sendfile: Fix bug when using headers with SW KTLS offload.
May 22 2026, 6:34 PM

May 21 2026

gallatin added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.

For this particular patch, I'd suggest the following.

The _svc_vc_checkextpg() should be made a generic function living somewhere in sys/net/route. It should accept socket address and return a referenced struct nhop_object *. It should call fib[46]_lookup() with NHR_REF flag. It also should be passed a u_int * argument that it shall fill with current route table generation number obtained via rt_tables_get_gen(). Alternatively the generic function may assert the epoch, and then it would be the caller's choice to pull the route generation number together with the lookup or not.

The svc_vc code should call this generic function at setup and store returned struct nhop_object * and rtgen number in its xprt.

On packet generation it should first do rt_tables_get_gen() to validate that routing table did not change. If it did, then dereference the stored nhop and call the generic function again to get a new one. After that it can consult xprt->nh->nh_ifp->if_capenable to decide if to use extended mbufs. AFAIK, we are always in the net epoch at the packet generation.

The above is not 100% beautiful as the rt_* and nhop_* and fib_* KPIs are slightly decoupled, despite they describe the same backend. However, the above is exactly what the generic ip_output() does today.

P.S. Alexander had left a promising comment for bright future in nhop.h:

* TODO: subscribe for the interface notifications and update the nexthops
*  with NHF_INVALID flag.

So some day this is going to be improved.

May 21 2026, 5:11 PM
gallatin added inline comments to D57134: sendfile: Fix bug when using headers with SW KTLS offload.
May 21 2026, 4:14 PM
gallatin added inline comments to D57134: sendfile: Fix bug when using headers with SW KTLS offload.
May 21 2026, 3:57 PM
gallatin added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.
In D55203#1309629, @kib wrote:

I think it could be set to 'enabled' for machines with DMAP, i.e. amd64/arm64, and might be risc-v, if anybody ever uses nfs server on it. For other arches, the knob almost surely should be kept disabled.
mb_unmapped_to_ext() uses non-privately mapped sfbufs for all extents of mbufs. On DMAP systems, it is free. On other arches, allocating such sfbuf causes global IPI, and the whole chain of sfbufs is freed only after the mbufs are released by the network card. Besides the cost of allocating , this would make sfbufs scarce resource for other consumers and even for nfs server itself. There are around ~1K of sfbufs, and mb_unmapped_to_ext() seems to drop packet if an sfbuf cannot be allocated immediately.

May 21 2026, 3:48 PM
gallatin added a reverting change for rG2fe37927d419: loopback: Clear hash unconditionally.: rGd7cde43f95bf: Revert "loopback: Clear hash unconditionally.".
May 21 2026, 1:39 PM
gallatin committed rGd7cde43f95bf: Revert "loopback: Clear hash unconditionally." (authored by gallatin).
Revert "loopback: Clear hash unconditionally."
May 21 2026, 1:38 PM
gallatin added a reverting change for D53090: loopback: Clear hash unconditionally.: rGd7cde43f95bf: Revert "loopback: Clear hash unconditionally.".
May 21 2026, 1:38 PM
gallatin added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.

I don't think this is a right fix. A route lookup now doesn't guarantee the same interface will be used in the future. There is dynamic routing, weighted routing, policy routing, etc etc etc.

There should be some generic gate that would convert mbufs otherwise, we will need to add a code like this every module that generates mbufs. Again, a code that is not correct when routing isn't static.

As Rick said in the description, this is just a hint, and the conversion routine in ip_output() will handle any case where the egress NIC changes. However, just using extpg mbufs all the time seems like a better solution. That's what SW ktls offload does. mb_unmapped_to_ext() is not super expensive, and most high-ish performance NICs are aware of extpgs these days (iflib + mlx5 + cxgbe covers most 10Gb or more NICs in practice).

Kostik preferred not enabling it all the time.
See thtis:
https://lists.freebsd.org/archives/freebsd-net/2026-May/008766.html

The case of concern is some corner case, where
the "always enabled" causes a regression. I asked on freebsd-net@
to try and determine if such a case exists?

Kostik didn't indicate if he thought such a case exists, but was
concerned that the user wouldn't understand why the regression
happened (and the NFS patch includes a sysctl that turns it off).
--> Right now, it is never enabled, so not enabling it does not

 introduce a regression.
Enabling it unconditionally makes a regression more likely
than only enabling it when this hint thinks the NIC can do it
and that hint is incorrect.

I doubt NFS servers have frequent routing changes, but I do not
know that for certain?

You guys can debate it. If there is no consensus, I'll just leave
it disabled as it is now.

May 21 2026, 1:27 PM

May 20 2026

gallatin added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.

I don't think this is a right fix. A route lookup now doesn't guarantee the same interface will be used in the future. There is dynamic routing, weighted routing, policy routing, etc etc etc.

There should be some generic gate that would convert mbufs otherwise, we will need to add a code like this every module that generates mbufs. Again, a code that is not correct when routing isn't static.

May 20 2026, 8:20 PM
gallatin requested review of D57134: sendfile: Fix bug when using headers with SW KTLS offload.
May 20 2026, 6:59 PM

May 19 2026

gallatin accepted D57083: if_media.h: Add 800GBase-X and 200Gbit/s per lane support.
May 19 2026, 3:18 PM

May 16 2026

gallatin updated the summary of D57026: lacp: simplify lacp_compose_key().
May 16 2026, 2:01 AM
gallatin requested review of D57026: lacp: simplify lacp_compose_key().
May 16 2026, 2:00 AM

May 12 2026

gallatin accepted D56972: sys/time: add bintime2us() helper.

LGTM

May 12 2026, 5:53 PM
gallatin added a reviewer for D56972: sys/time: add bintime2us() helper: imp.
May 12 2026, 5:52 PM
gallatin added a reverting change for rGce33f96fcf2f: mlx5e: Ensure rx timestamps are monotonically increasing: rG23b263dfbf5e: Revert "mlx5e: Ensure rx timestamps are monotonically increasing".
May 12 2026, 1:03 PM
gallatin added a reverting change for D56427: mlx5e: Ensure rx timestamps are monotonically increasing: rG23b263dfbf5e: Revert "mlx5e: Ensure rx timestamps are monotonically increasing".
May 12 2026, 1:03 PM
gallatin committed rG23b263dfbf5e: Revert "mlx5e: Ensure rx timestamps are monotonically increasing" (authored by gallatin).
Revert "mlx5e: Ensure rx timestamps are monotonically increasing"
May 12 2026, 1:03 PM
gallatin closed D56579: lacp: fix link state with multiple aggregators.
May 12 2026, 1:02 PM
gallatin committed rG9f69446d4548: lacp: fix link state with multiple aggregators (authored by gallatin).
lacp: fix link state with multiple aggregators
May 12 2026, 1:02 PM

Apr 29 2026

gallatin committed rG72e2ae505c4a: tcp: release nic ktls send tags when entering time wait (authored by gallatin).
tcp: release nic ktls send tags when entering time wait
Apr 29 2026, 11:37 PM
gallatin closed D56610: tcp: release nic ktls send tags before time wait.
Apr 29 2026, 11:36 PM

Apr 25 2026

gallatin updated the diff for D56610: tcp: release nic ktls send tags before time wait.

Address review feedback by moving this into tcp_twstart()

Apr 25 2026, 12:45 AM

Apr 24 2026

gallatin committed rG5923b363ca61: net: Fix collision between SIOCGI2CPB and IPSECGREQID (authored by gallatin).
net: Fix collision between SIOCGI2CPB and IPSECGREQID
Apr 24 2026, 8:31 PM
gallatin added inline comments to D56610: tcp: release nic ktls send tags before time wait.
Apr 24 2026, 4:05 PM

Apr 23 2026

gallatin requested review of D56610: tcp: release nic ktls send tags before time wait.
Apr 23 2026, 9:23 PM

Apr 22 2026

gallatin added inline comments to D56564: offload: Compute and insert checksums as late as possible.
Apr 22 2026, 4:02 PM
gallatin requested review of D56579: lacp: fix link state with multiple aggregators.
Apr 22 2026, 3:39 PM

Apr 21 2026

gallatin added inline comments to D56564: offload: Compute and insert checksums as late as possible.
Apr 21 2026, 10:30 PM
gallatin committed rG16de94eaf09b: audit: Fix logging of IPv6 addresses (authored by gallatin).
audit: Fix logging of IPv6 addresses
Apr 21 2026, 1:29 PM