Re: [PATCH] net: tcp_drop adds `reason` parameter for tracing v2
From: Eric Dumazet <edumazet@google.com>
Date: 2021-08-25 16:21:17
Also in:
lkml
On Wed, Aug 25, 2021 at 9:04 AM Jakub Kicinski [off-list ref] wrote:
On Wed, 25 Aug 2021 08:47:46 -0700 Eric Dumazet wrote:quoted
On Wed, Aug 25, 2021 at 8:41 AM Zhongya Yan [off-list ref] wrote:quoted
@@ -5703,15 +5700,15 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS); NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSYNCHALLENGE); tcp_send_challenge_ack(sk, skb); - goto discard; + tcp_drop(sk, skb, TCP_DROP_MASK(__LINE__, TCP_VALIDATE_INCOMING));I'd rather use a string. So that we can more easily identify _why_ the packet was drop, without looking at the source code of the exact kernel version to locate line number 1057Yeah, the line number seems like a particularly bad idea. Hopefully strings won't be problematic, given we can expect most serious users to feed the tracepoints via BPF. enum would be more convenient there, I'd think.quoted
You can be sure that we will get reports in the future from users of heavily modified kernels. Having to download a git tree, or apply semi-private patches is a no go.I'm slightly surprised by this angle. Are there downstream kernels with heavily modified TCP other than Google's?
Not sure why Google is mentioned here ? Have you ever received a public report about TCP behavior in a Google kernel ? Over the years, we received hundreds of TCP bug reports on netdev@vger, where users claim to use kernel version 4.19 (or other), when in fact they use 4.19.xxx It takes in general multiple emails exchange before we get a more realistic version number. Not to mention distro kernels, or even worse private kernels, which are not exactly easy to track for us upstream developers.