Page MenuHomeFreeBSD

gallatin (Andrew Gallatin)
User

Projects

User Details

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

Recent Activity

Sun, Apr 5

gallatin requested review of D56265: ifconfig: Add CMIS support for 400GbE optics.
Sun, Apr 5, 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
Sun, Apr 5, 9:08 PM
gallatin closed D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
Sun, Apr 5, 9:08 PM

Sat, Apr 4

gallatin committed rG3f79bc9ca336: Fix nooptions VIMAGE build (authored by gallatin).
Fix nooptions VIMAGE build
Sat, Apr 4, 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.

Sat, Apr 4, 10:22 PM
gallatin requested changes to D55988: ice(4): Fix traffic distribution on TX queues.

I hate that I'm saying this, but this isn't just an ice(4) problem... The same thing will happen for the queue selection in iflib itself for most other drivers, and for the queue selection in non-iflib drivers. So I think it should be solved in a more generic fashion.

Sat, Apr 4, 9:57 PM

Sat, Mar 28

gallatin updated the diff for D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.

Updated diff to add a new ioctl for page-bank operations.
Changed the 2 drivers that might use page/bank (iflib, mce) to accept the new ioctl and to ensure they are not reading garbage page/bank fields when operating with the legacy SIOGI2C ioctl

Sat, Mar 28, 1:38 AM
gallatin added a comment to D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
In D55912#1282432, @kib wrote:

I mean something like this (ignore naming), in the generic ioctl handler, not in the driver code;

case SIOCGI2C_OLD:
     i2c.page = i2c.bank = 0;
     ioctl(SIOCG2C, &i2c);
     break;

I.e. drivers only need to implement the new ioctl that knows about bank/page.

Or put it differently, your original patch for mlx5en then would be correct, with this addition to the net/, instead of requiring each driver to have code to handle both ioctls.

Sat, Mar 28, 1:36 AM

Mon, Mar 23

gallatin added a comment to D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.

I think that I may not understand your proposal. When you say "at the ioctl level..", Do you mean intercept the ioctls in ifhwioctl()? I think that seems awkward because ifi2req lives in userspace, and individual drivers copy it in / out, rather than it being done in a single spot for all drivers. So to zero fields, ifhwioctl would need copy-in ifi2creq, fix it up, & copy it out again..

Mon, Mar 23, 3:01 PM

Thu, Mar 19

gallatin added a comment to D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
In D55912#1279758, @kib wrote:

Why not simply not allocate the new number for the new ioctl. Rename current ioctl to something like SIOCGI2C_NOBANK. Then, at the ioctl level, do two things:

  • for new SIOCGI2C check that reserved bytes in the structure are zero
  • for SIOCGI2C_NOBANK, zero bank/page/padding and call into SIOCGI2C
Thu, Mar 19, 6:36 PM
gallatin added a comment to D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.

@kib What if we reclaimed some of the spare fields in ifi2creq to a uint16_t magic field. User sets i2creq.magic=PAGE_BANK_REQ and driver sets magic=PAGE_BANK_ACK ? That prevents the confusion you're concerned about.

Thu, Mar 19, 2:52 PM

Wed, Mar 18

gallatin added inline comments to D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
Wed, Mar 18, 11:09 PM
gallatin accepted D55904: hash(9): introduce hashalloc()/hashfree() KPI.
Wed, Mar 18, 5:28 PM
gallatin updated the test plan for D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
Wed, Mar 18, 12:42 PM
gallatin updated the test plan for D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
Wed, Mar 18, 12:41 PM
gallatin requested review of D55912: net: Add page/bank fields to ifi2cre; update mce(4) to use them.
Wed, Mar 18, 12:41 PM

Tue, Mar 17

gallatin added a comment to D55904: hash(9): introduce hashalloc()/hashfree() KPI.

This is really clever. What about other lock types (rm / rms, sx, etc)?

Tue, Mar 17, 10:19 PM

Wed, Mar 11

gallatin accepted D55818: nvme: replace bus_space_[read|write]_4 with bus_[read|write]_4.
Wed, Mar 11, 9:44 PM

Mar 6 2026

