Page MenuHomeFreeBSD

tuexen (Michael Tuexen)
User

Projects

User Details

User Since
Feb 4 2016, 4:45 PM (452 w, 2 d)

Recent Activity

Fri, Oct 4

tuexen added a comment to D46881: getsockopt: improve locking for SOL_SOCKET level socket options.

All of the races are harmless though, i.e., the getsockopt call would return garbage in the worst case. There might be applications which query these socket options frequently, especially the socket buffer sizes. Do you think the extra overhead of acquiring the socket lock is unlikely to matter?

Fri, Oct 4, 6:50 AM

Thu, Oct 3

tuexen retitled D46425: Add TCP round counting logic for default stack. from Add TCP round couting logic for default stack. to Add TCP round counting logic for default stack..
Thu, Oct 3, 3:13 PM
tuexen added a comment to D46884: sctp: propagate cap rights on sctp_peeloff.

It would be great if you can do a functional test...

Thu, Oct 3, 2:45 PM

Wed, Oct 2

tuexen requested review of D46881: getsockopt: improve locking for SOL_SOCKET level socket options.
Wed, Oct 2, 8:34 PM
tuexen added a comment to D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.
In D46824#1068981, @jhb wrote:

I can fix the type mismatch during commit. I have not looked to see if other stacks are affected.

Wed, Oct 2, 7:11 PM

Tue, Oct 1

tuexen committed rG2eacb0841c7d: tcp: small cleanup (authored by tuexen).
tcp: small cleanup
Tue, Oct 1, 3:35 PM
tuexen closed D46850: tcp: small cleanup.
Tue, Oct 1, 3:34 PM

Mon, Sep 30

tuexen added inline comments to D46850: tcp: small cleanup.
Mon, Sep 30, 7:14 PM
tuexen requested review of D46850: tcp: small cleanup.
Mon, Sep 30, 6:56 PM
tuexen committed rG01eb635d1295: tcp: improve mbuf handling when processing SYN segments (authored by tuexen).
tcp: improve mbuf handling when processing SYN segments
Mon, Sep 30, 6:03 PM
tuexen closed D46839: tcp: improve mbuf handling when processing SYN.
Mon, Sep 30, 6:03 PM
tuexen committed rGa2e4f45480c2: tcp: whitespace cleanup (authored by tuexen).
tcp: whitespace cleanup
Mon, Sep 30, 5:56 PM
tuexen accepted D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.
Mon, Sep 30, 5:42 PM
tuexen added inline comments to D46839: tcp: improve mbuf handling when processing SYN.
Mon, Sep 30, 12:01 PM

Sun, Sep 29

tuexen accepted D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.
Sun, Sep 29, 2:34 PM
tuexen added a comment to D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.

Good find! While there is probably zero difference as the compiler optimizes this, keeping "old_len" instead would only require the clearing of TH_FIN, and not another assignment though, which seems more alike to similar other checks... @tuexen @cc and @rrs may want to have a look too...

Sun, Sep 29, 2:33 PM
tuexen accepted D46779: tcp: further cleanup old options.
Sun, Sep 29, 2:25 PM
tuexen added a comment to D46779: tcp: further cleanup old options.

Internally at Netflix I will make all private options relative to TCP_VENDOR. This will make my merging much easier. Ideally we even want this to become a enum, and that would protect again any collisions and other failures.

Sun, Sep 29, 2:25 PM

Sat, Sep 28

tuexen closed D46793: tcp: improve ref count handling when processing SYN.

This was committed in cbc9438f0505bd971e9eba635afdae38a267d76e.

Sat, Sep 28, 8:39 PM
tuexen requested review of D46839: tcp: improve mbuf handling when processing SYN.
Sat, Sep 28, 8:39 PM
tuexen committed rGcbc9438f0505: tcp: improve ref count handling when processing SYN (authored by tuexen).
tcp: improve ref count handling when processing SYN
Sat, Sep 28, 8:10 PM
tuexen added inline comments to D46793: tcp: improve ref count handling when processing SYN.
Sat, Sep 28, 8:10 AM
tuexen added inline comments to D46793: tcp: improve ref count handling when processing SYN.
Sat, Sep 28, 8:04 AM

Fri, Sep 27

tuexen added a comment to D46793: tcp: improve ref count handling when processing SYN.

This looks right to me, but I'm not an expert on this code.

Probably the MAC label allocation can also be deferred this way?

The story is different for the MAC label, since the MAC label allocation can result in an error and we need a MAC label to send a response. Of course, you can delay the allocation of the MAC label, but then you have to undo things you allocated before. Right now the sequence is MAC label first, ipopts next, and syncache entry last... If you prefer, we can change that. But my goal was to fix the leaks...

