Use bpf map to read the interface stats
With the support of xt_bpf module, the more accurate per interface network traffic stats can be obtained from ifaceStatsMap under sys/fs/bpf/. Change the framework NetworkStatsService native implementation to read from map instead of /proc/net/dev. The corresponding test is added and refactor the old test to be compatible. Test: ./libbpf_test atest android.net.cts.TrafficStatsTest Bug: 72111305 Change-Id: I2a6c6f82317bd9667c1b15e6b082fc9f153f6bf3
Loading
Please register or sign in to comment