gallatin accepted D55541: nvme: Don't active memory space until all BARs are configured.
Mar 6 2026, 5:25 PM
gallatin committed rGf1e8b1aca543: splice: optionally limit worker queues (authored by gallatin).
splice: optionally limit worker queues
Mar 6 2026, 3:26 PM
gallatin closed D55579: splice: optionally limit worker queues.
Mar 6 2026, 3:26 PM
gallatin added inline comments to D55579: splice: optionally limit worker queues.
Mar 6 2026, 3:07 PM

Mar 5 2026

gallatin accepted D55541: nvme: Don't active memory space until all BARs are configured.
Mar 5 2026, 1:51 PM

Mar 4 2026

gallatin updated the diff for D55579: splice: optionally limit worker queues.

Re-worked thread setup to use mp_ncpus rather than mp_maxid, as suggested by @markj

Mar 4 2026, 2:56 PM
gallatin added inline comments to D55579: splice: optionally limit worker queues.
Mar 4 2026, 2:03 AM
gallatin updated the diff for D55579: splice: optionally limit worker queues.
Mar 4 2026, 12:37 AM

Mar 3 2026

gallatin added a comment to D55477: hwpstate_amd: Support writable cpufreq interface in CPPC mode.
Mar 3 2026, 5:43 PM

Feb 28 2026

gallatin added inline comments to D55579: splice: optionally limit worker queues.
Feb 28 2026, 1:49 AM
gallatin updated the diff for D55579: splice: optionally limit worker queues.
  • fixed typo in sysctl declaration
Feb 28 2026, 1:48 AM
gallatin requested review of D55579: splice: optionally limit worker queues.
Feb 28 2026, 12:27 AM

Feb 27 2026

gallatin added a comment to D55477: hwpstate_amd: Support writable cpufreq interface in CPPC mode.

