Page MenuHomeFreeBSD

gallatin (Andrew Gallatin)
User

Projects

User Details

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

Recent Activity

Wed, Jul 21

gallatin added a comment to D31260: ktls: start a thread to keep the 16k ktls buffer zone populated.
In D31260#703987, @mjg wrote:

Would uma_zone_reserve take care of this? The patch as proposed should not be necessary.

Wed, Jul 21, 5:38 PM
gallatin updated the summary of D31260: ktls: start a thread to keep the 16k ktls buffer zone populated.
Wed, Jul 21, 4:17 PM
gallatin updated the summary of D31260: ktls: start a thread to keep the 16k ktls buffer zone populated.
Wed, Jul 21, 2:02 PM
gallatin updated the summary of D31260: ktls: start a thread to keep the 16k ktls buffer zone populated.
Wed, Jul 21, 1:56 PM
gallatin requested review of D31260: ktls: start a thread to keep the 16k ktls buffer zone populated.
Wed, Jul 21, 1:54 PM

Thu, Jul 15

gallatin added a comment to D31189: tcp: LRO epoch issue as well a potential pullup issue..

This is a driver bug. The hyperv driver appears to be using a taskqueue to inject packets into the network stack, rather than a normal interrupt handler. As such, I feel that it is the hyperv driver's responsibility to take the network epoch, and not force 99% of drivers which do the right thing to take the epoch twice.

Thu, Jul 15, 3:30 PM
gallatin added a comment to D31189: tcp: LRO epoch issue as well a potential pullup issue..

Why is this even needed?

Thu, Jul 15, 12:44 PM
gallatin added a reviewer for D31189: tcp: LRO epoch issue as well a potential pullup issue.: glebius.
Thu, Jul 15, 12:43 PM

Wed, Jul 14

gallatin added a comment to D31172: iflib: Stop interface for media change.

iflib_stop() is pretty heavy-weight -- is this needed for all devices? Maybe add a flag to do this only on devices where its needed, or have the device do the disabling itself?

I'm not super familiar with this area, is there something that would cause media changes to be "common" like EEE or something? I'm trying to imagine a situation where it wouldn't be as drastic as a link flap already which would justify spending more time thinking about this.

Wed, Jul 14, 2:03 AM
gallatin added a comment to D31172: iflib: Stop interface for media change.

iflib_stop() is pretty heavy-weight -- is this needed for all devices? Maybe add a flag to do this only on devices where its needed, or have the device do the disabling itself?

Wed, Jul 14, 1:11 AM

Tue, Jul 13

gallatin accepted D31155: tcp: TCP_LRO getting bad checksums and sending it in to TCP incorrectly..
Tue, Jul 13, 1:38 PM

Mon, Jul 12

gallatin accepted D31155: tcp: TCP_LRO getting bad checksums and sending it in to TCP incorrectly..
Mon, Jul 12, 7:37 PM

Thu, Jul 8

gallatin accepted D31104: Fix to call callout_init with correct inputs from axp driver.
Thu, Jul 8, 8:03 PM

Wed, Jul 7

gallatin committed R10:0756bdf19c5c: ktls: make ktls_disable_ifnet() shim static (authored by gallatin).
ktls: make ktls_disable_ifnet() shim static
Wed, Jul 7, 7:09 PM
gallatin committed R10:b1e806c0ed96: tcp: fix alternate stack build with LINT-NO{INET,INET6,IP} (authored by gallatin).
tcp: fix alternate stack build with LINT-NO{INET,INET6,IP}
Wed, Jul 7, 5:06 PM
gallatin added inline comments to D31094: tcp: fix build for rack/bbr with various combos of INET and INET6 defined.
Wed, Jul 7, 4:28 PM
gallatin requested review of D31094: tcp: fix build for rack/bbr with various combos of INET and INET6 defined.
Wed, Jul 7, 4:17 PM
gallatin committed R10:4150a5a87ed6: ktls: fix NOINET build (authored by gallatin).
ktls: fix NOINET build
Wed, Jul 7, 2:40 PM

Tue, Jul 6

gallatin accepted D31080: mbuf: add m_get_raw and m_gethdr_raw.
Tue, Jul 6, 7:19 PM
gallatin accepted D31081: iflib: use m_gethdr_raw.

I added myself as a reviewer. shurd has not been active recently.

Tue, Jul 6, 7:18 PM
gallatin added a reviewer for D31081: iflib: use m_gethdr_raw: gallatin.
Tue, Jul 6, 7:17 PM
gallatin added a comment to D31081: iflib: use m_gethdr_raw.

dumb question: Does this depend on another review? I was trying to see what m_gethdr_raw() does, and I can't seem to find it in -current.

