Skip to contentSkip to conversation

bpf: netdev: init the offload table earlier

PATCH In review Jakub Kicinski 2 participants 2 messages May 5, 2023 BPF

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: netdev: init the offload table earlier

Some netdevices may get unregistered before late_initcall(), we have to move the hashtable init earlier.

Fixes f1fc43d03946 ("bpf: Move offload initialization into late_initcall")

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 kernel/bpf/offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/offload.c +1 -1
index d9c9f45e3529..8a26cd8814c1 100644
@@ -859,4 +859,4 @@ static int __init bpf_offload_init(void)
 	return rhashtable_init(&offdevs, &offdevs_params);
 }
 
-late_initcall(bpf_offload_init);
+core_initcall(bpf_offload_init);
Signature · 1 line
2.40.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jakub Kicinski

Some netdevices may get unregistered before late_initcall(), we have to move the hashtable init earlier.

Fixes f1fc43d03946 ("bpf: Move offload initialization into late_initcall")

Make sense, thank you!

Quoted 30 lines

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 kernel/bpf/offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/offload.c +1 -2
index d9c9f45e3529..8a26cd8814c1 100644
@@ -859,4 +859,4 @@ static int __init bpf_offload_init(void)
        return rhashtable_init(&offdevs, &offdevs_params);
 }
 
-late_initcall(bpf_offload_init);
+core_initcall(bpf_offload_init);
--

2.40.1