From nobody Fri Nov 29 00:35:30 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6786C1B1D7B for ; Thu, 26 Sep 2024 22:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727390978; cv=none; b=Wnpb7cwdgN52ekrNqR7nBf9rTFpDbljzyLUye/OpbiANCm/60/huM14NwBGdGsLGo21JyEnziF/qI4Y+A5JXcs3QOrTY1xtnFbjxsu23yX3vS9OmFYGvdzemo1d7ASFjPsruZes7QDBfFIgU8STO31czrOIFCLIDhiQVB/nyk6k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727390978; c=relaxed/simple; bh=gUr/DwSlgazKo3bDvjslR9a806r1mqijOu77KKoOn+4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aiUogZ3LpGy9S1upQqG7ydKe1dD/p29fX4EUuGu+feduV0vGEmoMB9ikeeCknwNqaF9QAzry5+3ZXU3JI/bVjAMeZ4tcwGrEkTwewV6OB3edzSsEO8SfD3hTkO1ULs3naHckD/ndEoTSqTRGJ5BMh1gwai15gVxJLZfhfPEAYXw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PI0uI4kM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PI0uI4kM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76B1FC4CEC5; Thu, 26 Sep 2024 22:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727390978; bh=gUr/DwSlgazKo3bDvjslR9a806r1mqijOu77KKoOn+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PI0uI4kME+DTI8MIVSdNq38EBh3qQ9TTcYVDw0KXx3n4nL25xmce6HsrwNwdw9OCL aLgS5keF+hY4D96b7UQkcg/Rvsj/+9h9jei+GivK3vskF9Lf50mS66/C2xHHzhunAM uPdqkbLimEipNPnlVnNjtPrzXosDJBfl5t6JjvdJ24MKVGg0aiCZ0swPFfXUKAN5oS sutl4UKqQ6wOJNKxm6yibHyi4z1Pdamj38pO5+HNORfjnYBJtzJqgOcmbu6lCr7iDC /dOCEiiQDQ/F+AFgGgpq1ZLG1bmSSW17sZt8wmESR1J5lHAPpNJ/gwrAaQmQlawUlY UunnRHaSsfqow== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Morton , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 10/20] net: pktgen: Use kthread_create_on_node() Date: Fri, 27 Sep 2024 00:48:58 +0200 Message-ID: <20240926224910.11106-11-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240926224910.11106-1-frederic@kernel.org> References: <20240926224910.11106-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the proper API instead of open coding it. Signed-off-by: Frederic Weisbecker Reviewed-by: Eric Dumazet --- net/core/pktgen.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 34f68ef74b8f..7fcb4fc7a5d6 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3883,17 +3883,14 @@ static int __net_init pktgen_create_thread(int cpu,= struct pktgen_net *pn) list_add_tail(&t->th_list, &pn->pktgen_threads); init_completion(&t->start_done); =20 - p =3D kthread_create_on_node(pktgen_thread_worker, - t, - cpu_to_node(cpu), - "kpktgend_%d", cpu); + p =3D kthread_create_on_cpu(pktgen_thread_worker, t, cpu, "kpktgend_%d"); if (IS_ERR(p)) { pr_err("kthread_create_on_node() failed for cpu %d\n", t->cpu); list_del(&t->th_list); kfree(t); return PTR_ERR(p); } - kthread_bind(p, cpu); + t->tsk =3D p; =20 pe =3D proc_create_data(t->tsk->comm, 0600, pn->proc_dir, --=20 2.46.0