<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/linux/tcp.h, branch linux-6.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-05-29T09:13:05Z</updated>
<entry>
<title>tcp: be less liberal in TSEcr received while in SYN_RECV state</title>
<updated>2025-05-29T09:13:05Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2025-02-25T17:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7967b84909e5ebcd5273b393e48d6ba8075306db'/>
<id>urn:sha1:7967b84909e5ebcd5273b393e48d6ba8075306db</id>
<content type='text'>
[ Upstream commit 3ba075278c11cdb19e2dbb80362042f1b0c08f74 ]

Yong-Hao Zou mentioned that linux was not strict as other OS in 3WHS,
for flows using TCP TS option (RFC 7323)

As hinted by an old comment in tcp_check_req(),
we can check the TSEcr value in the incoming packet corresponds
to one of the SYNACK TSval values we have sent.

In this patch, I record the oldest and most recent values
that SYNACK packets have used.

Send a challenge ACK if we receive a TSEcr outside
of this range, and increase a new SNMP counter.

nstat -az | grep TSEcrRejected
TcpExtTSEcrRejected            0                  0.0

Due to TCP fastopen implementation, do not apply yet these checks
for fastopen flows.

v2: No longer use req-&gt;num_timeout, but treq-&gt;snt_tsval_first
    to detect when first SYNACK is prepared. This means
    we make sure to not send an initial zero TSval.
    Make sure MPTCP and TCP selftests are passing.
    Change MIB name to TcpExtTSEcrRejected

v1: https://lore.kernel.org/netdev/CADVnQykD8i4ArpSZaPKaoNxLJ2if2ts9m4As+=Jvdkrgx1qMHw@mail.gmail.com/T/

Reported-by: Yong-Hao Zou &lt;yonghaoz1994@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Matthieu Baerts (NGI0) &lt;matttbe@kernel.org&gt;
Reviewed-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Reviewed-by: Kuniyuki Iwashima &lt;kuniyu@amazon.com&gt;
Link: https://patch.msgid.link/20250225171048.3105061-1-edumazet@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: tcp: replace the document for "lsndtime" in tcp_sock</title>
<updated>2024-11-05T02:10:56Z</updated>
<author>
<name>Menglong Dong</name>
</author>
<published>2024-11-04T07:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a2cdeeae9ddc14d752173be6af98bc9fb45c6ad'/>
<id>urn:sha1:0a2cdeeae9ddc14d752173be6af98bc9fb45c6ad</id>
<content type='text'>
Commit d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables")
moved the fields around and misplaced the documentation for "lsndtime".
So, let's replace it in the proper place.

Signed-off-by: Menglong Dong &lt;dongml2@chinatelecom.cn&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://patch.msgid.link/20241104070041.64302-1-dongml2@chinatelecom.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tcp: more struct tcp_sock adjustments</title>
<updated>2024-04-08T10:49:02Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2024-04-05T10:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2c3a7eb1afada8cfb5fde41489913ea5733a319'/>
<id>urn:sha1:d2c3a7eb1afada8cfb5fde41489913ea5733a319</id>
<content type='text'>
tp-&gt;recvmsg_inq is used from tcp recvmsg() thus should
be in tcp_sock_read_rx group.

tp-&gt;tcp_clock_cache and tp-&gt;tcp_mstamp are written
both in rx and tx paths, thus are better placed
in tcp_sock_write_txrx group.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: align tcp_sock_write_rx group</title>
<updated>2024-03-05T04:46:18Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2024-03-01T17:19:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:24Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2024-02-27T19:27:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:26Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2024-02-08T14:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:26Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2024-02-08T14:43:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:17Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2023-12-08T01:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:56Z</updated>
<author>
<name>Dmitry Safonov</name>
</author>
<published>2023-12-04T19:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:05Z</updated>
<author>
<name>Coco Li</name>
</author>
<published>2023-12-04T20:12:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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>
</feed>