I tried this on 3 EPYC generations at Netflix. The most recent (AMD EPYC 8434P, AMD EPYC 9535) behaved as expected. There was an dev.hwpstate_amd. node for each CPU, and a lot more freqs were exposed (from 3 to roughly a dozen).
On the oldest EPYC we have is EPYC 7502P, where it didn't change anything. We still only have 3 frequencies exposed. On this machine, we see just a single node from dev.hwpstate:
dev.hwpstate_amd.0.freq_settings: 2500/2750 2200/2200 1500/1350
dev.hwpstate_amd.0.%iommu:
dev.hwpstate_amd.0.%parent: cpu0
dev.hwpstate_amd.0.%pnpinfo:
dev.hwpstate_amd.0.%location:
dev.hwpstate_amd.0.%driver: hwpstate_amd
dev.hwpstate_amd.0.%desc: Cool`n'Quiet 2.0
dev.hwpstate_amd.%parent:

Feb 27 2026, 12:18 AM

Feb 26 2026

gallatin added a comment to D55541: nvme: Don't active memory space until all BARs are configured.

This looks OK to me, but I defer to Warner.

Feb 26 2026, 8:34 PM

Feb 10 2026

gallatin accepted D55196: tcp: restrict flowtype copying to specific RSS TCP types.

Looks good. Thank you!

Feb 10 2026, 12:14 AM

Feb 9 2026

gallatin added a comment to D55196: tcp: restrict flowtype copying to specific RSS TCP types.

I think it's driver bugs that have flown under the radar until the recent RSS change so I'm not sure this is the place to do this.

In particular to this review, opaque and opaque_hash should both be usable hashes if they are implemented correctly in the driver.

Thinking about this more, I think when we are using the hash for setting flowtype, we should check for valid toeplitz hash types, since we're counting on being able to calculate the same hash in software. So I think this patch is probably the correct place to fix this. I think it would be shorter/cleaner to use M_HASHTYPE_ISHASH(). See https://reviews.freebsd.org/D52989

Question: Is M_HASHTYPE_RSS_IPV4 or M_HASHTYPE_RSS_IPV6 (a hash only on the src/dst address) acceptable or not? M_HASHTYPE_ISHASH() is true for them.

Feb 9 2026, 8:24 PM
gallatin added a comment to D55196: tcp: restrict flowtype copying to specific RSS TCP types.

I think it's driver bugs that have flown under the radar until the recent RSS change so I'm not sure this is the place to do this.

In particular to this review, opaque and opaque_hash should both be usable hashes if they are implemented correctly in the driver.

Feb 9 2026, 5:47 PM
gallatin added a comment to D55196: tcp: restrict flowtype copying to specific RSS TCP types.

Slightly worried some NIC somwhere might not be setting this when it should. Is this solving a problem for you?

Feb 9 2026, 5:17 PM

Jan 23 2026

gallatin committed rGf61e2bf9da3a: iflib: support for transmit side nic KTLS offload (authored by gallatin).
iflib: support for transmit side nic KTLS offload
Jan 23 2026, 6:20 PM
gallatin committed rG72326db3c0e3: ktls: Capture initial tls seqno at time offload is initiated (authored by gallatin).
ktls: Capture initial tls seqno at time offload is initiated
Jan 23 2026, 6:20 PM

Jan 22 2026

gallatin accepted D54820: sendfile(2): document that EINTR never happens on non-blocking socket.
Jan 22 2026, 1:55 PM

Jan 19 2026

gallatin committed rGd91ae61f8fc2: iflib: null out freed mbuf in iflib_txsd_free (authored by gallatin).
iflib: null out freed mbuf in iflib_txsd_free
Jan 19 2026, 3:50 PM

Jan 14 2026

gallatin committed rG202dd86ec01f: bnxt: fix i2c read to allow access to different addresses (authored by gallatin).
bnxt: fix i2c read to allow access to different addresses
Jan 14 2026, 12:55 AM
gallatin committed rGef8c912aadad: iflib: document new sysctls (authored by gallatin).
iflib: document new sysctls
Jan 14 2026, 12:55 AM

Jan 10 2026

gallatin added a comment to D53089: rss: Enable portions of RSS globally to enable symmetric hashing.

what are you seeing? I remember ixl RSS being buggy!

A valid rss type set with a 0 flowid for connections nginx accepts. Not sure why ixl can't calculate a proper hash in that case, but it can be worked around by checking to see if the flowid (rss hash result) is valid.

See https://reviews.freebsd.org/D54442

Thanks a lot for the fix! Did you see that issue on X710 or X722 interface? As far as I understand X722 HW supports more PCTYPEs. They were enabled by default when RSS was undefined, but it looks that they are not covered when rss_gethashconfig is used.

Jan 10 2026, 12:33 AM

Jan 8 2026

gallatin accepted D54605: iflib: remove convoluted custom zeroing code.

Bravo. Anything we can do to make iflib simpler is a good thing in my book!

Jan 8 2026, 8:59 PM
gallatin committed rGb72cb305899e: bnxt: fix i2c read to allow access to different addresses (authored by gallatin).
bnxt: fix i2c read to allow access to different addresses
Jan 8 2026, 1:52 PM
gallatin closed D54590: bnxt: fix i2c read to allow access to different addresses.
Jan 8 2026, 1:52 PM

Jan 7 2026

gallatin requested review of D54590: bnxt: fix i2c read to allow access to different addresses.
Jan 7 2026, 11:40 PM
gallatin committed rG14d93f612f26: iflib: Drop tx lock when freeing mbufs using simple_transmit (authored by gallatin).
iflib: Drop tx lock when freeing mbufs using simple_transmit
Jan 7 2026, 7:33 PM
gallatin closed D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.
Jan 7 2026, 7:33 PM
gallatin added inline comments to D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.
Jan 7 2026, 5:22 PM
gallatin updated the diff for D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.
  • use atomic_store rather than atomic_set, as per @markj 's feedback
  • update man page date
Jan 7 2026, 5:20 PM

Jan 6 2026

gallatin committed rG83e6f0d7807b: iflib: document new sysctls (authored by gallatin).
iflib: document new sysctls
Jan 6 2026, 10:47 PM
gallatin closed D54564: iflib: document new sysctls.
Jan 6 2026, 10:46 PM
gallatin updated the diff for D54564: iflib: document new sysctls.
  • Updated to document tx_defer_mfree separately
Jan 6 2026, 9:12 PM
gallatin updated the diff for D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.
  • rebased diff
  • added documentation for tx_defer_mfree sysctl
Jan 6 2026, 9:10 PM
gallatin added inline comments to D54564: iflib: document new sysctls.
Jan 6 2026, 9:04 PM
gallatin added a comment to D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.

Note that deferred mbuf freeing is not enabled by default, and can be

enabled using the dev.$DEV.$UNIT.iflib.tx_defer_mfree sysctl.

Can you put tx_defer_mfree in iflib(4) in this commit?

Jan 6 2026, 7:38 PM
gallatin requested review of D54564: iflib: document new sysctls.
Jan 6 2026, 7:37 PM

Jan 5 2026

gallatin committed rG21865c970888: tcp: Unifidef use of rss software hash in syncache (authored by gallatin).
tcp: Unifidef use of rss software hash in syncache
Jan 5 2026, 8:58 PM
gallatin closed D54534: tcp: Unifidef use of rss software hash in syncache.
Jan 5 2026, 8:58 PM
gallatin requested review of D54534: tcp: Unifidef use of rss software hash in syncache.
Jan 5 2026, 7:38 PM
gallatin committed rGac1cd655f647: ixl: verify flowid is valid before setting rsstype & flowid (authored by gallatin).
ixl: verify flowid is valid before setting rsstype & flowid
Jan 5 2026, 7:11 PM
gallatin closed D54442: ixl: verify flowid is valid before setting rsstype & flowid.
Jan 5 2026, 7:11 PM

Jan 2 2026

gallatin added a comment to D53089: rss: Enable portions of RSS globally to enable symmetric hashing.

what are you seeing? I remember ixl RSS being buggy!

Jan 2 2026, 12:36 AM

Jan 1 2026

gallatin requested review of D54442: ixl: verify flowid is valid before setting rsstype & flowid.
Jan 1 2026, 12:01 AM

Dec 31 2025

gallatin added a comment to D53089: rss: Enable portions of RSS globally to enable symmetric hashing.

Is it safe for MFC to stable/15 ? I see no plans for the MFC, I see that cherry-picking works fine, but there are clearly no plans for MFC in the commit message.

Dec 31 2025, 10:23 PM

Dec 24 2025

gallatin added a comment to D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.

Have you tried chaining mbufs instead of having an array? Does that have negative cache effect?

Dec 24 2025, 3:33 AM

Dec 23 2025

gallatin added a comment to D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.

I've only been able to test this on amd64, and I'm pretty bad at atomic acq/rel semantics. If somebody could review that, I'd appreciate it.

Dec 23 2025, 10:23 PM
gallatin requested review of D54356: iflib: Drop tx lock when freeing mbufs using simple_transmit.
Dec 23 2025, 10:21 PM

Dec 21 2025

gallatin closed D54274: iflib: support for transmit side nic KTLS offload.
Dec 21 2025, 2:47 PM
gallatin committed rG43d7ee540efe: iflib: support for transmit side nic KTLS offload (authored by gallatin).
iflib: support for transmit side nic KTLS offload
Dec 21 2025, 2:47 PM
gallatin committed rG4d692068f685: ktls: Capture initial tls seqno at time offload is initiated (authored by gallatin).
ktls: Capture initial tls seqno at time offload is initiated
Dec 21 2025, 2:47 PM
gallatin closed D54275: ktls: Capture initial tls seqno at time offload is initiated.
Dec 21 2025, 2:47 PM

Dec 19 2025

gallatin added inline comments to D54274: iflib: support for transmit side nic KTLS offload.
Dec 19 2025, 8:40 PM

Dec 18 2025

gallatin added a comment to D54275: ktls: Capture initial tls seqno at time offload is initiated.
In D54275#1240636, @jhb wrote:

Maybe to make it clearer we can change the struct to use a union of next_seqno and initial_seqno which won't change the ABI but will let us document it in the header and be more clear about the intent?

Dec 18 2025, 6:31 PM
gallatin updated the diff for D54275: ktls: Capture initial tls seqno at time offload is initiated.

added union for next_seqno / initial offload seqno to provide a better description & preserve ABI, as suggested by @jhb

Dec 18 2025, 6:31 PM
gallatin accepted D54281: ice(4): Remove unused function.
Dec 18 2025, 6:23 PM

Dec 17 2025

gallatin requested review of D54275: ktls: Capture initial tls seqno at time offload is initiated.
Dec 17 2025, 8:00 PM
gallatin retitled D54274: iflib: support for transmit side nic KTLS offload from iflib: support fo transmit side nic KTLS offload to iflib: support for transmit side nic KTLS offload.
Dec 17 2025, 7:55 PM
gallatin requested review of D54274: iflib: support for transmit side nic KTLS offload.
Dec 17 2025, 7:55 PM

Dec 15 2025

gallatin committed rG7ff3b13f12d9: lacp: Sort port map by interface index (authored by gallatin).
lacp: Sort port map by interface index
Dec 15 2025, 5:10 PM
gallatin closed D54053: lacp: Sort port map by interface index.
Dec 15 2025, 5:10 PM

Dec 12 2025

gallatin committed rGf14ca373dde5: splice: Fix leaks that can happen when initiating a splice (authored by gallatin).
splice: Fix leaks that can happen when initiating a splice
Dec 12 2025, 12:50 PM

Dec 9 2025

gallatin committed rGa837d1fe49e0: splice: Fix leaks that can happen when initiating a splice (authored by gallatin).
splice: Fix leaks that can happen when initiating a splice
Dec 9 2025, 10:21 PM
gallatin closed D54157: splice: Fix leaks that can happen when initiating a splice.
Dec 9 2025, 10:20 PM
gallatin updated the diff for D54157: splice: Fix leaks that can happen when initiating a splice.
  • realized that so_unsplice can be called with an so2 that's already been recycled when its called via so_splice(), since we don't hold a reference. So ensure we null out sp_dest and deal with a NULL so2 in so_unsplice
Dec 9 2025, 10:05 PM
gallatin updated the diff for D54157: splice: Fix leaks that can happen when initiating a splice.

Remove changes to the so_unsplice() path on SPLICE_INIT splices.. @markj correctly pointed out that codepath is not a problem.

Dec 9 2025, 8:41 PM
gallatin requested review of D54157: splice: Fix leaks that can happen when initiating a splice.
Dec 9 2025, 8:32 PM

Dec 6 2025

gallatin requested review of D54096: iflib: don't update the admin status in if_media_status.
Dec 6 2025, 2:13 AM

Dec 5 2025

gallatin accepted D54089: net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9).
Dec 5 2025, 6:38 PM

Dec 3 2025

gallatin added a comment to D54053: lacp: Sort port map by interface index.

My understanding. First, qsort() itself never passes NULL pointer. Second, could a map[] entry within p->pm_count be NULL or not? The new code assumes it can't be. Then we also have a case with lacp_port that has NULL lp_ifp, which is covered.

Dec 3 2025, 9:19 PM
gallatin updated the diff for D54053: lacp: Sort port map by interface index.

Remove more defensive debug code

Dec 3 2025, 9:13 PM
gallatin added inline comments to D54053: lacp: Sort port map by interface index.
Dec 3 2025, 6:30 PM
gallatin updated the diff for D54053: lacp: Sort port map by interface index.

update based on Gleb's feedback

Dec 3 2025, 6:28 PM
gallatin requested review of D54053: lacp: Sort port map by interface index.
Dec 3 2025, 5:04 PM
gallatin accepted D54045: iflib: Add support for SIOCGIFDOWNREASON IOCtl.
Dec 3 2025, 3:34 PM

Nov 24 2025

gallatin abandoned D53088: tcp: debugging checks of hashing.
Nov 24 2025, 3:45 PM
gallatin abandoned D53105: tcp: debugging checks of hashing.
Nov 24 2025, 3:44 PM
gallatin committed rG8f94088bc5d3: mlx5: use newly exposed RSS hash key API rather than ad-hoc hashing (authored by gallatin).
mlx5: use newly exposed RSS hash key API rather than ad-hoc hashing
Nov 24 2025, 3:38 PM
gallatin committed rG2fe37927d419: loopback: Clear hash unconditionally. (authored by gallatin).
loopback: Clear hash unconditionally.
Nov 24 2025, 3:38 PM