use a second map for SingleWriterBpfMap test am: 45e9372733
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3134196 Change-Id: I1eb68c5ae1c49b4bc9832515df169e96c74dd4a7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
db5021c1a6
3 changed files with 6 additions and 1 deletions
|
|
@ -69,6 +69,8 @@ public final class BpfMapTest {
|
|||
private static final int TEST_MAP_SIZE = 16;
|
||||
private static final String TETHER_DOWNSTREAM6_FS_PATH =
|
||||
"/sys/fs/bpf/tethering/map_test_tether_downstream6_map";
|
||||
private static final String TETHER2_DOWNSTREAM6_FS_PATH =
|
||||
"/sys/fs/bpf/tethering/map_test_tether2_downstream6_map";
|
||||
|
||||
private ArrayMap<TetherDownstream6Key, Tether6Value> mTestData;
|
||||
|
||||
|
|
@ -108,7 +110,7 @@ public final class BpfMapTest {
|
|||
|
||||
private BpfMap<TetherDownstream6Key, Tether6Value> openTestMap() throws Exception {
|
||||
return mShouldTestSingleWriterMap
|
||||
? new SingleWriterBpfMap<>(TETHER_DOWNSTREAM6_FS_PATH, TetherDownstream6Key.class,
|
||||
? new SingleWriterBpfMap<>(TETHER2_DOWNSTREAM6_FS_PATH, TetherDownstream6Key.class,
|
||||
Tether6Value.class)
|
||||
: new BpfMap<>(TETHER_DOWNSTREAM6_FS_PATH, TetherDownstream6Key.class,
|
||||
Tether6Value.class);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@
|
|||
// Used only by TetheringPrivilegedTests, not by production code.
|
||||
DEFINE_BPF_MAP_GRW(tether_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,
|
||||
TETHERING_GID)
|
||||
DEFINE_BPF_MAP_GRW(tether2_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,
|
||||
TETHERING_GID)
|
||||
// Used only by BpfBitmapTest, not by production code.
|
||||
DEFINE_BPF_MAP_GRW(bitmap, ARRAY, int, uint64_t, 2, TETHERING_GID)
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ static const set<string> MAINLINE_FOR_S_PLUS = {
|
|||
TETHERING "map_offload_tether_upstream6_map",
|
||||
TETHERING "map_test_bitmap",
|
||||
TETHERING "map_test_tether_downstream6_map",
|
||||
TETHERING "map_test_tether2_downstream6_map",
|
||||
TETHERING "prog_offload_schedcls_tether_downstream4_ether",
|
||||
TETHERING "prog_offload_schedcls_tether_downstream4_rawip",
|
||||
TETHERING "prog_offload_schedcls_tether_downstream6_ether",
|
||||
|
|
|
|||
Loading…
Reference in a new issue