DscpPolicy Move to kernel 5.15
Require at least kernel 5.15. Feature is not required on older kernels and may impact boot time unnecessarily. Bug: 235559605 Change-Id: I2e4b509de1d8940fc63ae057a8326f13c0fd1420
This commit is contained in:
@@ -297,7 +297,7 @@ static inline __always_inline void match_policy(struct __sk_buff* skb, bool ipv4
|
||||
}
|
||||
|
||||
DEFINE_BPF_PROG_KVER("schedcls/set_dscp_ether", AID_ROOT, AID_SYSTEM,
|
||||
schedcls_set_dscp_ether, KVER(5, 4, 0))
|
||||
schedcls_set_dscp_ether, KVER(5, 15, 0))
|
||||
(struct __sk_buff* skb) {
|
||||
|
||||
if (skb->pkt_type != PACKET_HOST) return TC_ACT_PIPE;
|
||||
@@ -313,7 +313,7 @@ DEFINE_BPF_PROG_KVER("schedcls/set_dscp_ether", AID_ROOT, AID_SYSTEM,
|
||||
}
|
||||
|
||||
DEFINE_BPF_PROG_KVER("schedcls/set_dscp_raw_ip", AID_ROOT, AID_SYSTEM,
|
||||
schedcls_set_dscp_raw_ip, KVER(5, 4, 0))
|
||||
schedcls_set_dscp_raw_ip, KVER(5, 15, 0))
|
||||
(struct __sk_buff* skb) {
|
||||
if (skb->protocol == htons(ETH_P_IP)) {
|
||||
match_policy(skb, true, false);
|
||||
|
||||
@@ -136,8 +136,8 @@ class DscpPolicyTest {
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
// For BPF support kernel needs to be at least 5.4.
|
||||
assumeTrue(kernelIsAtLeast(5, 4))
|
||||
// For BPF support kernel needs to be at least 5.15.
|
||||
assumeTrue(kernelIsAtLeast(5, 15))
|
||||
|
||||
runAsShell(MANAGE_TEST_NETWORKS) {
|
||||
val tnm = realContext.getSystemService(TestNetworkManager::class.java)
|
||||
@@ -158,7 +158,7 @@ class DscpPolicyTest {
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
if (!kernelIsAtLeast(5, 4)) {
|
||||
if (!kernelIsAtLeast(5, 15)) {
|
||||
return;
|
||||
}
|
||||
agentsToCleanUp.forEach { it.unregister() }
|
||||
|
||||
Reference in New Issue
Block a user