OSDN Git Service

apf: Add counters for dropped / passed packets
authorBernie Innocenti <codewiz@google.com>
Mon, 23 Apr 2018 16:25:42 +0000 (01:25 +0900)
committerBernie Innocenti <codewiz@google.com>
Tue, 15 May 2018 05:21:54 +0000 (14:21 +0900)
commitab30db7072968016c1be0bb384385fd7235ae815
treea077e36b5b22abebbc386985ad05f8ca4678dbe3
parent40b43542c1845f80de07f0b2b391ad4bdaa82129
apf: Add counters for dropped / passed packets

ApfFilter maintains separate counters for each reason why a packet was
passed or dropped by the filter logic.

There's also a total which should match the individual counters,
*unless* the APF interpreter aborted execution early due to an illegal
instruction or an out-of-bounds access.

Test: both on APFv2 and APFv4-capable device:
runtest -x tests/net/java/android/net/ip/IpClientTest.java
runtest -x tests/net/java/android/net/apf/ApfTest.java
manual tests connected to an AP
Bug: 73804303
Change-Id: I54b17fcbb95dfaea5db975d282314ce73d79d6ec
Merged-In: I54b17fcbb95dfaea5db975d282314ce73d79d6ec
(cherry picked from commit 3cc40ea6c50c976dd4e6485574a8be899867f610)
services/net/java/android/net/apf/ApfCapabilities.java
services/net/java/android/net/apf/ApfFilter.java
services/net/java/android/net/apf/ApfGenerator.java
services/net/java/android/net/ip/IpClient.java