Tue, Jul 6, 7:09 PM
gallatin committed R10:28d0a740dd9a: ktls: auto-disable ifnet (inline hw) kTLS (authored by gallatin).
ktls: auto-disable ifnet (inline hw) kTLS
Tue, Jul 6, 2:30 PM
gallatin closed D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.
Tue, Jul 6, 2:29 PM

Mon, Jul 5

gallatin added inline comments to D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.
Mon, Jul 5, 4:25 PM
gallatin added inline comments to D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.
Mon, Jul 5, 4:15 PM
gallatin updated the diff for D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.
  • Address Mark's review feedback
  • Re-check inp flags before calling into the tcp function block, as ktls_set_tx_mode() drops the inp_wlock, which can result in the connection being closed. I had a panic on a test machine due to not checking the flags last night.
Mon, Jul 5, 4:13 PM

Wed, Jun 30

gallatin added a comment to D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.

Answering my own question: Is the in_pcbref() supposed to prevent the structure for going away? Then it looks good.

Wed, Jun 30, 11:09 PM
gallatin added inline comments to D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.
Wed, Jun 30, 11:02 PM
gallatin updated the diff for D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.

Made ktls_ifnet_max_rexmit_pct unsigned as requested by Hans

Wed, Jun 30, 11:00 PM
gallatin accepted D30955: ktls: switch bare zone_mbuf use to m_free.
Wed, Jun 30, 5:23 PM
gallatin accepted D30955: ktls: switch bare zone_mbuf use to m_free.

Thanks for pointing out the dtor checks the flags already, thats a bummer. So this makes things no worse, except for some tests which i think is fine.

Wed, Jun 30, 1:25 PM
gallatin added a comment to D30955: ktls: switch bare zone_mbuf use to m_free.

I think I'd prefer an m_free_raw(). I think that if we switched to m_free(), we'd wind up bringing in the first cache line of the mbuf (for the flags checks). If I'm wrong about that, and you see something else that will bring in that cache line already, then I'm fine with m_free.

Wed, Jun 30, 1:21 PM

Tue, Jun 29

gallatin updated the diff for D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.

Remove epoch until i'm certain its needed, it introduces a lot of complexity and at least ktls_set_tx_mode() does not require epoch (as it sleeps)

Tue, Jun 29, 4:16 PM
gallatin added a comment to D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.

If you are not draining, then probably should protect all code with the network EPOCH at least.

Tue, Jun 29, 12:00 AM
gallatin added inline comments to D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.
Tue, Jun 29, 12:00 AM

Mon, Jun 28

gallatin updated the diff for D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.

Incorporated review feedback

Mon, Jun 28, 11:57 PM
gallatin added a comment to D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.

Where are you draining the ktls_disable_ifnet_help() function?

Mon, Jun 28, 3:37 PM

Sun, Jun 27

gallatin updated the diff for D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.

Moved the sorele() to after the call into tfb_hwtls_change(), as the sorele() may end up calling pru_detach() in sofree. This could release TCP state, causing an invalid tcpcb, leading to a panic when trying to call into the tcp function block.

Sun, Jun 27, 1:34 PM

Fri, Jun 25

gallatin requested review of D30908: ktls: automatically disable inline hw (aka ifnet) ktls offload when TCP rexmits are high.
Fri, Jun 25, 9:46 PM
gallatin accepted D30895: tcp: Preparation for allowing hardware TLS to be able to kick a tcp connection that is retransmitting too much out of hardware and back to software..

Thank you for upstreaming this!

Fri, Jun 25, 5:38 PM

Jun 14 2021

gallatin added inline comments to D30729: Introduce new driver for NXP ENETC Ethernet controller.
Jun 14 2021, 7:23 PM
gallatin accepted D30728: iflib: Add a new quirk.
Jun 14 2021, 7:14 PM
gallatin committed R10:ed5e13cfc268: ktls: Fix interaction with RATELIMIT (authored by gallatin).
ktls: Fix interaction with RATELIMIT
Jun 14 2021, 2:52 PM

Jun 11 2021

gallatin added inline comments to D30729: Introduce new driver for NXP ENETC Ethernet controller.
Jun 11 2021, 4:12 PM
gallatin requested changes to D30728: iflib: Add a new quirk.
Jun 11 2021, 3:42 PM

Jun 9 2021

gallatin accepted D30695: tcp: LRO timestamps have lost their previous precision.
Jun 9 2021, 1:46 PM

Jun 8 2021

gallatin accepted D30695: tcp: LRO timestamps have lost their previous precision.
Jun 8 2021, 2:35 PM

May 29 2021

gallatin accepted D30538: security/isal-kmod: Update to a version that uses crypto_cursor_segment()..
May 29 2021, 12:02 AM

May 27 2021

