All of lore.kernel.org
 help / color / mirror / Atom feed
* Network RX per process per interface statistics
@ 2023-03-24 16:29 Kamil Zaripov
  2023-03-24 20:19 ` Stanislav Fomichev
  0 siblings, 1 reply; 4+ messages in thread
From: Kamil Zaripov @ 2023-03-24 16:29 UTC (permalink / raw)
  To: bpf, netdev

Hi everyone,

I trying to make a BPF program that can collect per process per interface statistics of network data consumption. Right now most difficult part for me is RX traffic.

I have tried to find some point in the sk_buff's way up to network stack where I can extract info both about the network interface which captured package and the process that will consume this data but failed. So I have to listen events in several points and somehow merge collected data.

The last point I found at which sk_buff still contains information about network device that captured this sk_buff is netif_receive_skb tracepoint. The first point where I can found information about process is protocol's rcv handlers (like tcp_v4_do_rcv). But I have some questions, to finish my program:

1. It seems that sk_buff modifies during handling, so how can I "match" sk_buff with same data in netif_receive_skb and in tcp_v4_do_rcv?
2. Maybe there is some good point where I can attach listener and where I can extract both process and interface info for each package?

Regards
Zaripov Kamil.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-27 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 16:29 Network RX per process per interface statistics Kamil Zaripov
2023-03-24 20:19 ` Stanislav Fomichev
2023-03-27 14:19   ` Kamil Zaripov
2023-03-27 17:09     ` Stanislav Fomichev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.