Page MenuHomeFreeBSD

gallatin (Andrew Gallatin)
User

Projects

User Details

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

Recent Activity

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

Wed, Jul 8

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
Wed, Jul 8, 12:29 PM
gallatin closed D58062: lagg: re-check port caps after bringing up a port.
Wed, Jul 8, 12:28 PM
gallatin added inline comments to D58062: lagg: re-check port caps after bringing up a port.
Wed, Jul 8, 12:23 PM

Mon, Jul 6

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

Fri, Jul 3

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

Tue, Jun 30

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

Fri, Jun 26

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.

Fri, Jun 26, 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
gallatin closed D39633: audit: Fix logging of IPv6 addresses.
Apr 21 2026, 1:28 PM

Apr 20 2026

gallatin added a comment to D39633: audit: Fix logging of IPv6 addresses.

a few years late to the party here but have you tested this?

Apr 20 2026, 9:40 PM

Apr 18 2026

gallatin accepted D56509: iflib: fix book keeping.

Thank you for fixing this for me!

Apr 18 2026, 7:47 PM
gallatin committed rG29336f1c9d25: tcp: Allocate t_tcpreq_info on demand (authored by gallatin).
tcp: Allocate t_tcpreq_info on demand
Apr 18 2026, 7:10 PM
gallatin closed D56484: tcp: Allocate t_tcpreq_info on demand.
Apr 18 2026, 7:10 PM

Apr 17 2026

gallatin added a comment to D56484: tcp: Allocate t_tcpreq_info on demand.

Two options: 1) embed all of this in struct tcp_rack:

#ifdef TCP_REQUEST_TRK
        /* Response tracking addons. */
        uint8_t t_tcpreq_req;   /* Request count */
        uint8_t t_tcpreq_open;  /* Number of open range requests */
        uint8_t t_tcpreq_closed;        /* Number of closed range requests */
        uint32_t tcp_hybrid_start;      /* Num of times we started hybrid pacing */
        uint32_t tcp_hybrid_stop;       /* Num of times we stopped hybrid pacing */
        uint32_t tcp_hybrid_error;      /* Num of times we failed to start hybrid pacing */
        struct tcp_sendfile_track *t_tcpreq_info;
#endif

or 2) create a new structure that holds all of the above, lazily allocate it and have a pointer from struct tcp_rack to it.

Apr 17 2026, 8:31 PM
gallatin requested review of D56484: tcp: Allocate t_tcpreq_info on demand.
Apr 17 2026, 8:08 PM
gallatin committed rG3fade68cfdf9: iflib: accurately count bytes/segments for TSO (authored by gallatin).
iflib: accurately count bytes/segments for TSO
Apr 17 2026, 5:36 PM
gallatin committed rG52e7958702be: iflib: ignore reclaim coalescing when low on tx descriptors (authored by gallatin).
iflib: ignore reclaim coalescing when low on tx descriptors
Apr 17 2026, 5:36 PM
gallatin closed D56338: iflib: accurately account for TSO packets & transmitted.
Apr 17 2026, 5:35 PM
gallatin closed D56339: iflib: ignore reclaim coalescing when low on tx descriptors.
Apr 17 2026, 5:35 PM

Apr 16 2026

gallatin accepted D56385: so_splice: Fix the KTLS check for the sink socket in so_splice().
Apr 16 2026, 5:04 PM
gallatin closed D56427: mlx5e: Ensure rx timestamps are monotonically increasing.
Apr 16 2026, 4:31 PM
gallatin committed rGce33f96fcf2f: mlx5e: Ensure rx timestamps are monotonically increasing (authored by gallatin).
mlx5e: Ensure rx timestamps are monotonically increasing
Apr 16 2026, 4:31 PM
gallatin requested review of D56427: mlx5e: Ensure rx timestamps are monotonically increasing.
Apr 16 2026, 1:26 PM

Apr 14 2026

gallatin committed rG956acdce0505: loopback: Account for packet drops (authored by gallatin).
loopback: Account for packet drops
Apr 14 2026, 7:48 PM
gallatin closed D56356: loopback: Account for packet drops.
Apr 14 2026, 7:47 PM
gallatin committed rG963f1a5455c9: ifconfig: add CMIS support for 400GbE optics (authored by gallatin).
ifconfig: add CMIS support for 400GbE optics
Apr 14 2026, 6:51 PM
gallatin committed rGf707cc00ed12: lro: move pkt rejection checks to leafs to avoid queueing non-LRO'able pkts (authored by gallatin).
lro: move pkt rejection checks to leafs to avoid queueing non-LRO'able pkts
Apr 14 2026, 6:51 PM
gallatin closed D56265: ifconfig: Add CMIS support for 400GbE optics.
Apr 14 2026, 6:51 PM
gallatin closed D56337: lro: move packet rejection checks out of lro_rx_common to avoid queueing non-LRO'able packets.
Apr 14 2026, 6:51 PM

Apr 11 2026

gallatin updated the test plan for D56356: loopback: Account for packet drops.
Apr 11 2026, 9:13 PM
gallatin requested review of D56356: loopback: Account for packet drops.
Apr 11 2026, 9:13 PM

Apr 9 2026

gallatin added a comment to D56337: lro: move packet rejection checks out of lro_rx_common to avoid queueing non-LRO'able packets.
In D56337#1289068, @bz wrote:

I am wondering if you can see the V_ipforwarding/V_ip6_forwarding hits?
Does it make any differences if you do the mbuf pkthdr checks first?

Silly idea I don't like much as inet and inet6 should be distinct but would it help if we would make sure they are in the same cache line?

Apr 9 2026, 11:42 PM
gallatin requested review of D56339: iflib: ignore reclaim coalescing when low on tx descriptors.
Apr 9 2026, 11:36 PM
gallatin requested review of D56338: iflib: accurately account for TSO packets & transmitted.
Apr 9 2026, 11:27 PM
gallatin requested review of D56337: lro: move packet rejection checks out of lro_rx_common to avoid queueing non-LRO'able packets.
Apr 9 2026, 11:12 PM

Apr 5 2026

gallatin requested review of D56265: ifconfig: Add CMIS support for 400GbE optics.
Apr 5 2026, 10:33 PM
gallatin committed rGcf1f21572897: net: Add SIOCGI2CPB ioctl & add page/bank fields to ifi2creq (authored by gallatin).
net: Add SIOCGI2CPB ioctl & add page/bank fields to ifi2creq
Apr 5 2026, 9:08 PM
gallatin closed D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
Apr 5 2026, 9:08 PM

Apr 4 2026

gallatin committed rG3f79bc9ca336: Fix nooptions VIMAGE build (authored by gallatin).
Fix nooptions VIMAGE build
Apr 4 2026, 11:11 PM
gallatin added a comment to D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
In D55912#1287051, @kib wrote:

Sorry for the late reply.

I think this should work as is. See below.

Apr 4 2026, 10:22 PM