Ok, fair enough. It was just a question, I already clicked the magic "accept" button.

Fri, Sep 27, 10:58 AM
tuexen added a comment to D46793: tcp: improve ref count handling when processing SYN.

This looks right to me, but I'm not an expert on this code.

Probably the MAC label allocation can also be deferred this way?

Fri, Sep 27, 10:41 AM
tuexen added a comment to D44258: ixgbe: Make masks for TCP flag handling during TSO sysctl'able.
In D44258#1067037, @erj wrote:

This means that the PSH and FIN flag correctly appear only in the last segment, but the CWR flag does not only appear in the first segment, but also in all middle segments.
Using this patch, this could be fixed.

When doing Accurate ECN as currently being specified in Accurate ECN, the masks should be:

mask.first0xFF6
mask.middle0xFF6
mask.last0xFFF

The proposed patch would allow a NIC to be configured to do TSO for either classical ECN or accurate ECN.

Does this description make the motivation clear?

Your description definitely helps; thanks for asking the question @kbowling. @tuexen have you checked these masks on the other devices that use ixl/ice, or is this what you've observed so far?

Fri, Sep 27, 8:59 AM

Thu, Sep 26

tuexen added a comment to D44258: ixgbe: Make masks for TCP flag handling during TSO sysctl'able.

Are you sure this can't be dealt with dynamically in ix_txrx? Admittedly I have no reason to spend a lot of time digging into this but my intuition is you can stuff the offsets into if_pkt_info_t in iflib.c and make the right decisions when constructing the TSO packet descriptor.

Are you saying you would write the register with every TSO packet? I have no experience, but I thought this might be too expensive. Right now, the NIC is using one behavior for all TSO packets for all connections...

No, I was speculating maybe you can accomplish whatever header change is desired in the TSO descriptor rather than globally altering those registers. But I do not know.

I believe by default whatever is in the pseudoheader is copied to all segments.

What are we trying to accomplish.. is a default mask ruining the ECN flag or are you trying to drop/alter the ECN flag in the middles or last segment?

Are you sure this can't be dealt with dynamically in ix_txrx? Admittedly I have no reason to spend a lot of time digging into this but my intuition is you can stuff the offsets into if_pkt_info_t in iflib.c and make the right decisions when constructing the TSO packet descriptor.

Are you saying you would write the register with every TSO packet? I have no experience, but I thought this might be too expensive. Right now, the NIC is using one behavior for all TSO packets for all connections...

No, I was speculating maybe you can accomplish whatever header change is desired in the TSO descriptor rather than globally altering those registers. But I do not know.

I believe by default whatever is in the pseudoheader is copied to all segments.

What are we trying to accomplish.. is a default mask ruining the ECN flag or are you trying to drop/alter the ECN flag in the middles or last segment?

