<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/include/trace/events/tcp.h, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/include/trace/events/tcp.h?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/include/trace/events/tcp.h?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-08T03:33:15Z</updated>
<entry>
<title>tcp: Add tracepoint for tcp_set_ca_state</title>
<updated>2022-04-08T03:33:15Z</updated>
<author>
<name>Ping Gan</name>
<email>jacky_gam_2001@163.com</email>
</author>
<published>2022-04-06T01:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=15fcdf6ae116d1e8da4ff76c6fd82514f5ea501b'/>
<id>urn:sha1:15fcdf6ae116d1e8da4ff76c6fd82514f5ea501b</id>
<content type='text'>
The congestion status of a tcp flow may be updated since there
is congestion between tcp sender and receiver. It makes sense to
add tracepoint for congestion status set function to summate cc
status duration and evaluate the performance of network
and congestion algorithm. the backgound of this patch is below.

Link: https://github.com/iovisor/bcc/pull/3899

Signed-off-by: Ping Gan &lt;jacky_gam_2001@163.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://lore.kernel.org/r/20220406010956.19656-1-jacky_gam_2001@163.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tcp: add accessors to read/set tp-&gt;snd_cwnd</title>
<updated>2022-04-06T19:05:41Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2022-04-05T23:35:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=40570375356c874b1578e05c1dcc3ff7c1322dbe'/>
<id>urn:sha1:40570375356c874b1578e05c1dcc3ff7c1322dbe</id>
<content type='text'>
We had various bugs over the years with code
breaking the assumption that tp-&gt;snd_cwnd is greater
than zero.

Lately, syzbot reported the WARN_ON_ONCE(!tp-&gt;prior_cwnd) added
in commit 8b8a321ff72c ("tcp: fix zero cwnd in tcp_cwnd_reduction")
can trigger, and without a repro we would have to spend
considerable time finding the bug.

Instead of complaining too late, we want to catch where
and when tp-&gt;snd_cwnd is set to an illegal value.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Suggested-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Link: https://lore.kernel.org/r/20220405233538.947344-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tcp: add tracepoint for checksum errors</title>
<updated>2021-05-14T22:26:03Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-05-14T20:04:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=709c0314239992162cba26a860f04319a15860c4'/>
<id>urn:sha1:709c0314239992162cba26a860f04319a15860c4</id>
<content type='text'>
Add a tracepoint for capturing TCP segments with
a bad checksum. This makes it easy to identify
sources of bad frames in the fleet (e.g. machines
with faulty NICs).

It should also help tools like IOvisor's tcpdrop.py
which are used today to get detailed information
about such packets.

We don't have a socket in many cases so we must
open code the address extraction based just on
the skb.

v2: add missing export for ipv6=m

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: tracepoint: exposing sk_family in all tcp:tracepoints</title>
<updated>2021-02-04T17:25:36Z</updated>
<author>
<name>Hariharan Ananthakrishnan</name>
<email>hari@netflix.com</email>
</author>
<published>2021-01-29T00:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3dd344ea84e122f791ab55498aab985535f32cba'/>
<id>urn:sha1:3dd344ea84e122f791ab55498aab985535f32cba</id>
<content type='text'>
Similar to sock:inet_sock_set_state tracepoint, expose sk_family to
distinguish AF_INET and AF_INET6 families.

The following tcp tracepoints are updated:
tcp:tcp_destroy_sock
tcp:tcp_rcv_space_adjust
tcp:tcp_retransmit_skb
tcp:tcp_send_reset
tcp:tcp_receive_reset
tcp:tcp_retransmit_synack
tcp:tcp_probe

Signed-off-by: Hariharan Ananthakrishnan &lt;hari@netflix.com&gt;
Signed-off-by: Brendan Gregg &lt;bgregg@netflix.com&gt;
Link: https://lore.kernel.org/r/20210129001210.344438-1-hari@netflix.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tcp: remove redundant new line from tcp_event_sk_skb</title>
<updated>2019-11-10T03:41:50Z</updated>
<author>
<name>Tony Lu</name>
<email>tonylu@linux.alibaba.com</email>
</author>
<published>2019-11-09T10:43:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dd3d792def0d4f33bbf319982b1878b0c8aaca34'/>
<id>urn:sha1:dd3d792def0d4f33bbf319982b1878b0c8aaca34</id>
<content type='text'>
This removes '\n' from trace event class tcp_event_sk_skb to avoid
redundant new blank line and make output compact.

