From patchwork Tue Mar 26 12:01:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 161205 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5123753jan; Tue, 26 Mar 2019 05:01:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6Ngw7e9wMEhGIcuvr84tEsizTY9T38YYEYF044jxagd4RETInqg3tYMU7aJ0tbA966/BL X-Received: by 2002:a50:ec93:: with SMTP id e19mr20594605edr.169.1553601708336; Tue, 26 Mar 2019 05:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553601708; cv=none; d=google.com; s=arc-20160816; b=iAI4+eKoVgymBNOLqaUMrozZd88HH4ynhQsVIaCj9HY9fuC2oeNda+Qscxbs6I9BjZ LT6XJ0jwgD1MPLqYq7ef+x5wEEcMKlfB8rl80gXYX0WugAF8Bm3qcnAApOYLnV2XEiWf 6dlI2nl02HPuOnQv5FOprZx9CPMePYFJsd02vqs+EBV/oK9OTNPkiqujCt1686CeQwUX CgXtqvfbwtfbjOGqA9/1YIJfJywqCJ8RsQkVtiqMhCAiu6lkVKqHWGXvyySOBr17s2Z/ sQ68XJu3aUhYPsWbE/zym6Tl5pnU0d6kAZUk4dW+5ghdPtCDrUd3WQPOrME3aapjEZDR lUqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :content-transfer-encoding:content-language:accept-language :message-id:date:thread-index:thread-topic:cc:to:from:dkim-signature; bh=qHs+lBT/P525W38RNA7zWSzt0JABj/v3UfUgXJTz/t4=; b=biLbzD7lR0kuVS1Hs0BB+ky88cZwE4V3XPuw6KYc73SKwMC2eS0i7pUjLr5y2r6SeN b8JnbgrfB3otl3yykkL/e5HgcgN8kAcajSSBivuReVYo0qKgmoe/lLG50NutDPM78JGr t6Yoviy7sufec8DeWQQgxpUYjhUYM8ZP5ua9PRMArq1+9FAxzZy0lHrYOspXkxENCI9h YmNRRDyTj0Fqk9CFbhIgVBJuyyoUOJRW/r/A/xO+0Q3nix4Ok+05Ciim8W1rsmayzANe zJxhKa5uMz8OP1ouxKhGHQNTOP/3BAJUYC3qv3iOtRDrhb6pBEgN135jysGiLT5yg63s t87w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=MpShz2KM; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id q3si1467488ejt.284.2019.03.26.05.01.47; Tue, 26 Mar 2019 05:01:48 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=MpShz2KM; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E49A62C19; Tue, 26 Mar 2019 13:01:45 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20048.outbound.protection.outlook.com [40.107.2.48]) by dpdk.org (Postfix) with ESMTP id 53411A3 for ; Tue, 26 Mar 2019 13:01:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qHs+lBT/P525W38RNA7zWSzt0JABj/v3UfUgXJTz/t4=; b=MpShz2KMgRHBjol1PVvA1VBEk5C2flo6pcIwiAGsWruJz/UU4tmkAXH4nclZi4iu6RpHWQz/772DSV+eqKKk8hW4zFrJ6MZTB1GOfN1sgp9+nEIjC13jhPvreMhulg1ImfsXmQLKUIhXf3MnuZw7V0sB+bNe05FgxtnDm5N3N+o= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2366.eurprd04.prod.outlook.com (10.169.134.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Tue, 26 Mar 2019 12:01:44 +0000 Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::18e3:39b6:c61d:3f18]) by VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::18e3:39b6:c61d:3f18%12]) with mapi id 15.20.1730.019; Tue, 26 Mar 2019 12:01:44 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , Shreyansh Jain , Akhil Goyal Thread-Topic: [PATCH 1/4] bus/dpaa: fq lookup table saved for secondary process Thread-Index: AQHU48uu7KZgNOEmVkO0dMQiiUMy6w== Date: Tue, 26 Mar 2019 12:01:44 +0000 Message-ID: <20190326115952.26278-1-hemant.agrawal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [92.120.1.72] x-mailer: git-send-email 2.17.1 x-clientproxiedby: BM1PR01CA0157.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::27) To VI1PR0401MB2541.eurprd04.prod.outlook.com (2603:10a6:800:56::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a75ec535-ae22-42d8-f66c-08d6b1e2d08f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2366; x-ms-traffictypediagnostic: VI1PR0401MB2366: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(136003)(346002)(39860400002)(376002)(199004)(189003)(71190400001)(86362001)(256004)(44832011)(6916009)(26005)(5660300002)(81156014)(2351001)(2501003)(1076003)(66066001)(2906002)(6116002)(3846002)(14454004)(486006)(6506007)(1730700003)(71200400001)(316002)(14444005)(105586002)(478600001)(97736004)(8676002)(186003)(6512007)(7736002)(106356001)(8936002)(52116002)(81166006)(25786009)(50226002)(99286004)(6436002)(5640700003)(2616005)(305945005)(68736007)(386003)(4326008)(102836004)(476003)(36756003)(6486002)(54906003)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2366; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: MLd5CtrWepHpM2cUp5H8e7NwJ2jBoe5CJgCrSzlxvucjSj+uafe3aXCfLy5fWZZBqWivQoPCRWCl1h6eXLFtbymzth5fzG5wUiJIgsfCSA/N6HTKKM0Ij2JXiadu+v7hSdfs9WJ/S7bJqZVmngrOyp7G5eHrbWFDaBy8r6d++16XXl5JhU3AXWQWTuqvODZOEOQU+GM7016n+R/vwIVS67L3jnialAgS6ijS7SV1gUKirx8Wv/hYDGi5sEgB0UnB68dLon2ETOO1TCidiDMxKZlG3W3D33cKDJ+Gt5/XcqO4mA/Q+Wyf9Z/CVwvH20tTnza5G+0cBsIRKuVWV+UjECSdqFXlRoJ1+rnAQhmkM/vJIquhUFoR+CfuRcekGcrRqzkKGYRn9LxcGpB/axsC4EY7/bDMR+9jObZo5XWJnAk= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a75ec535-ae22-42d8-f66c-08d6b1e2d08f X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:01:44.2847 (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-Transport-CrossTenantHeadersStamped: VI1PR0401MB2366 Subject: [dpdk-dev] [PATCH 1/4] bus/dpaa: fq lookup table saved for secondary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Akhil Goyal A reference to qman_fq_lookup_table need to be saved in each fq, so that it is retrieved while in running secondary process. Signed-off-by: Akhil Goyal --- drivers/bus/dpaa/base/qbman/qman.c | 8 +++++++- drivers/bus/dpaa/include/fsl_qman.h | 6 ++++++ drivers/bus/dpaa/rte_bus_dpaa_version.map | 7 +++++++ drivers/net/dpaa/dpaa_ethdev.c | 6 ++++++ 4 files changed, 26 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index dc64d0896..c6f7d7bb3 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.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 * */ @@ -167,6 +167,11 @@ int qman_setup_fq_lookup_table(size_t num_entries) return 0; } +void qman_set_fq_lookup_table(void **fq_table) +{ + qman_fq_lookup_table = fq_table; +} + /* global structure that maintains fq object mapping */ static DEFINE_SPINLOCK(fq_hash_table_lock); @@ -1408,6 +1413,7 @@ int qman_create_fq(u32 fqid, u32 flags, struct qman_fq *fq) pr_info("Find empty table entry failed\n"); return -ENOMEM; } + fq->qman_fq_lookup_table = qman_fq_lookup_table; #endif if (!(flags & QMAN_FQ_FLAG_AS_IS) || (flags & QMAN_FQ_FLAG_NO_MODIFY)) return 0; diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h index e43841499..ef598ccff 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * * Copyright 2008-2012 Freescale Semiconductor, Inc. + * Copyright 2019 NXP * */ @@ -1233,6 +1234,7 @@ struct qman_fq { struct rb_node node; #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP + void **qman_fq_lookup_table; u32 key; #endif }; @@ -1307,6 +1309,10 @@ struct qman_cgr { #define QMAN_CGR_FLAG_USE_INIT 0x00000001 #define QMAN_CGR_MODE_FRAME 0x00000001 +#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP +void qman_set_fq_lookup_table(void **table); +#endif + /** * qman_get_portal_index - get portal configuration index */ diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map index 70076c7ac..c88deaf7f 100644 --- a/drivers/bus/dpaa/rte_bus_dpaa_version.map +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -116,3 +116,10 @@ DPDK_18.11 { local: *; } DPDK_18.08; + +DPDK_19.05 { + global: + qman_set_fq_lookup_table; + + local: *; +} DPDK_18.11; diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index ba66aa2a0..d42ac6286 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1225,11 +1225,17 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); + dpaa_intf = eth_dev->data->dev_private; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) { eth_dev->dev_ops = &dpaa_devops; /* Plugging of UCODE burst API not supported in Secondary */ eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; + eth_dev->tx_pkt_burst = dpaa_eth_queue_tx; +#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP + qman_set_fq_lookup_table( + dpaa_intf->rx_queues->qman_fq_lookup_table); +#endif return 0; }