<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/tcp.h, branch linux-6.9.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.9.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-03-05T04:46:18+00:00</updated>
<entry>
<title>tcp: align tcp_sock_write_rx group</title>
<updated>2024-03-05T04:46:18+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-03-01T17:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=345a6e2631c1267221b684e110bba03e4c26ece0'/>
<id>urn:sha1:345a6e2631c1267221b684e110bba03e4c26ece0</id>
<content type='text'>
Stephen Rothwell and kernel test robot reported that some arches
(parisc, hexagon) and/or compilers would not like blamed commit.

Lets make sure tcp_sock_write_rx group does not start with a hole.

While we are at it, correct tcp_sock_write_tx CACHELINE_ASSERT_GROUP_SIZE()
since after the blamed commit, we went to 105 bytes.

Fixes: 99123622050f ("tcp: remove some holes in struct tcp_sock")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/netdev/20240301121108.5d39e4f9@canb.auug.org.au/
Closes: https://lore.kernel.org/oe-kbuild-all/202403011451.csPYOS3C-lkp@intel.com/
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Tested-by: Simon Horman &lt;horms@kernel.org&gt; # build-tested
Link: https://lore.kernel.org/r/20240301171945.2958176-1-edumazet@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tcp: remove some holes in struct tcp_sock</title>
<updated>2024-02-29T04:21:24+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-02-27T19:27:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99123622050f10ca9148a0fffba2de0afd6cdfff'/>
<id>urn:sha1:99123622050f10ca9148a0fffba2de0afd6cdfff</id>
<content type='text'>
By moving some fields around, this patch shrinks
holes size from 56 to 32, saving 24 bytes on 64bit arches.

After the patch pahole gives the following for 'struct tcp_sock':

	/* size: 2304, cachelines: 36, members: 162 */
	/* sum members: 2234, holes: 6, sum holes: 32 */
	/* sum bitfield members: 34 bits, bit holes: 5, sum bit holes: 14 bits */
	/* padding: 32 */
	/* paddings: 3, sum paddings: 10 */
	/* forced alignments: 1, forced holes: 1, sum forced holes: 12 */

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240227192721.3558982-1-edumazet@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tcp: move tp-&gt;tcp_usec_ts to tcp_sock_read_txrx group</title>
<updated>2024-02-12T09:51:26+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-02-08T14:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=666a877deab2bcf8fd11c962d69e687e18168a6f'/>
<id>urn:sha1:666a877deab2bcf8fd11c962d69e687e18168a6f</id>
<content type='text'>
tp-&gt;tcp_usec_ts is a read mostly field, used in rx and tx fast paths.

Fixes: d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Coco Li &lt;lixiaoyan@google.com&gt;
Cc: Wei Wang &lt;weiwan@google.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: move tp-&gt;scaling_ratio to tcp_sock_read_txrx group</title>
<updated>2024-02-12T09:51:26+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-02-08T14:43:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=119ff04864a24470b1e531bb53e5c141aa8fefb0'/>
<id>urn:sha1:119ff04864a24470b1e531bb53e5c141aa8fefb0</id>
<content type='text'>
tp-&gt;scaling_ratio is a read mostly field, used in rx and tx fast paths.

Fixes: d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Coco Li &lt;lixiaoyan@google.com&gt;
Cc: Wei Wang &lt;weiwan@google.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2023-12-08T01:53:17+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2023-12-08T01:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2483e7f04ce0e97c69b27d28ebce7a2320b7a7a6'/>
<id>urn:sha1:2483e7f04ce0e97c69b27d28ebce7a2320b7a7a6</id>
<content type='text'>
Cross-merge networking fixes after downstream PR.

Conflicts:

drivers/net/ethernet/stmicro/stmmac/dwmac5.c
drivers/net/ethernet/stmicro/stmmac/dwmac5.h
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
  37e4b8df27bc ("net: stmmac: fix FPE events losing")
  c3f3b97238f6 ("net: stmmac: Refactor EST implementation")
https://lore.kernel.org/all/20231206110306.01e91114@canb.auug.org.au/

Adjacent changes:

net/ipv4/tcp_ao.c
  9396c4ee93f9 ("net/tcp: Don't store TCP-AO maclen on reqsk")
  7b0f570f879a ("tcp: Move TCP-AO bits from cookie_v[46]_check() to tcp_ao_syncookie().")

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net/tcp: Don't store TCP-AO maclen on reqsk</title>
<updated>2023-12-06T11:36:56+00:00</updated>
<author>
<name>Dmitry Safonov</name>
<email>dima@arista.com</email>
</author>
<published>2023-12-04T19:00:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9396c4ee93f9ac03cd0cea0bb345fbc657772943'/>
<id>urn:sha1:9396c4ee93f9ac03cd0cea0bb345fbc657772943</id>
<content type='text'>
This extra check doesn't work for a handshake when SYN segment has
(current_key.maclen != rnext_key.maclen). It could be amended to
preserve rnext_key.maclen instead of current_key.maclen, but that
requires a lookup on listen socket.

Originally, this extra maclen check was introduced just because it was
cheap. Drop it and convert tcp_request_sock::maclen into boolean
tcp_request_sock::used_tcp_ao.

