eliminate unused tcp{Rx,Tx}Packets
(next step is to replace use of Stats struct with identical (except field order) StatsValue struct) Test: TreeHugger Bug: 294604315 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I9be3c411f9592bf4edc75386b1c5b386ebeb5905
This commit is contained in:
parent
9cc1d765ab
commit
15b63b308e
3 changed files with 2 additions and 8 deletions
|
|
@ -65,8 +65,6 @@ typedef struct {
|
|||
uint64_t rxPackets;
|
||||
uint64_t txBytes;
|
||||
uint64_t txPackets;
|
||||
uint64_t tcpRxPackets;
|
||||
uint64_t tcpTxPackets;
|
||||
} Stats;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ enum StatsType {
|
|||
RX_PACKETS = 1,
|
||||
TX_BYTES = 2,
|
||||
TX_PACKETS = 3,
|
||||
TCP_RX_PACKETS = 4,
|
||||
TCP_TX_PACKETS = 5
|
||||
TCP_RX_PACKETS = 4, // not supported, always returns UNKNOWN (-1)
|
||||
TCP_TX_PACKETS = 5, // not supported, always returns UNKNOWN (-1)
|
||||
};
|
||||
|
||||
static uint64_t getStatsType(Stats* stats, StatsType type) {
|
||||
|
|
@ -62,9 +62,7 @@ static uint64_t getStatsType(Stats* stats, StatsType type) {
|
|||
case TX_PACKETS:
|
||||
return stats->txPackets;
|
||||
case TCP_RX_PACKETS:
|
||||
return stats->tcpRxPackets;
|
||||
case TCP_TX_PACKETS:
|
||||
return stats->tcpTxPackets;
|
||||
default:
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@ void InitStats(Stats* stats) {
|
|||
stats->rxPackets = 0;
|
||||
stats->txBytes = 0;
|
||||
stats->txPackets = 0;
|
||||
stats->tcpRxPackets = -1;
|
||||
stats->tcpTxPackets = -1;
|
||||
}
|
||||
|
||||
int bpfGetUidStatsInternal(uid_t uid, Stats* stats,
|
||||
|
|
|
|||
Loading…
Reference in a new issue