Re: [PATCH net-next v3 10/14] net-timestamp: add basic support with tskey offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/24 7:41 PM, Jason Xing wrote:

All that said, while looking at tcp_tx_timestamp() again, there is always
"shinfo->tskey = TCP_SKB_CB(skb)->seq + skb->len - 1;". shinfo->tskey can be
used directly as-is by the bpf prog. I think now I am missing why the bpf prog
needs the sk_tskey in the sk?

As you said, tcp seqno could be treated as the key, but it leaks the
information in TCP layer to users. Please see the commit:

I don't think it is a concern for bpf prog running in the kernel. The sockops bpf prog can already read the sk, the skb (which has seqno), and many others.

The bpf prog is not a print-only logic. Only using bpf prog to do raw data dumping is not fully utilizing its capability, e.g. data aggregation. The bpf prog should aggregate the data first which is to calculate the delay here.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux