Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: pktgen: Use kthread_create_on_cpu()

Use the proper API instead of open coding it.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://patch.msgid.link/20241208234955.31910-1-frederic@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Frederic Weisbecker and committed by
Jakub Kicinski
33035977 46afe345

+2 -5
+2 -5
net/core/pktgen.c
··· 3883 3883 list_add_tail(&t->th_list, &pn->pktgen_threads); 3884 3884 init_completion(&t->start_done); 3885 3885 3886 - p = kthread_create_on_node(pktgen_thread_worker, 3887 - t, 3888 - cpu_to_node(cpu), 3889 - "kpktgend_%d", cpu); 3886 + p = kthread_create_on_cpu(pktgen_thread_worker, t, cpu, "kpktgend_%d"); 3890 3887 if (IS_ERR(p)) { 3891 3888 pr_err("kthread_create_on_node() failed for cpu %d\n", t->cpu); 3892 3889 list_del(&t->th_list); 3893 3890 kfree(t); 3894 3891 return PTR_ERR(p); 3895 3892 } 3896 - kthread_bind(p, cpu); 3893 + 3897 3894 t->tsk = p; 3898 3895 3899 3896 pe = proc_create_data(t->tsk->comm, 0600, pn->proc_dir,