Fixes: 06b22ef29591 ("net/tcp: Wire TCP-AO to request sockets")
Signed-off-by: Dmitry Safonov &lt;dima@arista.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>tcp: reorganize tcp_sock fast path variables</title>
<updated>2023-12-06T04:16:05+00:00</updated>
<author>
<name>Coco Li</name>
<email>lixiaoyan@google.com</email>
</author>
<published>2023-12-04T20:12:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5fed5addb2b6bc13035de4338b7ea2052a2e006'/>
<id>urn:sha1:d5fed5addb2b6bc13035de4338b7ea2052a2e006</id>
<content type='text'>
The variables are organized according in the following way:

- TX read-mostly hotpath cache lines
- TXRX read-mostly hotpath cache lines
- RX read-mostly hotpath cache lines
- TX read-write hotpath cache line
- TXRX read-write hotpath cache line
- RX read-write hotpath cache line

Fastpath cachelines end after rcvq_space.

Cache line boundaries are enforced only between read-mostly and
read-write. That is, if read-mostly tx cachelines bleed into
read-mostly txrx cachelines, we do not care. We care about the
boundaries between read and write cachelines because we want
to prevent false sharing.

Fast path variables span cache lines before change: 12
Fast path variables span cache lines after change: 8

Suggested-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Wei Wang &lt;weiwan@google.com&gt;
Signed-off-by: Coco Li &lt;lixiaoyan@google.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Link: https://lore.kernel.org/r/20231204201232.520025-3-lixiaoyan@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tcp: fix fastopen code vs usec TS</title>
<updated>2023-11-03T09:16:42+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2023-10-31T06:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdbab6236605dc11780779d9af689aea7d58cab1'/>
<id>urn:sha1:cdbab6236605dc11780779d9af689aea7d58cab1</id>
<content type='text'>
After blamed commit, TFO client-ack-dropped-then-recovery-ms-timestamps
packetdrill test failed.

David Morley and Neal Cardwell started investigating and Neal pointed
that we had :

tcp_conn_request()
  tcp_try_fastopen()
   -&gt; tcp_fastopen_create_child
     -&gt; child = inet_csk(sk)-&gt;icsk_af_ops-&gt;syn_recv_sock()
       -&gt; tcp_create_openreq_child()
          -&gt; copy req_usec_ts from req:
          newtp-&gt;tcp_usec_ts = treq-&gt;req_usec_ts;
          // now the new TFO server socket always does usec TS, no matter
          // what the route options are...
  send_synack()
    -&gt; tcp_make_synack()
        // disable tcp_rsk(req)-&gt;req_usec_ts if route option is not present:
        if (tcp_rsk(req)-&gt;req_usec_ts &lt; 0)
                tcp_rsk(req)-&gt;req_usec_ts = dst_tcp_usec_ts(dst);

tcp_conn_request() has the initial dst, we can initialize
tcp_rsk(req)-&gt;req_usec_ts there instead of later in send_synack();

This means tcp_rsk(req)-&gt;req_usec_ts can be a boolean.

Many thanks to David an Neal for their help.

Fixes: 614e8316aa4c ("tcp: add support for usec resolution in TCP TS values")
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Closes: https://lore.kernel.org/oe-lkp/202310302216.f79d78bc-oliver.sang@intel.com
Suggested-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: David Morley &lt;morleyd@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/tcp: Wire TCP-AO to request sockets</title>
<updated>2023-10-27T09:35:45+00:00</updated>
<author>
<name>Dmitry Safonov</name>
<email>dima@arista.com</email>
</author>
<published>2023-10-23T19:22:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=06b22ef29591f625ef877ae00d82192938e29e60'/>
<id>urn:sha1:06b22ef29591f625ef877ae00d82192938e29e60</id>
<content type='text'>
Now when the new request socket is created from the listening socket,
it's recorded what MKT was used by the peer. tcp_rsk_used_ao() is
a new helper for checking if TCP-AO option was used to create the
request socket.
tcp_ao_copy_all_matching() will copy all keys that match the peer on the
request socket, as well as preparing them for the usage (creating
traffic keys).

Co-developed-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Signed-off-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Co-developed-by: Salam Noureddine &lt;noureddine@arista.com&gt;
Signed-off-by: Salam Noureddine &lt;noureddine@arista.com&gt;
Signed-off-by: Dmitry Safonov &lt;dima@arista.com&gt;
Acked-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/tcp: Add TCP-AO sign to twsk</title>
<updated>2023-10-27T09:35:44+00:00</updated>
<author>
<name>Dmitry Safonov</name>
<email>dima@arista.com</email>
</author>
<published>2023-10-23T19:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=decde2586b34b99684faff1eab41e5c496c27fb6'/>
<id>urn:sha1:decde2586b34b99684faff1eab41e5c496c27fb6</id>
<content type='text'>
Add support for sockets in time-wait state.
ao_info as well as all keys are inherited on transition to time-wait
socket. The lifetime of ao_info is now protected by ref counter, so
that tcp_ao_destroy_sock() will destruct it only when the last user is
gone.

Co-developed-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Signed-off-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Co-developed-by: Salam Noureddine &lt;noureddine@arista.com&gt;
Signed-off-by: Salam Noureddine &lt;noureddine@arista.com&gt;
Signed-off-by: Dmitry Safonov &lt;dima@arista.com&gt;
Acked-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
