Skip to content
Snippets Groups Projects
Commit fb8e40ea authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

TetherStatsKey.java - replace U32 ifindex with S32


These are allocated in order by the kernel, if we go
over 2 billion, we've got other problems... besides
U32 to S32 conversion will work just fine anyway.

Bug: 245472520
Test: TreeHugger
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I964036469fe7e0cfa77d9b062bfdbf5d2ae99bf2
parent 49e9660e
No related branches found
No related tags found
No related merge requests found
......@@ -22,10 +22,10 @@ import com.android.net.module.util.Struct.Type;
/** The key of BpfMap which is used for tethering stats. */
public class TetherStatsKey extends Struct {
@Field(order = 0, type = Type.U32)
public final long ifindex; // upstream interface index
@Field(order = 0, type = Type.S32)
public final int ifindex; // upstream interface index
public TetherStatsKey(final long ifindex) {
public TetherStatsKey(final int ifindex) {
this.ifindex = ifindex;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment