Home
last modified time | relevance | path

Searched refs:BpfMap (Results 1 – 25 of 27) sorted by relevance

12

/aosp12/system/bpf/libbpf_android/include/bpf/
H A DBpfMap.h45 class BpfMap {
47 BpfMap<Key, Value>() {}; in BpfMap() function
57 explicit BpfMap<Key, Value>(const char* pathname) : BpfMap<Key, Value>(pathname, 0) {}
131 BpfMap<Key, Value>& operator=(const BpfMap<Key, Value>& other) {
137 BpfMap<Key, Value>& operator=(BpfMap<Key, Value>&& other) noexcept {
190 base::Result<void> BpfMap<Key, Value>::iterate( in iterate()
205 base::Result<void> BpfMap<Key, Value>::iterateWithValue( in iterateWithValue()
222 base::Result<void> BpfMap<Key, Value>::iterate( in iterate()
236 base::Result<void> BpfMap<Key, Value>::iterateWithValue( in iterateWithValue()
253 class BpfMapRO : public BpfMap<Key, Value> {
[all …]
/aosp12/system/bpf/libbpf_android/
H A DBpfMapTest.cpp69 void checkMapInvalid(BpfMap<uint32_t, uint32_t>& map) { in checkMapInvalid()
74 void checkMapValid(BpfMap<uint32_t, uint32_t>& map) { in checkMapValid()
79 void writeToMapAndCheck(BpfMap<uint32_t, uint32_t>& map, uint32_t key, uint32_t value) { in writeToMapAndCheck()
91 void populateMap(uint32_t total, BpfMap<uint32_t, uint32_t>& map) { in populateMap()
98 void expectMapEmpty(BpfMap<uint32_t, uint32_t>& map) { in expectMapEmpty()
106 BpfMap<uint32_t, uint32_t> testMap1; in TEST_F()
114 BpfMap<uint32_t, uint32_t> testMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC); in TEST_F()
141 BpfMap<uint32_t, uint32_t> testMap2; in TEST_F()
155 BpfMap<uint32_t, uint32_t> testMap2; in TEST_F()
219 const BpfMap<unsigned int, unsigned int>&) -> Result<void> { in TEST_F()
[all …]
H A DBpfLoadTest.cpp64 android::bpf::BpfMap<uint32_t, uint32_t> m(tp_map_path); in checkMapNonZero()
71 BpfMap<uint32_t, uint32_t>& map) { in checkMapNonZero()
/aosp12/system/netd/libnetdbpf/include/netdbpf/
H A DBpfNetworkStats.h60 const BpfMap<uint32_t, StatsValue>& appUidStatsMap);
63 const BpfMap<uint32_t, StatsValue>& ifaceStatsMap,
64 const BpfMap<uint32_t, IfaceValue>& ifaceNameMap);
68 int limitUid, const BpfMap<StatsKey, StatsValue>& statsMap,
69 const BpfMap<uint32_t, IfaceValue>& ifaceMap);
74 int getIfaceNameFromMap(const BpfMap<uint32_t, IfaceValue>& ifaceMap, in getIfaceNameFromMap()
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,
112 const BpfMap<uint32_t, IfaceValue>& ifaceMap);
/aosp12/system/netd/server/
H A DTrafficController.h34 using android::bpf::BpfMap;
131 BpfMap<uint64_t, UidTagValue> mCookieTagMap GUARDED_BY(mMutex);
139 BpfMap<uint32_t, uint8_t> mUidCounterSetMap GUARDED_BY(mMutex);
146 BpfMap<uint32_t, StatsValue> mAppUidStatsMap;
157 BpfMap<StatsKey, StatsValue> mStatsMapA GUARDED_BY(mMutex);
159 BpfMap<StatsKey, StatsValue> mStatsMapB GUARDED_BY(mMutex);
166 BpfMap<uint32_t, IfaceValue> mIfaceIndexNameMap;
172 BpfMap<uint32_t, StatsValue> mIfaceStatsMap;
186 BpfMap<uint32_t, uint8_t> mConfigurationMap GUARDED_BY(mMutex);
191 BpfMap<uint32_t, UidOwnerValue> mUidOwnerMap GUARDED_BY(mMutex);
[all …]
H A DTrafficController.cpp327 const BpfMap<StatsKey, StatsValue>&) { in tagSocket()
345 BpfMap<StatsKey, StatsValue>& currentMap = in tagSocket()
442 BpfMap<StatsKey, StatsValue>& map) { in deleteTagData()
874 const BpfMap<uint64_t, UidTagValue>&) { in dump()
886 const BpfMap<uint32_t, uint8_t>&) { in dump()
899 const BpfMap<uint32_t, StatsValue>&) { in dump()
914 const BpfMap<StatsKey, StatsValue>&) { in dump()
940 const BpfMap<uint32_t, IfaceValue>&) { in dump()
955 const BpfMap<uint32_t, StatsValue>&) { in dump()
1002 const BpfMap<uint32_t, UidOwnerValue>&) { in dump()
[all …]
H A DClatdController.h92 bpf::BpfMap<ClatEgress4Key, ClatEgress4Value> mClatEgress4Map GUARDED_BY(mutex);
93 bpf::BpfMap<ClatIngress6Key, ClatIngress6Value> mClatIngress6Map GUARDED_BY(mutex);
H A DTrafficControllerTest.cpp68 BpfMap<uint64_t, UidTagValue> mFakeCookieTagMap;
69 BpfMap<uint32_t, uint8_t> mFakeUidCounterSetMap;
70 BpfMap<uint32_t, StatsValue> mFakeAppUidStatsMap;
71 BpfMap<StatsKey, StatsValue> mFakeStatsMapA;
72 BpfMap<uint32_t, uint8_t> mFakeConfigurationMap;
73 BpfMap<uint32_t, UidOwnerValue> mFakeUidOwnerMap;
74 BpfMap<uint32_t, uint8_t> mFakeUidPermissionMap;
205 const BpfMap<uint32_t, UidOwnerValue>&) { in checkEachUidValue()
238 void expectMapEmpty(BpfMap<Key, Value>& map) { in expectMapEmpty()
H A DClatdController.cpp66 using android::bpf::BpfMap;
587 const BpfMap<ClatEgress4Key, ClatEgress4Value>&) { in dumpEgress()
618 const BpfMap<ClatIngress6Key, ClatIngress6Value>&) { in dumpIngress()
/aosp12/packages/modules/Connectivity/Tethering/tests/privileged/src/com/android/networkstack/tethering/
H A DBpfMapTest.java58 private BpfMap<TetherDownstream6Key, Tether6Value> mTestMap;
82 mTestMap = new BpfMap<>( in initTestMap()
83 TETHER_DOWNSTREAM6_FS_PATH, BpfMap.BPF_F_RDWR, in initTestMap()
114 try (BpfMap readOnlyMap = new BpfMap<>(TETHER_DOWNSTREAM6_FS_PATH, BpfMap.BPF_F_RDONLY, in testGetFd()
124 try (BpfMap writeOnlyMap = new BpfMap<>(TETHER_DOWNSTREAM6_FS_PATH, BpfMap.BPF_F_WRONLY, in testGetFd()
134 try (BpfMap readWriteMap = new BpfMap<>(TETHER_DOWNSTREAM6_FS_PATH, BpfMap.BPF_F_RDWR, in testGetFd()
/aosp12/system/netd/libnetdbpf/
H A DBpfNetworkStats.cpp48 const BpfMap<uint32_t, StatsValue>& appUidStatsMap) { in bpfGetUidStatsInternal()
72 const BpfMap<uint32_t, StatsValue>& ifaceStatsMap, in bpfGetIfaceStatsInternal()
73 const BpfMap<uint32_t, IfaceValue>& ifaceNameMap) { in bpfGetIfaceStatsInternal()
80 const BpfMap<uint32_t, StatsValue>& ifaceStatsMap) -> Result<void> { in bpfGetIfaceStatsInternal()
135 int limitUid, const BpfMap<StatsKey, StatsValue>& statsMap, in parseBpfNetworkStatsDetailInternal()
136 const BpfMap<uint32_t, IfaceValue>& ifaceMap) { in parseBpfNetworkStatsDetailInternal()
141 const BpfMap<StatsKey, StatsValue>& statsMap) -> Result<void> { in parseBpfNetworkStatsDetailInternal()
209 BpfMap<StatsKey, StatsValue> statsMap(statsMapPath); in parseBpfNetworkStatsDetail()
235 const BpfMap<uint32_t, StatsValue>& statsMap, in parseBpfNetworkStatsDevInternal()
236 const BpfMap<uint32_t, IfaceValue>& ifaceMap) { in parseBpfNetworkStatsDevInternal()
[all …]
H A DBpfNetworkStatsTest.cpp74 BpfMap<uint64_t, UidTagValue> mFakeCookieTagMap;
75 BpfMap<uint32_t, StatsValue> mFakeAppUidStatsMap;
76 BpfMap<StatsKey, StatsValue> mFakeStatsMap;
77 BpfMap<uint32_t, IfaceValue> mFakeIfaceIndexNameMap;
78 BpfMap<uint32_t, StatsValue> mFakeIfaceStatsMap;
83 mFakeCookieTagMap = BpfMap<uint64_t, UidTagValue>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, 0); in SetUp()
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()
92 mFakeIfaceIndexNameMap = BpfMap<uint32_t, IfaceValue>(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()
[all …]
/aosp12/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
H A DBpfCoordinator.java308 return new BpfMap<>(TETHER_DOWNSTREAM4_MAP_PATH, in getBpfDownstream4Map()
309 BpfMap.BPF_F_RDWR, Tether4Key.class, Tether4Value.class); in getBpfDownstream4Map()
320 return new BpfMap<>(TETHER_UPSTREAM4_MAP_PATH, in getBpfUpstream4Map()
321 BpfMap.BPF_F_RDWR, Tether4Key.class, Tether4Value.class); in getBpfUpstream4Map()
332 return new BpfMap<>(TETHER_DOWNSTREAM6_FS_PATH, in getBpfDownstream6Map()
344 return new BpfMap<>(TETHER_UPSTREAM6_FS_PATH, BpfMap.BPF_F_RDWR, in getBpfUpstream6Map()
356 return new BpfMap<>(TETHER_STATS_MAP_PATH, in getBpfStatsMap()
368 return new BpfMap<>(TETHER_LIMIT_MAP_PATH, in getBpfLimitMap()
380 return new BpfMap<>(TETHER_DEV_MAP_PATH, in getBpfDevMap()
1135 try (BpfMap<U32Struct, U32Struct> map = new BpfMap<>(TETHER_ERROR_MAP_PATH, in dumpCounters()
[all …]
H A DBpfMap.java43 public class BpfMap<K extends Struct, V extends Struct> implements AutoCloseable { class
74 public BpfMap(@NonNull final String path, final int flag, final Class<K> key, in BpfMap() method in BpfMap
91 protected BpfMap(final Class<K> key, final Class<V> value) { in BpfMap() method in BpfMap
/aosp12/system/netd/tests/
H A Dbpf_base_test.cpp88 BpfMap<uint64_t, UidTagValue> cookieTagMap(COOKIE_TAG_MAP_PATH); in TEST_F()
106 BpfMap<uint64_t, UidTagValue> cookieTagMap(COOKIE_TAG_MAP_PATH); in TEST_F()
131 BpfMap<uint32_t, uint8_t> uidCounterSetMap(UID_COUNTERSET_MAP_PATH); in TEST_F()
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()
H A Dnetlink_listener_test.cpp67 BpfMap<uint64_t, UidTagValue> mCookieTagMap;
76 BpfMap<uint64_t, UidTagValue>& map) { in TearDown()
93 const BpfMap<uint64_t, UidTagValue>&) -> Result<void> { in checkNoGarbageTagsExist()
/aosp12/packages/modules/Connectivity/Tethering/apishim/31/com/android/networkstack/tethering/apishim/api31/
H A DBpfCoordinatorShimImpl.java34 import com.android.networkstack.tethering.BpfMap;
69 private final BpfMap<Tether4Key, Tether4Value> mBpfDownstream4Map;
73 private final BpfMap<Tether4Key, Tether4Value> mBpfUpstream4Map;
77 private final BpfMap<TetherDownstream6Key, Tether6Value> mBpfDownstream6Map;
81 private final BpfMap<TetherUpstream6Key, Tether6Value> mBpfUpstream6Map;
85 private final BpfMap<TetherStatsKey, TetherStatsValue> mBpfStatsMap;
89 private final BpfMap<TetherLimitKey, TetherLimitValue> mBpfLimitMap;
93 private final BpfMap<TetherDevKey, TetherDevValue> mBpfDevMap;
485 private String mapStatus(BpfMap m, String name) { in mapStatus()
/aosp12/frameworks/native/services/gpuservice/gpumem/include/gpumem/
H A DGpuMem.h47 void setGpuMemTotalMap(bpf::BpfMap<uint64_t, uint64_t>& map);
52 android::bpf::BpfMap<uint64_t, uint64_t> mGpuMemTotalMap;
/aosp12/system/netd/tests/benchmarks/
H A Dbpf_benchmark.cpp28 using android::bpf::BpfMap;
33 BpfMap<uint32_t, uint32_t> mBpfTestMap;
/aosp12/packages/modules/Connectivity/Tethering/tests/unit/src/android/net/ip/
H A DIpServerTest.java105 import com.android.networkstack.tethering.BpfMap;
185 @Mock private BpfMap<Tether4Key, Tether4Value> mBpfDownstream4Map;
186 @Mock private BpfMap<Tether4Key, Tether4Value> mBpfUpstream4Map;
187 @Mock private BpfMap<TetherDownstream6Key, Tether6Value> mBpfDownstream6Map;
188 @Mock private BpfMap<TetherUpstream6Key, Tether6Value> mBpfUpstream6Map;
189 @Mock private BpfMap<TetherStatsKey, TetherStatsValue> mBpfStatsMap;
190 @Mock private BpfMap<TetherLimitKey, TetherLimitValue> mBpfLimitMap;
191 @Mock private BpfMap<TetherDevKey, TetherDevValue> mBpfDevMap;
317 public BpfMap<Tether4Key, Tether4Value> getBpfDownstream4Map() { in setUp()
322 public BpfMap<Tether4Key, Tether4Value> getBpfUpstream4Map() { in setUp()
[all …]
/aosp12/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
H A DBpfCoordinatorTest.java160 private class TestBpfMap<K extends Struct, V extends Struct> extends BpfMap<K, V> {
216 @Mock private BpfMap<Tether4Key, Tether4Value> mBpfDownstream4Map;
217 @Mock private BpfMap<Tether4Key, Tether4Value> mBpfUpstream4Map;
218 @Mock private BpfMap<TetherDownstream6Key, Tether6Value> mBpfDownstream6Map;
219 @Mock private BpfMap<TetherUpstream6Key, Tether6Value> mBpfUpstream6Map;
220 @Mock private BpfMap<TetherDevKey, TetherDevValue> mBpfDevMap;
275 public BpfMap<Tether4Key, Tether4Value> getBpfDownstream4Map() {
280 public BpfMap<Tether4Key, Tether4Value> getBpfUpstream4Map() {
295 public BpfMap<TetherStatsKey, TetherStatsValue> getBpfStatsMap() {
300 public BpfMap<TetherLimitKey, TetherLimitValue> getBpfLimitMap() {
[all …]
/aosp12/frameworks/native/services/gpuservice/tests/unittests/
H A DGpuMemTest.cpp68 mTestMap = bpf::BpfMap<uint64_t, uint64_t>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, in SetUp()
85 bpf::BpfMap<uint64_t, uint64_t> mTestMap;
H A DGpuMemTracerTest.cpp67 mTestMap = bpf::BpfMap<uint64_t, uint64_t>(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, in SetUp()
96 bpf::BpfMap<uint64_t, uint64_t> mTestMap;
H A DTestableGpuMem.h31 void setGpuMemTotalMap(bpf::BpfMap<uint64_t, uint64_t>& map) { in setGpuMemTotalMap()
/aosp12/packages/modules/Connectivity/Tethering/
H A Dproguard.flags7 -keep class com.android.networkstack.tethering.BpfMap {

12