/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 | 44 } StatsValue; typedef
|
/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; 87 mFakeAppUidStatsMap = BpfMap<uint32_t, StatsValue>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, 0); in SetUp() 90 mFakeStatsMap = BpfMap<StatsKey, StatsValue>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, 0); in SetUp() 96 mFakeIfaceStatsMap = BpfMap<uint32_t, StatsValue>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, 0); in SetUp() 108 StatsValue value, BpfMap<StatsKey, StatsValue>& map) { in populateFakeStats() 120 void expectStatsEqual(const StatsValue& target, const Stats& result) { in expectStatsEqual() 127 void expectStatsLineEqual(const StatsValue target, const char* iface, uint32_t uid, in expectStatsLineEqual() 198 StatsValue value1 = { in TEST_F() [all …]
|
/system/netd/tests/ |
D | bpf_base_test.cpp | 165 BpfMap<StatsKey, StatsValue> statsMapA(STATS_MAP_A_PATH); in TEST_F() 167 BpfMap<StatsKey, StatsValue> statsMapB(STATS_MAP_B_PATH); in TEST_F() 169 BpfMap<uint32_t, StatsValue> appUidStatsMap(APP_UID_STATS_MAP_PATH); in TEST_F() 174 StatsValue statsMapValue = {.rxPackets = 1, .rxBytes = 100}; in TEST_F() 180 Result<StatsValue> statsResult = statsMapA.readValue(key); in TEST_F()
|
/system/netd/server/ |
D | TrafficController.h | 152 BpfMap<uint32_t, StatsValue> mAppUidStatsMap; 163 BpfMap<StatsKey, StatsValue> mStatsMapA GUARDED_BY(mMutex); 165 BpfMap<StatsKey, StatsValue> mStatsMapB GUARDED_BY(mMutex); 178 BpfMap<uint32_t, StatsValue> mIfaceStatsMap;
|
D | TrafficController.cpp | 335 const BpfMap<StatsKey, StatsValue>&) { in tagSocket() argument 353 BpfMap<StatsKey, StatsValue>& currentMap = in tagSocket() 464 BpfMap<StatsKey, StatsValue>& map) { in deleteTagData() 489 BpfMap<uint32_t, StatsValue>& map) -> base::Result<void> { in deleteTagData() 970 auto printAppUidStatsInfo = [&dw](const uint32_t& key, const StatsValue& value, in dump() 971 const BpfMap<uint32_t, StatsValue>&) { in dump() argument 985 const auto printStatsInfo = [&dw, this](const StatsKey& key, const StatsValue& value, in dump() 986 const BpfMap<StatsKey, StatsValue>&) { in dump() argument 1026 const auto printIfaceStatsInfo = [&dw, this](const uint32_t& key, const StatsValue& value, in dump() 1027 const BpfMap<uint32_t, StatsValue>&) { in dump() argument
|
D | TrafficControllerTest.cpp | 69 BpfMap<uint32_t, StatsValue> mFakeAppUidStatsMap; 70 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() 502 Result<StatsValue> statsMapResult = mFakeStatsMapA.readValue(tagStatsMapKey); in TEST_F() 555 Result<StatsValue> statsMapResult = mFakeStatsMapA.readValue(tagStatsMapKey2); in TEST_F() 589 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 = {}; \
|