patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Vipin Varghese <vipin.varghese@amd.com>
To: <kevin.laatz@intel.com>, <bruce.richardson@intel.com>,
	<thomas@monjalon.net>, <dev@dpdk.org>
Cc: <roretzla@linux.microsoft.com>, <Ferruh.Yigit@amd.com>,
	<stable@dpdk.org>
Subject: [PATCH] dma/skeleton: fix pthread set affinity
Date: Sat, 12 Aug 2023 07:27:38 +0530	[thread overview]
Message-ID: <20230812015738.1024-1-vipin.varghese@amd.com> (raw)

In skeleton dma driver, the user can pin the dma thread to desired
cpu core. The previous commit changed the api from set-affinity to
get-affinity leading to thread to be pinned to first available lcore.

Bugzilla ID: 1270
Fixes: 7fdf30d8b259 ("eal/windows: remove most pthread lifetime shim functions")
Cc: roretzla@linux.microsoft.com

Cc: stable@dpdk.org

Signed-off-by: Vipin Varghese <vipin.varghese@amd.com>
---
---
 drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c
index c2d776dbbd..c508e4f1c4 100644
--- a/drivers/dma/skeleton/skeleton_dmadev.c
+++ b/drivers/dma/skeleton/skeleton_dmadev.c
@@ -137,7 +137,7 @@ skeldma_start(struct rte_dma_dev *dev)
 
 	if (hw->lcore_id != -1) {
 		cpuset = rte_lcore_cpuset(hw->lcore_id);
-		ret = rte_thread_get_affinity_by_id(hw->thread, &cpuset);
+		ret = rte_thread_set_affinity_by_id(hw->thread, &cpuset);
 		if (ret)
 			SKELDMA_LOG(WARNING,
 				"Set thread affinity lcore = %d fail!",
-- 
2.34.1


             reply	other threads:[~2023-08-12  1:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12  1:57 Vipin Varghese [this message]
2023-08-14 16:24 ` Tyler Retzlaff
2023-08-15 12:21   ` David Marchand
2023-10-17  8:59     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230812015738.1024-1-vipin.varghese@amd.com \
    --to=vipin.varghese@amd.com \
    --cc=Ferruh.Yigit@amd.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).