From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 020C443039; Sat, 12 Aug 2023 03:58:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D36034325A; Sat, 12 Aug 2023 03:58:09 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2084.outbound.protection.outlook.com [40.107.220.84]) by mails.dpdk.org (Postfix) with ESMTP id 4DD63400EF; Sat, 12 Aug 2023 03:58:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZSE+lvH6Rj/eJGeshbCfPNMZ5jS4b++BmiGpzvPhWEdol1pfghcfwqD9K0TzwAdelykaaEeidzinDyLScFySzYEXT8ehbQsN4nePZ3TZEvwXJH4AihKyoio1d/qnt4csXWzTsa8EdyZ3k8W8cU4X3mpSdlF54gMws8g65U1oUxAGwlmvcRmR6gfe61OEwHeDOWx70TQbakiaRopX5+ORoaDO2oQVNfLUWrnajllIhONdqmnKaigq7xHrr9+SHVeFSLyy4KJotPItUNTpYSqKLedrXbgFuE9C9bljC4uR75fGOkuUcT36AXhnfxiAdr7pz5CyiBWxcCK+P9N0XDI/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=17hpySywJ9NqtKPJW5C72jksVeDdIoNPUWZL9HfHPZU=; b=SRFTMgCYmd0ndEp8aYEMuhP47IAXusAcRBG12p6PtizGQPfJd4YJL8O708heCCzwfEXqI26e5Agc9g+F7JFNaFgFDZt50YDd8fWAJvh03uosY6tyL+JWgqKyMzzqwYojBqbB1boZiNwlh9e67WgDBxvnyyACrLZ13G1MGCVrl2Kl4+ExSlijJw1e7Bb+TBi6CssVwxBQWSgds0bBn7vRCxRHEE3OASFKuo78v06wfXMlz3ye5hPx8AQiPNeh4ITrmiqVfz5yfUuHC1kBBmGQLDkiTP7jzvxDby9Owl8l7SAwL25LfanMWmIs4sYZ+Qu6u4Zk3U9z4ilpcuqFx/Ni6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=17hpySywJ9NqtKPJW5C72jksVeDdIoNPUWZL9HfHPZU=; b=NN1a5MlstCwgGyrO6JyzvYlpuTd4v9Mf3iT9godJBtCMBU5wc+Qdk6snazSkrx9+ELoFAjfaXDpD3u4QTIyxBkrIh6dhMAr36zUqZADEjq0qCU4N/cLmCduq++pfN24w1yNh5//VDqZvPIznGIEfrD0/aYjZsummAbnWvGeSWI0= Received: from CH0PR07CA0026.namprd07.prod.outlook.com (2603:10b6:610:32::31) by DM3PR12MB9350.namprd12.prod.outlook.com (2603:10b6:8:1ae::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.20; Sat, 12 Aug 2023 01:58:04 +0000 Received: from CO1PEPF000042A7.namprd03.prod.outlook.com (2603:10b6:610:32:cafe::8e) by CH0PR07CA0026.outlook.office365.com (2603:10b6:610:32::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.31 via Frontend Transport; Sat, 12 Aug 2023 01:58:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000042A7.mail.protection.outlook.com (10.167.243.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6652.20 via Frontend Transport; Sat, 12 Aug 2023 01:58:03 +0000 Received: from BLR-5CG134626B.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 11 Aug 2023 20:58:00 -0500 From: Vipin Varghese To: , , , CC: , , Subject: [PATCH] dma/skeleton: fix pthread set affinity Date: Sat, 12 Aug 2023 07:27:38 +0530 Message-ID: <20230812015738.1024-1-vipin.varghese@amd.com> X-Mailer: git-send-email 2.41.0.windows.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042A7:EE_|DM3PR12MB9350:EE_ X-MS-Office365-Filtering-Correlation-Id: 048975ec-73d4-4c0e-7902-08db9ad790b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /fmjbXMiSeiEn6HLJt9pBc2jS32iyjp5YfHY0aYX8luCDqSzY7wKchXWfJOsK/txjUBcQxjeSWQxAX7fvmd+rkJ7aKHmv0se3/vDux+OXVaQVxzepVZuWuRYVCRL/L6WDjUbKZQzXflgcRz1dLy7SHZKaPxRXW/TQ/OVAcAvcPxPI1qamql6itEAx1umq85aLVEd3c519tBJo8aCy38vR7S5dE7wlcjZwbHbaUwCoBVDRv8ySEQUH50bp51YW9SKg/lQaxh6w3L0wIRczhaJaZ4KtpkmCY+BYWDHBvuyaumI3EWMn36gX04t3VUdWEJ6IXC3PF1SpGDS2xV4JQ4VWsOnnbvOIonypJpc2A9rLpSFO91K1DaVrR7J1ayKD9kHhTfVFZ8FmTHJMrGx0efg6nw2O/qSvvHrxpv+l+/e9MLYS69iS2LNXLShyJ4peS05ypaAXUOLXHUJpIvCbb+Wu/0molt/y4S4bIw241nUVjP8TLj+2G4H84mV8fX1GwY1Mr0uNEoVcYHUOwzXnmK9+aZPEzPwPF8oBIjE5kd049VWRh0DjBRG6t+R+5XbYOadQ6exP6WBqLhdiAafXe52tGwZ8P1NYrF6g2fzJ2tuX7lj5i9iGxyifPwYHhiy+1KdFeIDeL7p5kRZdQLdL71TgBw8LWtdeQlAdGYQPwscEDmMjIFXLNBDczIfXoYQ+0vDgnIhb2m0eCChoMz4zyx2y+K0FZ0SLr1APP4d4B9/MSk0Im+92ffpyND2k7/szUnZnhjCiC3VfJQKyY7QSuUTOw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(346002)(376002)(136003)(396003)(82310400008)(1800799006)(451199021)(186006)(36840700001)(46966006)(40470700004)(40460700003)(426003)(336012)(1076003)(83380400001)(26005)(16526019)(2616005)(36860700001)(47076005)(41300700001)(5660300002)(316002)(54906003)(70206006)(70586007)(110136005)(2906002)(44832011)(8676002)(8936002)(4326008)(7696005)(478600001)(6666004)(40480700001)(82740400003)(81166007)(356005)(86362001)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2023 01:58:03.8371 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 048975ec-73d4-4c0e-7902-08db9ad790b9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042A7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9350 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- --- 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