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 36B99A034F; Mon, 19 Jul 2021 16:02:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59AAC41192; Mon, 19 Jul 2021 16:02:36 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2089.outbound.protection.outlook.com [40.107.21.89]) by mails.dpdk.org (Postfix) with ESMTP id A1F7E4117E for ; Mon, 19 Jul 2021 16:02:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VyrEawbGys9FCUjH+VBgBsZic0LzihGgkQh4jtpwFtiHA+G4iQNJ97M1b9lyqlZMizwWFz2Xw0FLruA9XfTbzTlQyR9RSZg0QCgQjjQ1YtJFLbgwO4Z5OdVt44FQT4PlG6qfg+cCAHmV9dIODlAkffzHj/IGCJe5TjQlCsARJWNlLfQomWZh2swky8DgYQTwVlaBcAx4ebRoX0eL0+awx3nTYE1oEFnxQPO0Vf6exV65wqUKfsxevP4oPsU6jr3ZBZsOitaocmbCJxhQcUztzQKU3ulv1PgmfOQS2RhZjFm5Inw7uXfWtELYXboPeW5K8VgBq804FPN2fmuCKoZY6A== 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-SenderADCheck; bh=3nle/WLL/PVeJ4A+c2QzbAJBUEsbnlfDjn3sFP0OrkE=; b=NOVIpJ7/N+W9phnSAOXzwJQgNKCqizZIl8yZT2xZblm6vlGpnsAaeWoI2lxRkBG0afXXXIEQfzy+/2/LOzmklnRU7u2YKuu6YRZm+0UJUdFZpr+ptzMTRkgYGtVSF4k/cbh0VdOQ6skfWQgc3vvxcIVabRWNx9NR8lx3NDOl2pERYeY6sqB0ZZjIWMjpdxLl7wsPgn0uug5du2Elr0/mBe6gEC/SIBe5zFvSVzpaufl+fDbkY5V5nR14iLeGRyZBcjcSOG1yp1fJUi2NQzTTcTY2HbD97juIyN7FkrcaGF1kgpfrkivgj3wjrA1Pm9fi3mWhBNRXFCF8/rfUCKWbGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3nle/WLL/PVeJ4A+c2QzbAJBUEsbnlfDjn3sFP0OrkE=; b=pRXXuaXZak6eHWoK4iw83ZKjR3n58K/EltxfHIZTeIanjbl+jxTKWlY0XJl/mjG8/i4gINEJHpzk1wZ1FQulDmlZYVzohhiAZxWQgKEM40QhK7bJPvY8rjj+47tPwZ37uIe1B/DGCnXrwsqeM8HeyYny9bLoAojymF8e/Q97U7M= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by DU2PR04MB8536.eurprd04.prod.outlook.com (2603:10a6:10:2d7::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.25; Mon, 19 Jul 2021 14:02:33 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::f483:9bb1:cde3:8a28]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::f483:9bb1:cde3:8a28%6]) with mapi id 15.20.4331.032; Mon, 19 Jul 2021 14:02:32 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Hemant Agrawal Date: Mon, 19 Jul 2021 19:29:13 +0530 Message-Id: <20210719135917.26241-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210719135917.26241-1-hemant.agrawal@nxp.com> References: <20210719135917.26241-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0038.apcprd02.prod.outlook.com (2603:1096:3:18::26) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by SG2PR02CA0038.apcprd02.prod.outlook.com (2603:1096:3:18::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Mon, 19 Jul 2021 14:02:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01da1f31-b3ff-4f0e-b698-08d94abddaa4 X-MS-TrafficTypeDiagnostic: DU2PR04MB8536: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:669; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0KAuJy8JZjzbabonHxrFDkbzDmwm0RKa4xmVIP0B5oaHhArfw9CbwCJNEEM7snqUwEI0NFms8xoFgy1iswRL8z9RxNQfyXiTWD2FEwdCnpiSIDSWD0yfBzxnGoBEtvzmrrxv3xe4A3FhCV8VLBgqdrwg8V1O8lNiYbQ+APsQkXDmsBzAezn2qWdV+SNoaPWP/+2l9GantNBLE4JKW16EbanXbiGol3D2a0ZbPaLOyQeCH7VNxkM65FgwCIT0LzYSibE38hrf4uLVqbGFU3Q4c/1ul6UBC1fHqz6VkCTkzDlzdD8zP2gqmwq1rmICV4lXGcI2XgTYtHmimblqiWAXqHjhUsnXarC/aIbammQ1UHp9xy3vQULfIkgYJCzUQWUMWKtKVBrLd1tQZFFFOSkbwaYFlEmrwb9xan6o0OZgxrI3Lvk5dn7+oI5tcSxgu2emb+62Xo4MYdaUkExxagcN4d1+CZtS8QJN+xrAb9+F3y/xWOikpdvYhef1nLr7mKqdcTPGo9nOli6Uf+kVDzC6dlTOZNokkwnNJu6vHxAlbYS59HfBw+QAQ6PHorjVDJ3OYGLnasMmIPRYXvJI5sWbn4NYbv8SX+y2I9tAt6QzhHxIkinCOiGEgDqM8qvhwKgSDpsrejVyzdBSIqI1p4CM2PuxhawJikSzeAhOR3ykXWJXOV4o9qGSBbYcoachp0Mh8Gc5Utli0a8Qm0z7+kifyw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(366004)(39860400002)(346002)(136003)(26005)(186003)(6512007)(36756003)(66946007)(66556008)(1076003)(83380400001)(66476007)(6506007)(44832011)(8676002)(2616005)(8936002)(478600001)(38350700002)(38100700002)(6666004)(86362001)(52116002)(316002)(6486002)(5660300002)(4326008)(6916009)(2906002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?w3C2eKmBdAiaTlAt7kC4ImsL5DVru/YHOxXcFcM6WZEtUqB4QaGzGJSqNQkV?= =?us-ascii?Q?64pk9oazBAlzF7B2qWjyJEz/D58PoSx6ipOErbUhTDSnLw9YBshSTwTnTnXG?= =?us-ascii?Q?Dxbj75bow99c0T7eWQCmhPkZJVFsrDjfn0oXo7e6NKv9f33WMbqDZoYFOzEW?= =?us-ascii?Q?cLTydODufILosrRUns4oDMDVYrX5m8oAPkhmJsf+jVka3Ezo/OPnTzHh48BS?= =?us-ascii?Q?acyvfeW2/prylH3HSuE+EG8FImvHz3NHdnr9Nap2lVIMgx2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OKrthFs6bbQrMJIu3AAAp7jZxCQasaLyMY4piVd?= =?us-ascii?Q?xYc4UqT2b1gLNVGoMmf4SelPVSB9BRs7+gtKKyXiaIQZK61OuWG81+XSUxHi?= =?us-ascii?Q?UTZ2YvsnpHbOeIOHHt6Xu1Tx5qvQzdN5vNPUQPL5j4p4cAEkxpEEyFmNsHDl?= =?us-ascii?Q?35TOpr5lZS8sSbZNWWhurn1K?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01da1f31-b3ff-4f0e-b698-08d94abddaa4 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2021 14:02:32.9248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: G9fzZotXg69hN/Elpo/g6dom8SCF4TV/YqEca+R1wOiM/cQK7YM19xNO5r54m8/J+6htf/jdhBPfHOpako37rg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8536 Subject: [dpdk-dev] [PATCH 3/7] bus/dpaa: reduce syscall usages 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 Sender: "dev" Reuse dpdk rte_gettid instead of syscall. It will help to reduce the dpaa portal allocation time. Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/dpaa_bus.c | 3 +-- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 2f48d4036b..e499305d85 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -314,7 +313,7 @@ int rte_dpaa_portal_init(void *arg) DPAA_PER_LCORE_PORTAL->qman_idx = qman_get_portal_index(); DPAA_PER_LCORE_PORTAL->bman_idx = bman_get_portal_index(); - DPAA_PER_LCORE_PORTAL->tid = syscall(SYS_gettid); + DPAA_PER_LCORE_PORTAL->tid = rte_gettid(); ret = pthread_setspecific(dpaa_portal_key, (void *)DPAA_PER_LCORE_PORTAL); diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index c6f8312a1d..c224a883ae 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -278,8 +277,8 @@ static struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void) return NULL; } - DPAA2_BUS_DEBUG("New Portal %p (%d) affined thread - %lu", - dpio_dev, dpio_dev->index, syscall(SYS_gettid)); + DPAA2_BUS_DEBUG("New Portal %p (%d) affined thread - %u", + dpio_dev, dpio_dev->index, rte_gettid()); /* Set the Stashing Destination */ cpu_id = dpaa2_get_core_id(); @@ -310,7 +309,7 @@ int dpaa2_affine_qbman_swp(void) { struct dpaa2_dpio_dev *dpio_dev; - uint64_t tid = syscall(SYS_gettid); + uint64_t tid = rte_gettid(); /* Populate the dpaa2_io_portal structure */ if (!RTE_PER_LCORE(_dpaa2_io).dpio_dev) { @@ -332,7 +331,7 @@ int dpaa2_affine_qbman_ethrx_swp(void) { struct dpaa2_dpio_dev *dpio_dev; - uint64_t tid = syscall(SYS_gettid); + uint64_t tid = rte_gettid(); /* Populate the dpaa2_io_portal structure */ if (!RTE_PER_LCORE(_dpaa2_io).ethrx_dpio_dev) { -- 2.17.1