Remove duplicated bpf offload support check in IpServer
In current code, IpServer will ensure bpf offload is supported before calling BpfCoordinator's APIs. But those APIs already have the same checks inside the function. This CL removed duplicated checks in IpServer. After this change, the BPF offload support status is only determined inside BpfCoordinator and it won't change during the life cycle of Tethering. Tethering initializes mBpfCoordinator just once in the constructor. After that point, the value of isUsingBpf can never change, because mIsBpfEnabled is final and mBpfCoordinatorShim.isInitialized() is either always true (api30) or can either never change (api31). Also fixed a bug in IpServerTest upon this change. Test: atest TetheringTests Bug: 261923493 Change-Id: I50f231a83bf678b90eae4fd9bfa6035e86978bb3
Loading
Please register or sign in to comment