Fixes: af4325ecc24f ("tcp: expose sk_state in tcp_retransmit_skb tracepoint")
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Yafang Shao &lt;laoar.shao@gmail.com&gt;
Signed-off-by: Tony Lu &lt;tonylu@linux.alibaba.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: expose sk_state in tcp_retransmit_skb tracepoint</title>
<updated>2018-09-27T03:07:19Z</updated>
<author>
<name>Yafang Shao</name>
<email>laoar.shao@gmail.com</email>
</author>
<published>2018-09-24T12:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=af4325ecc24f45933d5567e72227cff2c1594764'/>
<id>urn:sha1:af4325ecc24f45933d5567e72227cff2c1594764</id>
<content type='text'>
After sk_state exposed, we can get in which state this retransmission
occurs. That could give us more detail for dignostic.
For example, if this retransmission occurs in SYN_SENT state, it may
also indicates that the syn packet may be dropped on the remote peer due
to syn backlog queue full and then we could check the remote peer.

BTW,SYNACK retransmission is traced in tcp_retransmit_synack tracepoint.

Signed-off-by: Yafang Shao &lt;laoar.shao@gmail.com&gt;
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: minor optimization around tcp_hdr() usage in receive path</title>
<updated>2018-05-31T17:20:47Z</updated>
<author>
<name>Yafang Shao</name>
<email>laoar.shao@gmail.com</email>
</author>
<published>2018-05-29T15:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3d97d88e8091f3501e016f6b4ce45a32c4b8f2f6'/>
<id>urn:sha1:3d97d88e8091f3501e016f6b4ce45a32c4b8f2f6</id>
<content type='text'>
This is additional to the
commit ea1627c20c34 ("tcp: minor optimizations around tcp_hdr() usage").
At this point, skb-&gt;data is same with tcp_hdr() as tcp header has not
been pulled yet. So use the less expensive one to get the tcp header.

Remove the third parameter of tcp_rcv_established() and put it into
the function body.

Furthermore, the local variables are listed as a reverse christmas tree :)

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Yafang Shao &lt;laoar.shao@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: use data length instead of skb-&gt;len in tcp_probe</title>
<updated>2018-05-29T14:15:37Z</updated>
<author>
<name>Yafang Shao</name>
<email>laoar.shao@gmail.com</email>
</author>
<published>2018-05-25T10:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2d68c0745a0e8349ff71b04af5ee020d40f78d90'/>
<id>urn:sha1:2d68c0745a0e8349ff71b04af5ee020d40f78d90</id>
<content type='text'>
skb-&gt;len is meaningless to user.
data length could be more helpful, with which we can easily filter out
the packet without payload.

Signed-off-by: Yafang Shao &lt;laoar.shao@gmail.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: introduce a new tracepoint for tcp_rcv_space_adjust</title>
<updated>2018-04-23T13:58:18Z</updated>
<author>
<name>Yafang Shao</name>
<email>laoar.shao@gmail.com</email>
</author>
<published>2018-04-20T15:18:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6163849d289be6ff2acd2fb520da303dec3219f0'/>
<id>urn:sha1:6163849d289be6ff2acd2fb520da303dec3219f0</id>
<content type='text'>
tcp_rcv_space_adjust is called every time data is copied to user space,
introducing a tcp tracepoint for which could show us when the packet is
copied to user.

When a tcp packet arrives, tcp_rcv_established() will be called and with
the existed tracepoint tcp_probe we could get the time when this packet
arrives.
Then this packet will be copied to user, and tcp_rcv_space_adjust will
be called and with this new introduced tracepoint we could get the time
when this packet is copied to user.
With these two tracepoints, we could figure out whether the user program
processes this packet immediately or there's latency.

Hence in the printk message, sk_cookie is printed as a key to relate
tcp_rcv_space_adjust with tcp_probe.

Maybe we could export sockfd in this new tracepoint as well, then we
could relate this new tracepoint with epoll/read/recv* tracepoints, and
finally that could show us the whole lifespan of this packet. But we
could also implement that with pid as these functions are executed in
process context.

Signed-off-by: Yafang Shao &lt;laoar.shao@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Remove unused tcp_set_state tracepoint</title>
<updated>2018-04-16T23:02:15Z</updated>
<author>
<name>Andrey Ignatov</name>
<email>rdna@fb.com</email>
</author>
<published>2018-04-16T22:07:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ef53e9e14714de2ce26eaae0244c07c426064d69'/>
<id>urn:sha1:ef53e9e14714de2ce26eaae0244c07c426064d69</id>
<content type='text'>
This tracepoint was replaced by inet_sock_set_state in 563e0bb and not
used anywhere in the kernel anymore. Remove it.

Signed-off-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
