[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKUHQHA2wHw9k1SiazJf7ag7i4Tz+FPutgu870teVw_Bg@mail.gmail.com>
Date: Mon, 4 Dec 2023 13:28:21 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Philo Lu <lulie@...ux.alibaba.com>
Cc: netdev@...r.kernel.org, rostedt@...dmis.org, mhiramat@...nel.org,
mathieu.desnoyers@...icios.com, davem@...emloft.net, dsahern@...nel.org,
kuba@...nel.org, pabeni@...hat.com, martin.lau@...ux.dev,
linux-trace-kernel@...r.kernel.org, bpf@...r.kernel.org,
xuanzhuo@...ux.alibaba.com, dust.li@...ux.alibaba.com,
alibuda@...ux.alibaba.com, guwen@...ux.alibaba.com, hengqi@...ux.alibaba.com
Subject: Re: [PATCH net-next] tcp: add tracepoints for data send/recv/acked
On Mon, Dec 4, 2023 at 12:43 PM Philo Lu <lulie@...ux.alibaba.com> wrote:
>
> Add 3 tracepoints, namely tcp_data_send/tcp_data_recv/tcp_data_acked,
> which will be called every time a tcp data packet is sent, received, and
> acked.
> tcp_data_send: called after a data packet is sent.
> tcp_data_recv: called after a data packet is receviced.
> tcp_data_acked: called after a valid ack packet is processed (some sent
> data are ackknowledged).
>
> We use these callbacks for fine-grained tcp monitoring, which collects
> and analyses every tcp request/response event information. The whole
> system has been described in SIGMOD'18 (see
> https://dl.acm.org/doi/pdf/10.1145/3183713.3190659 for details). To
> achieve this with bpf, we require hooks for data events that call bpf
> prog (1) when any data packet is sent/received/acked, and (2) after
> critical tcp state variables have been updated (e.g., snd_una, snd_nxt,
> rcv_nxt). However, existing bpf hooks cannot meet our requirements.
> Besides, these tracepoints help to debug tcp when data send/recv/acked.
This I do not understand.
>
> Though kretprobe/fexit can also be used to collect these information,
> they will not work if the kernel functions get inlined. Considering the
> stability, we prefer tracepoint as the solution.
I dunno, this seems quite weak to me. I see many patches coming to add
tracing in the stack, but no patches fixing any issues.
It really looks like : We do not know how TCP stack works, we do not
know if there is any issue,
let us add trace points to help us to make forward progress in our analysis.
These tracepoints will not tell how many segments/bytes were
sent/acked/received, I really do not see
how we will avoid adding in the future more stuff, forcing the
compiler to save more state
just in case the tracepoint needs the info.
The argument of "add minimal info", so that we can silently add more
stuff in the future "for free" is not something I buy.
I very much prefer that you make sure the stuff you need is not
inlined, so that standard kprobe/kretprobe facility can be used.
Powered by blists - more mailing lists