Lines Matching refs:ifIndex

1036         statsList.push_back({.ifIndex = static_cast<int>(key),  in getTetherOffloadStats()
1054 Result<void> TetherController::setBpfLimit(uint32_t ifIndex, uint64_t limit) { in setBpfLimit() argument
1059 auto statsEntry = mBpfStatsMap.readValue(ifIndex); in setBpfLimit()
1069 auto ret = mBpfStatsMap.writeValue(ifIndex, stats, BPF_NOEXIST); in setBpfLimit()
1087 auto ret = mBpfLimitMap.writeValue(ifIndex, newLimit, BPF_ANY); in setBpfLimit()
1100 int ifIndex = if_nametoindex(extIface); in maybeStartBpf() local
1101 if (!ifIndex) { in maybeStartBpf()
1108 ALOGE("isEthernet(%s[%d]) failure: %s", extIface, ifIndex, in maybeStartBpf()
1120 rv = tcFilterAddDevIngressTether(ifIndex, tetherProgFd, isEthernet.value()); in maybeStartBpf()
1122 ALOGE("tcFilterAddDevIngressTether(%d[%s], %d) failure: %s", ifIndex, extIface, in maybeStartBpf()
1132 int ifIndex = if_nametoindex(extIface); in maybeStopBpf() local
1133 if (!ifIndex) { in maybeStopBpf()
1138 int rv = tcFilterDelDevIngressTether(ifIndex); in maybeStopBpf()
1140 ALOGE("tcFilterDelDevIngressTether(%d[%s]) failure: %s", ifIndex, extIface, strerror(-rv)); in maybeStopBpf()
1144 int TetherController::setTetherOffloadInterfaceQuota(int ifIndex, int64_t maxBytes) { in setTetherOffloadInterfaceQuota() argument
1147 if (ifIndex <= 0) return -ENODEV; in setTetherOffloadInterfaceQuota()
1155 const auto res = setBpfLimit(static_cast<uint32_t>(ifIndex), static_cast<uint64_t>(maxBytes)); in setTetherOffloadInterfaceQuota()
1157 ALOGE("Fail to set quota %" PRId64 " for interface index %d: %s", maxBytes, ifIndex, in setTetherOffloadInterfaceQuota()
1166 int ifIndex) { in getAndClearTetherOffloadStats() argument
1169 if (ifIndex <= 0) { in getAndClearTetherOffloadStats()
1170 return Error(ENODEV) << "Invalid interface " << ifIndex; in getAndClearTetherOffloadStats()
1183 const auto stats = mBpfStatsMap.readValue(ifIndex); in getAndClearTetherOffloadStats()
1185 return Error(stats.error().code()) << "Fail to get stats for interface index " << ifIndex; in getAndClearTetherOffloadStats()
1188 auto res = mBpfStatsMap.deleteValue(ifIndex); in getAndClearTetherOffloadStats()
1190 return Error(res.error().code()) << "Fail to delete stats for interface index " << ifIndex; in getAndClearTetherOffloadStats()
1193 res = mBpfLimitMap.deleteValue(ifIndex); in getAndClearTetherOffloadStats()
1195 return Error(res.error().code()) << "Fail to delete limit for interface index " << ifIndex; in getAndClearTetherOffloadStats()
1198 return TetherOffloadStats{.ifIndex = static_cast<int>(ifIndex), in getAndClearTetherOffloadStats()