gallatin accepted D30279: Only build security/ktls_isa-l_crypto-kmod on FreeBSD 13..
May 27 2021, 12:00 AM

May 26 2021

gallatin committed R10:df8437a93dd5: cxgbe: fix enabling lro & rxtimestamps (authored by gallatin).
cxgbe: fix enabling lro & rxtimestamps
May 26 2021, 2:04 PM
gallatin closed D30460: cxgbe: set iq flags only after it has been initialized.
May 26 2021, 2:04 PM

May 25 2021

gallatin requested review of D30460: cxgbe: set iq flags only after it has been initialized.
May 25 2021, 9:39 PM
gallatin closed D30407: tcp: Need to take network epoch when calling tfb_tcp_fb_fini.
May 25 2021, 5:53 PM
gallatin committed R10:086a35562f47: tcp: enter network epoch when calling tfb_tcp_fb_fini (authored by gallatin).
tcp: enter network epoch when calling tfb_tcp_fb_fini
May 25 2021, 5:52 PM
gallatin accepted D30138: Assume OCF is the only KTLS software backend..
May 25 2021, 1:32 AM
gallatin accepted D30444: Rename m_unmappedtouio() to m_unmapped_uiomove()..
May 25 2021, 1:30 AM

May 23 2021

gallatin accepted D30402: Fix a RACK socket buffer lock issue.

Thanks so much for providing the correct fixQ

May 23 2021, 8:59 PM
gallatin requested review of D30407: tcp: Need to take network epoch when calling tfb_tcp_fb_fini.
May 23 2021, 7:50 PM

May 21 2021

gallatin accepted D30392: ktls.h: Guard includes behind _KERNEL.
May 21 2021, 9:52 PM
gallatin accepted D30349: socket: Fix error handling for pru_send(PRUS_NOTREADY).
May 21 2021, 5:15 PM

May 20 2021

gallatin accepted D30349: socket: Fix error handling for pru_send(PRUS_NOTREADY).
May 20 2021, 4:06 PM

May 19 2021

gallatin added a reviewer for D28136: Make sure user-space calls are drained when detaching network interfaces.: jhb.
May 19 2021, 2:10 PM

May 17 2021

gallatin accepted D30303: isci: clear CCBs allocated on the stack.
May 17 2021, 2:24 PM
gallatin accepted D30279: Only build security/ktls_isa-l_crypto-kmod on FreeBSD 13..
May 17 2021, 2:18 PM

May 10 2021

gallatin accepted D30073: e1000: Clean up igb_txrx.
May 10 2021, 3:05 PM
gallatin accepted D30074: ixgbe: Clean up ix_txrx.
May 10 2021, 3:03 PM
gallatin accepted D30178: ixgbe: Print NVM and Option ROM versions.

Thanks so much for doing this!

May 10 2021, 12:22 AM

May 7 2021

gallatin accepted D30138: Assume OCF is the only KTLS software backend..
May 7 2021, 2:05 PM
gallatin accepted D30135: sglist: Add sglist_append_single_mbuf()..
May 7 2021, 2:00 PM
gallatin accepted D30139: Include the trailer in the original dst_iov..
May 7 2021, 1:57 PM
gallatin accepted D30137: ktls_ocf: Fix a few places to not hardcode the GMAC hash length..
May 7 2021, 1:54 PM
gallatin accepted D30133: Extend m_copyback() to support unmapped mbufs..
May 7 2021, 1:54 PM

May 6 2021

gallatin added a comment to D30094: ixgbe: Enable AIM by default.
May 6 2021, 9:30 PM

May 2 2021

gallatin added a comment to D30072: e1000: Clean up and bug fix em_txrx.

Also, the same comments regarding rx checksum __predict() as in the other 2 intel driver reviews

May 2 2021, 3:59 PM
gallatin added a comment to D30074: ixgbe: Clean up ix_txrx.

Same comments regarding __predict() as in the e1000 review.

May 2 2021, 3:52 PM
gallatin added inline comments to D30073: e1000: Clean up igb_txrx.
May 2 2021, 3:50 PM

Apr 27 2021

gallatin accepted D30009: iflib: Take iri_pad into account when processing small frames.
Apr 27 2021, 3:09 PM

Apr 23 2021

gallatin committed R10:3183d0b68072: iflib: initialize LRO unconditionally (authored by gallatin).
iflib: initialize LRO unconditionally
Apr 23 2021, 9:58 AM
gallatin closed D29928: iflib: initialize LRO unconditionally.
Apr 23 2021, 9:58 AM

Apr 22 2021

gallatin added a comment to D29928: iflib: initialize LRO unconditionally.

In your patch you also need to remove tcp_lro_free() from under the IFCAP_LRO!

