/system/netd/libnetdbpf/include/netdbpf/ |
D | BpfNetworkStats.h | 60 const BpfMap<uint32_t, StatsValue>& appUidStatsMap); 63 const BpfMap<uint32_t, StatsValue>& ifaceStatsMap, 68 int limitUid, const BpfMap<StatsKey, StatsValue>& statsMap, 75 const BpfMap<Key, StatsValue>& statsMap, uint32_t ifaceIndex, char* ifname, in getIfaceNameFromMap() 87 void maybeLogUnknownIface(int ifaceIndex, const BpfMap<Key, StatsValue>& statsMap, in maybeLogUnknownIface() 111 const BpfMap<uint32_t, StatsValue>& statsMap,
|
D | bpf_shared.h | 51 } StatsValue; typedef 52 STRUCT_SIZE(StatsValue, 4 * 8); // 32
|
/system/netd/libnetdbpf/ |
D | BpfNetworkStats.cpp | 48 const BpfMap<uint32_t, StatsValue>& appUidStatsMap) { in bpfGetUidStatsInternal() 61 BpfMapRO<uint32_t, StatsValue> appUidStatsMap(APP_UID_STATS_MAP_PATH); in bpfGetUidStats() 72 const BpfMap<uint32_t, StatsValue>& ifaceStatsMap, in bpfGetIfaceStatsInternal() 80 const BpfMap<uint32_t, StatsValue>& ifaceStatsMap) -> Result<void> { in bpfGetIfaceStatsInternal() 87 Result<StatsValue> statsEntry = ifaceStatsMap.readValue(key); in bpfGetIfaceStatsInternal() 103 BpfMapRO<uint32_t, StatsValue> ifaceStatsMap(IFACE_STATS_MAP_PATH); in bpfGetIfaceStats() 119 stats_line populateStatsEntry(const StatsKey& statsKey, const StatsValue& statsEntry, in populateStatsEntry() 135 int limitUid, const BpfMap<StatsKey, StatsValue>& statsMap, in parseBpfNetworkStatsDetailInternal() 141 const BpfMap<StatsKey, StatsValue>& statsMap) -> Result<void> { in parseBpfNetworkStatsDetailInternal() 159 Result<StatsValue> statsEntry = statsMap.readValue(key); in parseBpfNetworkStatsDetailInternal() [all …]
|
D | BpfNetworkStatsTest.cpp | 75 BpfMap<uint32_t, StatsValue> mFakeAppUidStatsMap; 76 BpfMap<StatsKey, StatsValue> mFakeStatsMap; 78 BpfMap<uint32_t, StatsValue> mFakeIfaceStatsMap; 86 mFakeAppUidStatsMap = BpfMap<uint32_t, StatsValue>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, 0); in SetUp() 89 mFakeStatsMap = BpfMap<StatsKey, StatsValue>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, 0); in SetUp() 95 mFakeIfaceStatsMap = BpfMap<uint32_t, StatsValue>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, 0); in SetUp() 107 StatsValue value, BpfMap<StatsKey, StatsValue>& map) { in populateFakeStats() 119 void expectStatsEqual(const StatsValue& target, const Stats& result) { in expectStatsEqual() 126 void expectStatsLineEqual(const StatsValue target, const char* iface, uint32_t uid, in expectStatsLineEqual() 191 StatsValue value1 = { in TEST_F() [all …]
|
/system/netd/tests/ |
D | bpf_base_test.cpp | 145 BpfMap<StatsKey, StatsValue> statsMapA(STATS_MAP_A_PATH); in TEST_F() 147 BpfMap<StatsKey, StatsValue> statsMapB(STATS_MAP_B_PATH); in TEST_F() 149 BpfMap<uint32_t, StatsValue> appUidStatsMap(APP_UID_STATS_MAP_PATH); in TEST_F() 154 StatsValue statsMapValue = {.rxPackets = 1, .rxBytes = 100}; in TEST_F() 160 Result<StatsValue> statsResult = statsMapA.readValue(key); in TEST_F()
|
/system/netd/server/ |
D | TrafficController.h | 146 BpfMap<uint32_t, StatsValue> mAppUidStatsMap; 157 BpfMap<StatsKey, StatsValue> mStatsMapA GUARDED_BY(mMutex); 159 BpfMap<StatsKey, StatsValue> mStatsMapB GUARDED_BY(mMutex); 172 BpfMap<uint32_t, StatsValue> mIfaceStatsMap;
|
D | TrafficController.cpp | 327 const BpfMap<StatsKey, StatsValue>&) { in tagSocket() argument 345 BpfMap<StatsKey, StatsValue>& currentMap = in tagSocket() 442 BpfMap<StatsKey, StatsValue>& map) { in deleteTagData() 467 BpfMap<uint32_t, StatsValue>& map) -> base::Result<void> { in deleteTagData() 898 auto printAppUidStatsInfo = [&dw](const uint32_t& key, const StatsValue& value, in dump() 899 const BpfMap<uint32_t, StatsValue>&) { in dump() argument 913 const auto printStatsInfo = [&dw, this](const StatsKey& key, const StatsValue& value, in dump() 914 const BpfMap<StatsKey, StatsValue>&) { in dump() argument 954 const auto printIfaceStatsInfo = [&dw, this](const uint32_t& key, const StatsValue& value, in dump() 955 const BpfMap<uint32_t, StatsValue>&) { in dump() argument
|
D | TrafficControllerTest.cpp | 70 BpfMap<uint32_t, StatsValue> mFakeAppUidStatsMap; 71 BpfMap<StatsKey, StatsValue> mFakeStatsMapA; 88 mFakeAppUidStatsMap.reset(createMap(BPF_MAP_TYPE_HASH, sizeof(uint32_t), sizeof(StatsValue), in SetUp() 92 mFakeStatsMapA.reset(createMap(BPF_MAP_TYPE_HASH, sizeof(StatsKey), sizeof(StatsValue), in SetUp() 155 StatsValue statsMapValue = {.rxPackets = 1, .rxBytes = 100}; in populateFakeStats() 286 Result<StatsValue> statsMapResult = mFakeStatsMapA.readValue(tagStatsMapKey); in expectFakeStatsUnchanged() 472 Result<StatsValue> statsMapResult = mFakeStatsMapA.readValue(tagStatsMapKey); in TEST_F() 521 Result<StatsValue> statsMapResult = mFakeStatsMapA.readValue(tagStatsMapKey2); in TEST_F() 553 Result<StatsValue> statsMapResult = mFakeStatsMapA.readValue(tagStatsMapKey1); in TEST_F()
|
/system/netd/bpf_progs/ |
D | netd.c | 54 DEFINE_BPF_MAP_GRO(app_uid_stats_map, HASH, uint32_t, StatsValue, APP_STATS_MAP_SIZE, in DEFINE_BPF_MAP_GRO() 56 DEFINE_BPF_MAP_GRW(stats_map_A, HASH, StatsKey, StatsValue, STATS_MAP_SIZE, AID_NET_BW_STATS) in DEFINE_BPF_MAP_GRO() 57 DEFINE_BPF_MAP_GRW(stats_map_B, HASH, StatsKey, StatsValue, STATS_MAP_SIZE, AID_NET_BW_STATS) in DEFINE_BPF_MAP_GRO() 58 DEFINE_BPF_MAP_GRO(iface_stats_map, HASH, uint32_t, StatsValue, IFACE_STATS_MAP_SIZE, in DEFINE_BPF_MAP_GRO() 102 StatsValue* value = bpf_##the_stats_map##_lookup_elem(key); \ 104 StatsValue newValue = {}; \
|