Skip to content

Commit 3414adb

Browse files
Sebastian Andrzej Siewiorkuba-moo
authored andcommitted
lwt: Don't disable migration prio invoking BPF.
There is no need to explicitly disable migration if bottom halves are also disabled. Disabling BH implies disabling migration. Remove migrate_disable() and rely solely on disabling BH to remain on the same CPU. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b22800f commit 3414adb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/core/lwt_bpf.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ static int run_lwt_bpf(struct sk_buff *skb, struct bpf_lwt_prog *lwt,
4040
{
4141
int ret;
4242

43-
/* Migration disable and BH disable are needed to protect per-cpu
44-
* redirect_info between BPF prog and skb_do_redirect().
43+
/* Disabling BH is needed to protect per-CPU bpf_redirect_info between
44+
* BPF prog and skb_do_redirect().
4545
*/
46-
migrate_disable();
4746
local_bh_disable();
4847
bpf_compute_data_pointers(skb);
4948
ret = bpf_prog_run_save_cb(lwt->prog, skb);
@@ -78,7 +77,6 @@ static int run_lwt_bpf(struct sk_buff *skb, struct bpf_lwt_prog *lwt,
7877
}
7978

8079
local_bh_enable();
81-
migrate_enable();
8280

8381
return ret;
8482
}

0 commit comments

Comments
 (0)