Here is what I'm trying to accomplish:
The TCP header contains 12 flags (see IANA. The Intel NIC uses three 12 bit masks to compute, which flags are copied to the first, the middle, and the last segment when performing TSO. When doing ECN as specified in RFC 3168, the masks should be:

mask.first0xFF6
mask.middle0xF76
mask.last0xF7F

This means that the FIN and PSH flag only appear in the last segment and the CWR flag only appear in the first segment. Several Intel NICs behave like this.
However,

ix0: <Intel(R) X520 82599ES (SFI/SFP+)> mem 0x6004000000000-0x600400007ffff,0x6004000100000-0x6004000103fff irq 1040376 at device 0.0 numa-domain 0 on pci3
ix0: Using 2048 TX descriptors and 2048 RX descriptors
ix0: Using 16 RX queues 16 TX queues
ix0: Using MSI-X interrupts with 17 vectors
ix0: allocated for 16 queues
ix0: allocated for 16 rx queues
ix0: Ethernet address: 90:e2:ba:f7:48:74
ix0: PCI Express Bus: Speed 5.0GT/s Width x8
ix0: eTrack 0x000161c1

reports

dev.ix.0.tso_tcp_flags_mask_first_segment: 0x00000ff6
dev.ix.0.tso_tcp_flags_mask_middle_segment: 0x00000ff6
dev.ix.0.tso_tcp_flags_mask_last_segment: 0x00000f7f

This means that the PSH and FIN flag correctly appear only in the last segment, but the CWR flag does not only appear in the first segment, but also in all middle segments.
Using this patch, this could be fixed.

When doing Accurate ECN as currently being specified in Accurate ECN, the masks should be:

mask.first0xFF6
mask.middle0xFF6
mask.last0xFFF

The proposed patch would allow a NIC to be configured to do TSO for either classical ECN or accurate ECN.

Does this description make the motivation clear?

It does, thank you. There is nothing wrong with the patch as is. Should we program the registers automatically for normal ECN in a followup as the newer NICs do? I am guessing they are the way they are due to the age of the hardware/driver.

Thu, Sep 26, 10:35 PM
tuexen added inline comments to D44258: ixgbe: Make masks for TCP flag handling during TSO sysctl'able.
Thu, Sep 26, 10:10 PM
tuexen added a comment to D44258: ixgbe: Make masks for TCP flag handling during TSO sysctl'able.

Are you sure this can't be dealt with dynamically in ix_txrx? Admittedly I have no reason to spend a lot of time digging into this but my intuition is you can stuff the offsets into if_pkt_info_t in iflib.c and make the right decisions when constructing the TSO packet descriptor.

Are you saying you would write the register with every TSO packet? I have no experience, but I thought this might be too expensive. Right now, the NIC is using one behavior for all TSO packets for all connections...

No, I was speculating maybe you can accomplish whatever header change is desired in the TSO descriptor rather than globally altering those registers. But I do not know.

I believe by default whatever is in the pseudoheader is copied to all segments.

What are we trying to accomplish.. is a default mask ruining the ECN flag or are you trying to drop/alter the ECN flag in the middles or last segment?

Thu, Sep 26, 10:07 PM
tuexen added inline comments to D46793: tcp: improve ref count handling when processing SYN.
Thu, Sep 26, 8:19 PM
tuexen updated the diff for D46793: tcp: improve ref count handling when processing SYN.

Only get a reference counter to so->so_cred when it is actually needed as suggested by Mark.

Thu, Sep 26, 8:18 PM
tuexen requested review of D46793: tcp: improve ref count handling when processing SYN.
Thu, Sep 26, 6:19 AM
tuexen closed D46766: tcp: improve MAC error handling for SYN segments.
Thu, Sep 26, 6:12 AM
tuexen committed rG78e1b031d2e8: tcp: improve MAC error handling for SYN segments (authored by tuexen).
tcp: improve MAC error handling for SYN segments
Thu, Sep 26, 6:12 AM
tuexen committed rG2fb778fab893: MAC: improve handling of listening sockets (authored by tuexen).
MAC: improve handling of listening sockets
Thu, Sep 26, 6:09 AM
tuexen accepted D46766: tcp: improve MAC error handling for SYN segments.
Thu, Sep 26, 6:09 AM
tuexen closed D46755: MAC: improve handling of listening sockets.
Thu, Sep 26, 6:09 AM
tuexen committed rG3f2792166aee: MAC: improve consistency in error handling (authored by tuexen).
MAC: improve consistency in error handling
Thu, Sep 26, 6:05 AM
tuexen closed D46701: mac: improve consistency.
Thu, Sep 26, 6:05 AM

Wed, Sep 25

tuexen added a comment to D44258: ixgbe: Make masks for TCP flag handling during TSO sysctl'able.

Are you sure this can't be dealt with dynamically in ix_txrx? Admittedly I have no reason to spend a lot of time digging into this but my intuition is you can stuff the offsets into if_pkt_info_t in iflib.c and make the right decisions when constructing the TSO packet descriptor.

Wed, Sep 25, 5:59 AM
tuexen added a comment to D46779: tcp: further cleanup old options.

I was using the style used in netinet/in.h. But I do not care how we mark them as unused as long as it is consistent.

Wed, Sep 25, 5:48 AM

Tue, Sep 24

tuexen added inline comments to D46766: tcp: improve MAC error handling for SYN segments.
Tue, Sep 24, 9:10 AM
tuexen updated the diff for D46766: tcp: improve MAC error handling for SYN segments.

Initialize maclabel to NULL, which is not need right now, but avoids using an uninitialized variable in case someone adds a goto in the future before mac_syncache_init() is called. This was suggested by Mark.

Tue, Sep 24, 9:10 AM
tuexen added inline comments to D46766: tcp: improve MAC error handling for SYN segments.
Tue, Sep 24, 8:41 AM
tuexen updated the diff for D46766: tcp: improve MAC error handling for SYN segments.

Remove parentheses, which are not necessary, as suggested by Mark.

Tue, Sep 24, 8:36 AM
tuexen added inline comments to D46755: MAC: improve handling of listening sockets.
Tue, Sep 24, 8:31 AM
tuexen updated the diff for D46755: MAC: improve handling of listening sockets.

Fix mac_getsockopt_label(), not mac_setsockopt_label() as pointed out by Mark.

Tue, Sep 24, 8:29 AM
tuexen added inline comments to D46766: tcp: improve MAC error handling for SYN segments.
Tue, Sep 24, 7:46 AM

Mon, Sep 23

tuexen updated the summary of D46701: mac: improve consistency.
Mon, Sep 23, 8:47 PM
tuexen requested review of D46766: tcp: improve MAC error handling for SYN segments.
Mon, Sep 23, 8:46 PM
tuexen added inline comments to D46755: MAC: improve handling of listening sockets.
Mon, Sep 23, 8:12 PM
tuexen updated the diff for D46755: MAC: improve handling of listening sockets.

Address Mark's comment.

Mon, Sep 23, 8:06 PM

Sun, Sep 22

tuexen requested review of D46755: MAC: improve handling of listening sockets.
Sun, Sep 22, 8:59 PM

Fri, Sep 20

tuexen committed rG87fbd9fc7fc5: tcp: remove unused socket option names (authored by tuexen).
tcp: remove unused socket option names
Fri, Sep 20, 11:06 AM
tuexen closed D46623: tcp: remove unused socket option names.
Fri, Sep 20, 11:06 AM

Thu, Sep 19

tuexen requested review of D46701: mac: improve consistency.
Thu, Sep 19, 12:49 PM

Wed, Sep 18

tuexen accepted D46694: Keep syncache flags when updating ECN info.
Wed, Sep 18, 9:13 AM

Tue, Sep 17

tuexen accepted D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.
Tue, Sep 17, 2:12 PM
tuexen accepted D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.
Tue, Sep 17, 2:05 PM
tuexen accepted D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Tue, Sep 17, 1:51 PM

Mon, Sep 16

tuexen accepted D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.
Mon, Sep 16, 8:08 PM
tuexen added inline comments to D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Mon, Sep 16, 8:07 PM
tuexen committed rG1c6bb4c5789c: tcp: remove TCP_OFFLOAD_DISABLE (authored by tuexen).
tcp: remove TCP_OFFLOAD_DISABLE
Mon, Sep 16, 10:57 AM
tuexen closed D46669: tcp: remove TCP_OFFLOAD_DISABLE.
Mon, Sep 16, 10:57 AM
tuexen accepted D46669: tcp: remove TCP_OFFLOAD_DISABLE.
Mon, Sep 16, 10:52 AM

Sat, Sep 14

tuexen added a comment to D46669: tcp: remove TCP_OFFLOAD_DISABLE.
In D46669#1063601, @np wrote:

I'd be okay with removing the condition entirely. It is useful to have core data structures be a fixed size independent of configuration.

Sat, Sep 14, 7:59 AM

Fri, Sep 13

tuexen requested review of D46669: tcp: remove TCP_OFFLOAD_DISABLE.
Fri, Sep 13, 8:47 PM

Tue, Sep 10

tuexen requested review of D46623: tcp: remove unused socket option names.
Tue, Sep 10, 11:39 AM
tuexen committed rG1c60b2cb0ba5: tcp: improve whitespace consistency for socket option names (authored by tuexen).
tcp: improve whitespace consistency for socket option names
Tue, Sep 10, 11:08 AM
tuexen closed D46618: tcp: improve whitespace consistency for socket option names.
Tue, Sep 10, 11:08 AM

Mon, Sep 9

tuexen requested review of D46618: tcp: improve whitespace consistency for socket option names.
Mon, Sep 9, 10:27 PM

Sep 5 2024

tuexen committed rGe06cf0fc5dd6: tcp: make tcp_lro_flush() static (authored by tuexen).
tcp: make tcp_lro_flush() static
Sep 5 2024, 3:48 PM
tuexen closed D46435: tcp: make tcp_lro_flush() static.
Sep 5 2024, 3:48 PM
tuexen committed rG0b45d36510d8: al_eth: improve TCP LRO (authored by tuexen).
al_eth: improve TCP LRO
Sep 5 2024, 3:39 PM
tuexen closed D46434: al_eth: improve TCP LRO.
Sep 5 2024, 3:39 PM
tuexen committed rG5203dcce2527: neta: improve TCP LRO (authored by tuexen).
neta: improve TCP LRO
Sep 5 2024, 3:36 PM
tuexen closed D46433: neta: improve TCP LRO.
Sep 5 2024, 3:36 PM
tuexen closed D46428: tcp: improve consistency of syncache_respond() failure handling.
Sep 5 2024, 7:21 AM
tuexen committed rGef438f7706be: tcp: improve consistency of syncache_respond() failure handling (authored by tuexen).
tcp: improve consistency of syncache_respond() failure handling
Sep 5 2024, 7:21 AM

Sep 4 2024

tuexen added a comment to D46428: tcp: improve consistency of syncache_respond() failure handling.
In D46428#1060788, @cc wrote:

Besides, I am wondering if TCPSTAT_INC(tcps_sndacks) and TCPSTAT_INC(tcps_sndtotal) consistency can also be improved after successful syncache_respond().

Sep 4 2024, 11:17 PM
tuexen updated the summary of D46428: tcp: improve consistency of syncache_respond() failure handling.
Sep 4 2024, 10:58 PM
tuexen updated the diff for D46428: tcp: improve consistency of syncache_respond() failure handling.

Improve consistency of the TCP stats counters as suggested by cc@.

Sep 4 2024, 10:57 PM

Aug 30 2024

tuexen closed D46427: tcp rack, bbr: improve handling of soft errors.

This was committed in b2044c4557443bbce974101f04e2b465d1bbe769.

Aug 30 2024, 7:40 AM
tuexen committed rG6e25bccb989c: tcpsso: remove support for some IPPROTO_TCP-level socket option names (authored by tuexen).
tcpsso: remove support for some IPPROTO_TCP-level socket option names
Aug 30 2024, 7:37 AM
tuexen closed D46437: tcpsso: remove support for some IPPROTO_TCP-level socket option names.
Aug 30 2024, 7:37 AM
tuexen committed rGb2044c455744: tcp rack, bbr: improve handling of soft errors (authored by tuexen).
tcp rack, bbr: improve handling of soft errors
Aug 30 2024, 7:31 AM
tuexen committed rGa1b4e5731736: tcp: fix format of sysctl variable (authored by tuexen).
tcp: fix format of sysctl variable
Aug 30 2024, 6:48 AM
tuexen committed rGc467031b6143: tcp: improve consistency of SYN-cache handling (authored by tuexen).
tcp: improve consistency of SYN-cache handling
Aug 30 2024, 6:47 AM
tuexen committed rG0e6dbb673276: sctp: fix format of sysctl variables (authored by tuexen).
sctp: fix format of sysctl variables
Aug 30 2024, 6:47 AM
tuexen committed rG5420e4f56389: tcp: initialize the LRO hash table with correct size (authored by tuexen).
tcp: initialize the LRO hash table with correct size
Aug 30 2024, 6:45 AM
tuexen committed rG2dcd21ddab9a: tcp: fix format of sysctl variable (authored by tuexen).
tcp: fix format of sysctl variable
Aug 30 2024, 6:33 AM
tuexen committed rGbb31f15d179e: sctp: fix format of sysctl variables (authored by tuexen).
sctp: fix format of sysctl variables
Aug 30 2024, 6:32 AM
tuexen committed rG6c0fb6c5ac7b: tcp: improve consistency of SYN-cache handling (authored by tuexen).
tcp: improve consistency of SYN-cache handling
Aug 30 2024, 6:31 AM
tuexen committed rGe0bcb3aa4f07: tcp: initialize the LRO hash table with correct size (authored by tuexen).
tcp: initialize the LRO hash table with correct size
Aug 30 2024, 6:30 AM
tuexen committed rG118ab70d5789: tcp: fix list iteration in tcp_lro_flush_active() (authored by tuexen).
tcp: fix list iteration in tcp_lro_flush_active()
Aug 30 2024, 6:30 AM

Aug 26 2024

tuexen added a comment to D46437: tcpsso: remove support for some IPPROTO_TCP-level socket option names.
In D46437#1058468, @cc wrote:

Are you planning to remove the corresponding code in kernel space in a separate patch?

Aug 26 2024, 4:34 PM
tuexen retitled D46437: tcpsso: remove support for some IPPROTO_TCP-level socket option names from tcpsso: remove some IPPROTO_TCP-level socket option names to tcpsso: remove support for some IPPROTO_TCP-level socket option names.
Aug 26 2024, 8:45 AM
tuexen requested review of D46437: tcpsso: remove support for some IPPROTO_TCP-level socket option names.
Aug 26 2024, 8:45 AM

Aug 25 2024

tuexen committed rG6e7581236ed7: tcp: whitespace cleanup in enum tcp_log_events (authored by tuexen).
tcp: whitespace cleanup in enum tcp_log_events
Aug 25 2024, 8:06 PM

Aug 24 2024

tuexen requested review of D46435: tcp: make tcp_lro_flush() static.
Aug 24 2024, 8:15 PM