Remove the deleted stats from map

The xt_qtaguid module removes per uid stats when an app get uninstalled.
So eBPF map should not store the uninstalled stats either. This change
help fix the unknown iface problem as well.

Bug: 77987430
Test: android.app.usage.cts.NetworkUsageStatsTest
Change-Id: Ieb08833ecc35f76d27769042f197d889470faf7f
diff --git a/libbpf/BpfNetworkStats.cpp b/libbpf/BpfNetworkStats.cpp
index 22a1e79..bc9a932 100644
--- a/libbpf/BpfNetworkStats.cpp
+++ b/libbpf/BpfNetworkStats.cpp
@@ -48,7 +48,7 @@
     struct StatsValue dummyValue;
     auto processUidStats = [uid, stats](void *key, const base::unique_fd& map_fd) {
         if (((StatsKey *) key)->uid != uid) {
-            return 0;
+            return BPF_CONTINUE;
         }
         StatsValue statsEntry;
         int ret = bpf::findMapEntry(map_fd, key, &statsEntry);
@@ -57,7 +57,7 @@
         stats->txPackets += statsEntry.txPackets;
         stats->rxBytes += statsEntry.rxBytes;
         stats->txBytes += statsEntry.txBytes;
-        return 0;
+        return BPF_CONTINUE;
     };
     return bpfIterateMap(nonExistentKey, dummyValue, map_fd, processUidStats);
 }
@@ -86,7 +86,7 @@
         int ifIndex = *(int *)key;
         if (getIfaceNameFromMap(ifaceNameMapFd, ifaceStatsMapFd, ifIndex, ifname, &ifIndex,
                                 &unknownIfaceBytesTotal)) {
-            return 0;
+            return BPF_CONTINUE;
         }
         if (!iface || !strcmp(iface, ifname)) {
             StatsValue statsEntry;
@@ -97,7 +97,7 @@
             stats->rxBytes += statsEntry.rxBytes;
             stats->txBytes += statsEntry.txBytes;
         }
-        return 0;
+        return BPF_CONTINUE;
     };
     return bpfIterateMap(nonExistentKey, dummyValue, ifaceStatsMapFd, processIfaceStats);
 }
@@ -179,24 +179,24 @@
         char ifname[IFNAMSIZ];
         if (getIfaceNameFromMap(ifaceMapFd, statsMapFd, curKey.ifaceIndex, ifname, &curKey,
                                 &unknownIfaceBytesTotal)) {
-            return 0;
+            return BPF_CONTINUE;
         }
         std::string ifnameStr(ifname);
         if (limitIfaces.size() > 0 &&
             std::find(limitIfaces.begin(), limitIfaces.end(), ifnameStr) == limitIfaces.end()) {
             // Nothing matched; skip this line.
-            return 0;
+            return BPF_CONTINUE;
         }
         if (limitTag != TAG_ALL && uint32_t(limitTag) != curKey.tag) {
-            return 0;
+            return BPF_CONTINUE;
         }
         if (limitUid != UID_ALL && uint32_t(limitUid) != curKey.uid) {
-            return 0;
+            return BPF_CONTINUE;
         }
         StatsValue statsEntry;
         if (bpf::findMapEntry(statsMapFd, &curKey, &statsEntry) < 0) return -errno;
         lines->push_back(populateStatsEntry(curKey, statsEntry, ifname));
-        return 0;
+        return BPF_CONTINUE;
     };
     return bpfIterateMap(nonExistentKey, dummyValue, statsMapFd, processDetailUidStats);
 }