if (if_getcapabilities(ctx->ifc_ifp) & IFCAP_LRO)
        tcp_lro_free(&rxq->ifr_lc);
Apr 22 2021, 4:41 PM
gallatin updated the diff for D29928: iflib: initialize LRO unconditionally.

Now that we unconditionally allocate LRO resources, we must also unconditionally free them, as pointed out by Hans

Apr 22 2021, 4:41 PM
gallatin added a comment to D29928: iflib: initialize LRO unconditionally.

It is also possible to add a check before calling into LRO functions like:

https://reviews.freebsd.org/D29900

--HPS

Apr 22 2021, 4:25 PM
gallatin requested review of D29928: iflib: initialize LRO unconditionally.
Apr 22 2021, 3:46 PM

Apr 19 2021

gallatin accepted D29838: Add more checking for unmapped mbufs.
Apr 19 2021, 4:15 PM

Apr 10 2021

gallatin added a comment to D29663: De-prioritize network driver ithreads to mitigate livelock.

I think hps@'s idea is a good one, if only
done when there are enough cpus.
Maybe something like:

if ncpus > 4
   - only allow ncpus - 1 to be assigned to
Apr 10 2021, 2:51 AM

Apr 9 2021

gallatin added a comment to D29663: De-prioritize network driver ithreads to mitigate livelock.

multi-queue NICs can consume all CPU

Why can't you reserve a CPU core for other stuff, and just let the N-1 CPUs handle whatever they can?

Apr 9 2021, 8:18 PM
gallatin added a comment to D29663: De-prioritize network driver ithreads to mitigate livelock.

What about the netisr threads ?

Apr 9 2021, 1:43 PM
gallatin added a comment to D29663: De-prioritize network driver ithreads to mitigate livelock.
In D29663#665198, @mav wrote:

My first thought about the high network priority was about serial ports without any hardware buffering and flow control, extremely sensitive to interrupt latency, but uart seems to use TTY priority, at least now. Not sure what else could be so time-critical in networking before, but sure there could be NICs with very few RX buffers. Typical disk hardware though should have much higher latency tolerance, since the amount of traffic is usually predetermined being initiated from the system, that is why I guess its priority was set lower.

iSCSI should not care about these priority levels, since at least for software iSCSI all of its receive/transmit is going through separate threads with lower (PVM) kernel priority. I don't remember right now how NFS client works, but I suspect something alike. iSCSI target and NFS server both run at even lower priority, so don't care about this at all.

Speaking about SWI, IIRC there is "intr/swi1: netisr 0". Not sure what it does these days, but you may wish to also check its priority relative to one of "intr/swi4: clock".

Apr 9 2021, 1:37 PM
gallatin added inline comments to D29663: De-prioritize network driver ithreads to mitigate livelock.
Apr 9 2021, 1:22 PM
gallatin added reviewers for D29663: De-prioritize network driver ithreads to mitigate livelock: np, hselasky.
Apr 9 2021, 1:29 AM
gallatin requested review of D29663: De-prioritize network driver ithreads to mitigate livelock.
Apr 9 2021, 1:25 AM

Apr 7 2021

gallatin added a comment to D29564: TCP LRO support for VLAN and VXLAN.

Hi Drew,

For sorted LRO the mbufs are still hot in the CPU cache. Remember we are flushing all the entries after each new flowid value!

--HPS

Apr 7 2021, 7:27 PM
gallatin added a comment to D29564: TCP LRO support for VLAN and VXLAN.

I may be reading this wrong, but for mbuf compression, you now seem to be appending a chain of packets, then coalescing them. The original design choice of coalescing as the new packet was encountered was intentional. The idea is that you want to operate on and free the incoming mbuf while it is hot in cache. By chaining mbufs and dealing with them later, they're likely to be cold in cache, so you're likely encounter additional cache misses on every mbuf in the chain as you copy out data and free it.

Apr 7 2021, 3:07 PM

Apr 1 2021

gallatin accepted D29530: Missing NULL checks for tcp_lro with compressed ack's.
Apr 1 2021, 2:41 PM

Mar 31 2021

gallatin accepted D29517: ossl: Don't encryt/decrypt too much data for chacha20..
Mar 31 2021, 8:58 PM
gallatin accepted D29509: Remove unused write only "m_prev_last" field in TCP LRO code..
Mar 31 2021, 8:57 PM

Mar 22 2021

gallatin accepted D29378: pf: Handle unmapped mbufs when computing checksums.
Mar 22 2021, 8:25 PM
gallatin added inline comments to D29378: pf: Handle unmapped mbufs when computing checksums.
Mar 22 2021, 3:08 PM

Mar 19 2021

gallatin accepted D29338: ixl(4): Add tunable to override Flow Control settings.
Mar 19 2021, 1:39 PM