Move current StatsMap dump to BpfNetMaps

Information in the dump does not change
....
current statsMap configuration: 0 SELECT_MAP_A
....

Bug: 217624062
Test: dumpsys connectivity trafficcontroller, atest BpfNetMapsTest
Change-Id: I42a844227f258b91ba5b368d8e8abf82a773a801
This commit is contained in:
Motomu Utsumi
2022-09-02 18:15:25 +09:00
parent 956d86ccdf
commit c675d6fc01
4 changed files with 29 additions and 24 deletions

View File

@@ -677,26 +677,6 @@ void TrafficController::dump(int fd, bool verbose) {
dw.println("mConfigurationMap read ownerMatch configure failed with error: %s",
configuration.error().message().c_str());
}
key = CURRENT_STATS_MAP_CONFIGURATION_KEY;
configuration = mConfigurationMap.readValue(key);
if (configuration.ok()) {
const char* statsMapDescription = "???";
switch (configuration.value()) {
case SELECT_MAP_A:
statsMapDescription = "SELECT_MAP_A";
break;
case SELECT_MAP_B:
statsMapDescription = "SELECT_MAP_B";
break;
// No default clause, so if we ever add a third map, this code will fail to build.
}
dw.println("current statsMap configuration: %d %s", configuration.value(),
statsMapDescription);
} else {
dw.println("mConfigurationMap read stats map configure failed with error: %s",
configuration.error().message().c_str());
}
}
} // namespace net