From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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: , X-List-Received-Date: Tue, 26 Mar 2019 12:01:45 -0000 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(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbm= an/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 * */ =20 @@ -167,6 +167,11 @@ int qman_setup_fq_lookup_table(size_t num_entries) return 0; } =20 +void qman_set_fq_lookup_table(void **fq_table) +{ + qman_fq_lookup_table =3D fq_table; +} + /* global structure that maintains fq object mapping */ static DEFINE_SPINLOCK(fq_hash_table_lock); =20 @@ -1408,6 +1413,7 @@ int qman_create_fq(u32 fqid, u32 flags, struct qman_f= q *fq) pr_info("Find empty table entry failed\n"); return -ENOMEM; } + fq->qman_fq_lookup_table =3D 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 * */ =20 @@ -1233,6 +1234,7 @@ struct qman_fq { =20 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 =20 +#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/r= te_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 { =20 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) =20 PMD_INIT_FUNC_TRACE(); =20 + dpaa_intf =3D eth_dev->data->dev_private; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { eth_dev->dev_ops =3D &dpaa_devops; /* Plugging of UCODE burst API not supported in Secondary */ eth_dev->rx_pkt_burst =3D dpaa_eth_queue_rx; + eth_dev->tx_pkt_burst =3D 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; } =20 --=20 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 39391A05D3 for ; Tue, 26 Mar 2019 13:01:47 +0100 (CET) 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= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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" Message-ID: <20190326120144.wOTCuvcCdIyeNDbqva1UTIWQ9kl84KuYaM3h-MK6EjQ@z> 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(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbm= an/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 * */ =20 @@ -167,6 +167,11 @@ int qman_setup_fq_lookup_table(size_t num_entries) return 0; } =20 +void qman_set_fq_lookup_table(void **fq_table) +{ + qman_fq_lookup_table =3D fq_table; +} + /* global structure that maintains fq object mapping */ static DEFINE_SPINLOCK(fq_hash_table_lock); =20 @@ -1408,6 +1413,7 @@ int qman_create_fq(u32 fqid, u32 flags, struct qman_f= q *fq) pr_info("Find empty table entry failed\n"); return -ENOMEM; } + fq->qman_fq_lookup_table =3D 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 * */ =20 @@ -1233,6 +1234,7 @@ struct qman_fq { =20 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 =20 +#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/r= te_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 { =20 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) =20 PMD_INIT_FUNC_TRACE(); =20 + dpaa_intf =3D eth_dev->data->dev_private; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { eth_dev->dev_ops =3D &dpaa_devops; /* Plugging of UCODE burst API not supported in Secondary */ eth_dev->rx_pkt_burst =3D dpaa_eth_queue_rx; + eth_dev->tx_pkt_burst =3D 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; } =20 --=20 2.17.1