From: Sachin Saxena <sachin.saxena@nxp.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, Nipun Gupta <nipun.gupta@nxp.com>
Subject: [dpdk-dev] [PATCH v2 03/30] bus/dpaa: remove un-necessary thread affinity
Date: Thu, 29 Aug 2019 15:57:10 +0530 [thread overview]
Message-ID: <20190829102737.13267-4-sachin.saxena@nxp.com> (raw)
In-Reply-To: <20190829102737.13267-1-sachin.saxena@nxp.com>
From: Nipun Gupta <nipun.gupta@nxp.com>
Thread affinity is already taken care by DPDK. Remove them from bus.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/bus/dpaa/base/qbman/qman_driver.c | 56 ++---------------------
drivers/bus/dpaa/dpaa_bus.c | 13 ------
2 files changed, 3 insertions(+), 66 deletions(-)
diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index ba153396d..5c773669a 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
*
* Copyright 2008-2016 Freescale Semiconductor Inc.
- * Copyright 2017 NXP
+ * Copyright 2017,2019 NXP
*
*/
@@ -32,31 +32,9 @@ static __thread struct dpaa_ioctl_portal_map map = {
static int fsl_qman_portal_init(uint32_t index, int is_shared)
{
- cpu_set_t cpuset;
struct qman_portal *portal;
- int loop, ret;
struct dpaa_ioctl_irq_map irq_map;
-
- /* Verify the thread's cpu-affinity */
- ret = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t),
- &cpuset);
- if (ret) {
- error(0, ret, "pthread_getaffinity_np()");
- return ret;
- }
- qpcfg.cpu = -1;
- for (loop = 0; loop < CPU_SETSIZE; loop++)
- if (CPU_ISSET(loop, &cpuset)) {
- if (qpcfg.cpu != -1) {
- pr_err("Thread is not affine to 1 cpu\n");
- return -EINVAL;
- }
- qpcfg.cpu = loop;
- }
- if (qpcfg.cpu == -1) {
- pr_err("Bug in getaffinity handling!\n");
- return -EINVAL;
- }
+ int ret;
/* Allocate and map a qman portal */
map.index = index;
@@ -145,14 +123,11 @@ void qman_thread_irq(void)
struct qman_portal *fsl_qman_portal_create(void)
{
- cpu_set_t cpuset;
struct qman_portal *res;
-
struct qm_portal_config *q_pcfg;
- int loop, ret;
struct dpaa_ioctl_irq_map irq_map;
struct dpaa_ioctl_portal_map q_map = {0};
- int q_fd;
+ int q_fd, ret;
q_pcfg = kzalloc((sizeof(struct qm_portal_config)), 0);
if (!q_pcfg) {
@@ -160,31 +135,6 @@ struct qman_portal *fsl_qman_portal_create(void)
return NULL;
}
- /* Verify the thread's cpu-affinity */
- ret = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t),
- &cpuset);
- if (ret) {
- error(0, ret, "pthread_getaffinity_np()");
- kfree(q_pcfg);
- return NULL;
- }
-
- q_pcfg->cpu = -1;
- for (loop = 0; loop < CPU_SETSIZE; loop++)
- if (CPU_ISSET(loop, &cpuset)) {
- if (q_pcfg->cpu != -1) {
- pr_err("Thread is not affine to 1 cpu\n");
- kfree(q_pcfg);
- return NULL;
- }
- q_pcfg->cpu = loop;
- }
- if (q_pcfg->cpu == -1) {
- pr_err("Bug in getaffinity handling!\n");
- kfree(q_pcfg);
- return NULL;
- }
-
/* Allocate and map a qman portal */
q_map.type = dpaa_portal_qman;
q_map.index = QBMAN_ANY_PORTAL_IDX;
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index f7d1a5b63..b0e68c4a4 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -250,11 +250,9 @@ dpaa_clean_device_list(void)
int rte_dpaa_portal_init(void *arg)
{
- pthread_t id;
unsigned int cpu, lcore = rte_lcore_id();
int ret;
struct dpaa_portal *dpaa_io_portal;
- rte_cpuset_t cpuset;
BUS_INIT_FUNC_TRACE();
@@ -266,17 +264,6 @@ int rte_dpaa_portal_init(void *arg)
cpu = rte_lcore_to_cpu_id(lcore);
- /* Set CPU affinity for this thread.*/
- id = pthread_self();
- cpuset = rte_lcore_cpuset(lcore);
- ret = pthread_setaffinity_np(id, sizeof(cpu_set_t),
- &cpuset);
- if (ret) {
- DPAA_BUS_LOG(ERR, "pthread_setaffinity_np failed on core :%u"
- " (lcore=%u) with ret: %d", cpu, lcore, ret);
- return ret;
- }
-
/* Initialise bman thread portals */
ret = bman_thread_init();
if (ret) {
--
2.17.1
next prev parent reply other threads:[~2019-08-29 10:42 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 7:07 [dpdk-dev] [PATCH v1 00/30] Enhancements and fixes in NXP dpaax drivers and fsl-mc bus Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 01/30] bus/dpaa: fix DPAA SEC blacklist case Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 02/30] net/dpaa: improve the Rx offload debug message Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 03/30] bus/dpaa: remove un-necessary thread affinity Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 04/30] bus/dpaa: decouple fq portal alloc and init Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 05/30] net/dpaa: support Rx interrupt handler Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 06/30] net/dpaa: support for Rx interrupt enable and disable Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 07/30] net/dpaa: add SG support in Tx for non DPAA buffer Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 08/30] net/dpaa: reduce debug messages Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 09/30] net/dpaa2: improve the Rx offload debug message Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 10/30] common/dpaax: reduce debug mesages Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 11/30] mempool/dpaa: reduce debug messages Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 12/30] net/dpaa2: realign Rx offload support types Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 13/30] net/dpaa2: enable Rx offload for timestamp Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 14/30] net/dpaa2: support L2 payload based RSS distribution Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 15/30] net/dpaa2: add optional non-prefetch Rx mode Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 16/30] net/dpaa2: add taildrop support on frame count basis Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 17/30] net/dpaa2: add cgr counters in xtra stats Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 18/30] net/dpaa2: add support for config max Rx length in HW Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 19/30] net/dpaa2: use LFQIDs in Tx instead of qdid Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 20/30] net/dpaa2: support dpdmux classification on eth type Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 21/30] net/dpaa2: add Tx confirmation mode support Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 22/30] net/dpaa2: add timestamp support Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 23/30] net/dpaa2: add dprtc sub-module Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 24/30] net/dpaa2: add ptp driver Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 25/30] bus/fslmc: update PA-VA dpaax library only in PA mode Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 26/30] bus/fslmc: check for Dma map in primary process only Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 27/30] bus/fslmc: support multi vfio group Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 28/30] net/dpaa2: support separate MC portal per process Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 29/30] net/dpaa2: add support for soft parser in MC Sachin Saxena
2019-08-27 7:07 ` [dpdk-dev] [PATCH v1 30/30] net/dpaa2: add soft parser driver Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 00/30] Enhancements and fixes in NXP dpaax drivers and fsl-mc bus Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 01/30] bus/dpaa: fix DPAA SEC blacklist case Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 02/30] net/dpaa: improve the Rx offload debug message Sachin Saxena
2019-08-29 10:27 ` Sachin Saxena [this message]
2019-09-30 11:51 ` [dpdk-dev] [PATCH v2 03/30] bus/dpaa: remove un-necessary thread affinity Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 04/30] bus/dpaa: decouple fq portal alloc and init Sachin Saxena
2019-09-30 11:52 ` Hemant Agrawal
2019-10-03 7:52 ` Ferruh Yigit
2019-10-03 9:42 ` Nipun Gupta
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 05/30] net/dpaa: support Rx interrupt handler Sachin Saxena
2019-09-30 11:51 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 06/30] net/dpaa: support for Rx interrupt enable and disable Sachin Saxena
2019-09-30 11:52 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 07/30] net/dpaa: add SG support in Tx for non DPAA buffer Sachin Saxena
2019-10-03 8:26 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 08/30] net/dpaa: reduce debug messages Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 09/30] net/dpaa2: improve the Rx offload debug message Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 10/30] common/dpaax: reduce debug mesages Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 11/30] mempool/dpaa: reduce debug messages Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 12/30] net/dpaa2: realign Rx offload support types Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 13/30] net/dpaa2: enable Rx offload for timestamp Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 14/30] net/dpaa2: support L2 payload based RSS distribution Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 15/30] net/dpaa2: add optional non-prefetch Rx mode Sachin Saxena
2019-10-03 8:26 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 16/30] net/dpaa2: add taildrop support on frame count basis Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 17/30] net/dpaa2: add cgr counters in xtra stats Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 18/30] net/dpaa2: add support for config max Rx length in HW Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 19/30] net/dpaa2: use LFQIDs in Tx instead of qdid Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 20/30] net/dpaa2: support dpdmux classification on eth type Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 21/30] net/dpaa2: add Tx confirmation mode support Sachin Saxena
2019-09-30 11:53 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 22/30] net/dpaa2: add timestamp support Sachin Saxena
2019-09-30 11:53 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 23/30] net/dpaa2: add dprtc sub-module Sachin Saxena
2019-10-03 8:26 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 24/30] net/dpaa2: add ptp driver Sachin Saxena
2019-10-03 8:26 ` Hemant Agrawal
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 25/30] bus/fslmc: update PA-VA dpaax library only in PA mode Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 26/30] bus/fslmc: check for Dma map in primary process only Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 27/30] bus/fslmc: support multi vfio group Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 28/30] net/dpaa2: support separate MC portal per process Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 29/30] net/dpaa2: add support for soft parser in MC Sachin Saxena
2019-08-29 10:27 ` [dpdk-dev] [PATCH v2 30/30] net/dpaa2: add soft parser driver Sachin Saxena
2019-10-03 8:26 ` Hemant Agrawal
2019-10-03 11:33 ` [dpdk-dev] [PATCH v2 00/30] Enhancements and fixes in NXP dpaax drivers and fsl-mc bus Ferruh Yigit
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=20190829102737.13267-4-sachin.saxena@nxp.com \
--to=sachin.saxena@nxp.com \
--cc=dev@dpdk.org \
--cc=nipun.gupta@nxp.com \
--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).