From patchwork Tue Mar 26 12:18:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 161213 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5143182jan; Tue, 26 Mar 2019 05:18:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6yES9UCUv2TOx1m86ppTZSfnTyUpRGkQxnw5VFY5B3K6zvTAvzK1LE2h6hNvC/DpvADuD X-Received: by 2002:a50:9153:: with SMTP id f19mr19593859eda.275.1553602686734; Tue, 26 Mar 2019 05:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553602686; cv=none; d=google.com; s=arc-20160816; b=U/mEFf0mFEeE30B8j4ZSWbTmwAvANmuZ751/pGWfyUzqHI/Hmi7GMyruBnj+Ws+ei4 2tHw3ra08ICvHIjqgIWoqoyw3ip7q5l5XUGEeCJm8gSiifoh8VVy9Usy3r848dELNQHQ 1VIdhZMU5Rj1YbBFDbEo+UL5ft9vusfy+Cs+aqUu6FpJGhB21juPe02WZ8YCpHbJ3EUv qZtrA6OTofZ6P0lb2OTTAVukAh/+I+/tCbnVf192wvCWlMKL/eo1sDZXFI9Bl/GKRRhU PsUSIF72m9z60aNeK1oWd67eZDs9du0JjNyTeq2yZeTFSHF0495YY1LCiDyt5huE3+GJ j48g== 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=6pnucfSaC3PIB8b41QH4DndxL8MvzAXxUIPLnTMdXPo=; b=XDJC5rAiCuFzO3SyihCCRwGRoykvRZkGFrppeR0Cny23cclcgxH7KAomZpZ/L7u7hY vydJ6P5h77exQ4kf9Bi2vkQrsVrVsvm+5TOrtLq0g53nY8aai5GPOxzAlvIwzG+xx10I Dol5R6ki+t0Jj14rshK8p6fv4/nVv7JGcS32kl3wwFMzBpoStBvBJXO80aD22yM70pJT 5lTuFKWVMuzIQ0xXdRlgSnWp9UjFbap16YRgmuPjL9RFC8Qz383c5vfLOLyzkzQIcA6n 1xceCE5PNN7Q0f7bZFMloxpEXXyOGDX/J9ZlXd5a/Eo/3fW/+dPEnFrnYo4osG1OPQgV etUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=AoftTlVF; 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 k3si1870615edd.275.2019.03.26.05.18.06; Tue, 26 Mar 2019 05:18:06 -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=AoftTlVF; 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 3098B3576; Tue, 26 Mar 2019 13:18:06 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50055.outbound.protection.outlook.com [40.107.5.55]) by dpdk.org (Postfix) with ESMTP id B65BA2BD3 for ; Tue, 26 Mar 2019 13:18:04 +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=6pnucfSaC3PIB8b41QH4DndxL8MvzAXxUIPLnTMdXPo=; b=AoftTlVFSB6cueT5w010AXXb8bXgk8Sj+nU7+iYAY0ESFt8Ol6EhzrzI+dR32C6iy1wTMsKo9m2BaQMpOwonwviiNP8LiVLGiF4JklpRaWgcT4n6ZeMXMqzVKbwsrywQ3yEFuKuN1zLIXJ2bT1Caki+MO8i7s2TXDGJLADcXv4U= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2557.eurprd04.prod.outlook.com (10.168.65.23) 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:18:03 +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:18:03 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: Shreyansh Jain Thread-Topic: [PATCH 1/5] raw/dpaa2_qdma: remove experimental tag from APIs Thread-Index: AQHU4831MZbuOe364EGzpT/+2+9hTw== Date: Tue, 26 Mar 2019 12:18:03 +0000 Message-ID: <20190326121610.28024-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: BM1PR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::31) 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: e1b06dc9-665b-42c8-53c2-08d6b1e51804 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2557; x-ms-traffictypediagnostic: VI1PR0401MB2557: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(136003)(376002)(39860400002)(366004)(189003)(199004)(25786009)(97736004)(66066001)(305945005)(6116002)(7736002)(6916009)(6436002)(2501003)(71200400001)(105586002)(5640700003)(106356001)(6486002)(6512007)(14454004)(4326008)(2906002)(2351001)(102836004)(6506007)(53936002)(1076003)(478600001)(2616005)(256004)(486006)(8936002)(52116002)(3846002)(26005)(68736007)(8676002)(476003)(1730700003)(81166006)(50226002)(36756003)(81156014)(99286004)(71190400001)(316002)(86362001)(386003)(186003)(44832011)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2557; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: VU5RC03NFJ2FWd0uix2sIVc6w4hwdFqxKY5ebyVzgv0Sk/KpxI/Mh/r5qil1Lj1ZvlonobIh2CKk4l6sd21h60delz6r02bDMz+MnIaiOIZYQ61DdGcmzFR9kBm5JySvrbg75BYnHH4r/PzH4/07XkQIWr5jfbQuTH+Hp2BrvJfoldcfUHDAXvieOLEPwMND4KFcTPflADYgKrsfgaMnB0UcO7sCMdGPCIG0/sWJdXlWurL8/aEBGOes3y4+T5TYPF5jRr/Csp/BIPjkRfI6Pa7kYwQ4Xp/jIyCgX73d0R5kmoPOQvViyuOzqbi5InWo1H+O/I36Lbhv8U/+OoHqi3EyCSi5MbqsL2IANtwvSjCCu9fwabORBMThq6uNDQw09gJ5qJjhrhrlo3ef7NJcy3NaU3BQBeAA+QrVJwuOZCQ= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b06dc9-665b-42c8-53c2-08d6b1e51804 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:18:03.0950 (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: VI1PR0401MB2557 Subject: [dpdk-dev] [PATCH 1/5] raw/dpaa2_qdma: remove experimental tag from APIs 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" These APIs has been in the DPDK for few release now. This patch removes the experimental tags for the APIs. Signed-off-by: Hemant Agrawal --- drivers/raw/dpaa2_qdma/Makefile | 1 - drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 20 ++++++------- drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h | 28 +++++++++---------- .../dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map | 2 +- 4 files changed, 25 insertions(+), 26 deletions(-) -- 2.17.1 diff --git a/drivers/raw/dpaa2_qdma/Makefile b/drivers/raw/dpaa2_qdma/Makefile index 5c75f5fa0..3b6269a8f 100644 --- a/drivers/raw/dpaa2_qdma/Makefile +++ b/drivers/raw/dpaa2_qdma/Makefile @@ -8,7 +8,6 @@ include $(RTE_SDK)/mk/rte.vars.mk # LIB = librte_pmd_dpaa2_qdma.a -CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index 60621eb85..afa5e5a3d 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -143,7 +143,7 @@ put_hw_queue(struct qdma_hw_queue *queue) } } -int __rte_experimental +int rte_qdma_init(void) { DPAA2_QDMA_FUNC_TRACE(); @@ -153,7 +153,7 @@ rte_qdma_init(void) return 0; } -void __rte_experimental +void rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr) { DPAA2_QDMA_FUNC_TRACE(); @@ -161,7 +161,7 @@ rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr) qdma_attr->num_hw_queues = qdma_dev.num_hw_queues; } -int __rte_experimental +int rte_qdma_reset(void) { struct qdma_hw_queue *queue; @@ -215,7 +215,7 @@ rte_qdma_reset(void) return 0; } -int __rte_experimental +int rte_qdma_configure(struct rte_qdma_config *qdma_config) { int ret; @@ -274,7 +274,7 @@ rte_qdma_configure(struct rte_qdma_config *qdma_config) return 0; } -int __rte_experimental +int rte_qdma_start(void) { DPAA2_QDMA_FUNC_TRACE(); @@ -284,7 +284,7 @@ rte_qdma_start(void) return 0; } -int __rte_experimental +int rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags) { char ring_name[32]; @@ -677,7 +677,7 @@ rte_qdma_vq_dequeue(uint16_t vq_id) return job; } -void __rte_experimental +void rte_qdma_vq_stats(uint16_t vq_id, struct rte_qdma_vq_stats *vq_status) { @@ -695,7 +695,7 @@ rte_qdma_vq_stats(uint16_t vq_id, } } -int __rte_experimental +int rte_qdma_vq_destroy(uint16_t vq_id) { struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; @@ -724,7 +724,7 @@ rte_qdma_vq_destroy(uint16_t vq_id) return 0; } -void __rte_experimental +void rte_qdma_stop(void) { DPAA2_QDMA_FUNC_TRACE(); @@ -732,7 +732,7 @@ rte_qdma_stop(void) qdma_dev.state = 0; } -void __rte_experimental +void rte_qdma_destroy(void) { DPAA2_QDMA_FUNC_TRACE(); diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h index 17fffcb74..c9697b4d7 100644 --- a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h +++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2018 NXP + * Copyright 2018-2019 NXP */ #ifndef __RTE_PMD_DPAA2_QDMA_H__ @@ -113,7 +113,7 @@ struct rte_qdma_job { * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_init(void); /** @@ -122,7 +122,7 @@ rte_qdma_init(void); * @param qdma_attr * QDMA attributes providing total number of hw queues etc. */ -void __rte_experimental +void rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr); /** @@ -134,7 +134,7 @@ rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr); * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_reset(void); /** @@ -144,7 +144,7 @@ rte_qdma_reset(void); * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_configure(struct rte_qdma_config *qdma_config); /** @@ -154,7 +154,7 @@ rte_qdma_configure(struct rte_qdma_config *qdma_config); * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_start(void); /** @@ -171,7 +171,7 @@ rte_qdma_start(void); * - >= 0: Virtual queue ID. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags); /** @@ -190,7 +190,7 @@ rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags); * - >=0: Number of jobs successfully submitted * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_enqueue_multi(uint16_t vq_id, struct rte_qdma_job **job, uint16_t nb_jobs); @@ -209,7 +209,7 @@ rte_qdma_vq_enqueue_multi(uint16_t vq_id, * - >=0: Number of jobs successfully submitted * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_enqueue(uint16_t vq_id, struct rte_qdma_job *job); @@ -227,7 +227,7 @@ rte_qdma_vq_enqueue(uint16_t vq_id, * @returns * Number of jobs actually dequeued. */ -int __rte_experimental +int rte_qdma_vq_dequeue_multi(uint16_t vq_id, struct rte_qdma_job **job, uint16_t nb_jobs); @@ -252,7 +252,7 @@ rte_qdma_vq_dequeue(uint16_t vq_id); * @param vq_stats * VQ statistics structure which will be filled in by the driver. */ -void __rte_experimental +void rte_qdma_vq_stats(uint16_t vq_id, struct rte_qdma_vq_stats *vq_stats); @@ -268,19 +268,19 @@ rte_qdma_vq_stats(uint16_t vq_id, * - 0: Success. * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_destroy(uint16_t vq_id); /** * Stop QDMA device. */ -void __rte_experimental +void rte_qdma_stop(void); /** * Destroy the QDMA device. */ -void __rte_experimental +void rte_qdma_destroy(void); #endif /* __RTE_PMD_DPAA2_QDMA_H__*/ diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map index fe42a2276..d16a136fc 100644 --- a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map +++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map @@ -1,4 +1,4 @@ -EXPERIMENTAL { +DPDK_19.05 { global: rte_qdma_attr_get; From patchwork Tue Mar 26 12:18:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 161214 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5143338jan; Tue, 26 Mar 2019 05:18:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc4U5i1PlwDfnly9vKYuRGGC+4Y51zyXBpR7gfq1vWmycbsl+5qXdmim8MaavU28pXi+Kr X-Received: by 2002:a17:906:3c5:: with SMTP id c5mr17166637eja.24.1553602694136; Tue, 26 Mar 2019 05:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553602694; cv=none; d=google.com; s=arc-20160816; b=Td3LNvviFZz7RTDNIkNFfm7Sc+4kbAnvaf8YtJJfDB3RjR38GladUqYBJfjTYOxcCy FlF1rLfxBGQldqS9jRyNw5+RGc534tJnh3/IeAj5u0Safzfl1pMge5L3wwJhy0bsjGiR dQZxeoUmxU2ck08NQ1MSHV1+tk5ztnKi5Ep+wjY9ORtn2dtAQy55qkwknFUQA6dL2Qxs 6GpzplcPQXl0iC6aKN2cuS67o2qd6ET/Sh2E/DY/ZPGZ9mKrM44zb/zDHiEsUvPLDTIJ hxKwC4HAjUv/LHghNRqKODihBQPPnvh9dZe3ZJ+rtz/HAtlRib+wNOpAa17B7E91km+3 Zlnw== 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 :in-reply-to:references:message-id:date:thread-index:thread-topic:cc :to:from:dkim-signature; bh=596q+1mJmT16s4rOJ9Tx4wQIKEH4dkbqQVA+SO33fII=; b=c2258Nh54LFqZB/1tDAGqLzTLbWBAuDm/DG9vUqIRAxu6HzjRJryD8a/Oe4MpNjKQk iq15CdNUia77vjGsKZ70p3/EnJfSHewuvWQlRBEwpBOPUBBGV7sJaTbrQ3bTDMKxJo7e jFeO7Nu2Y7fIQ+kEWcweWJf2QG3qc4cUcEUL5MW8n4Jimodrp2T63NGEz3fnHqP+d8mK RvmBll6uB2eaBW3d/4+JMrhq8htDtUEccOM+Hp1d149Y//QWTw/VaoT2h59FIfWAPWdD ItKoYR6OgmoM5ZBNvfS7Q1XG/p109fTM7k48la3B14VOYbvkRrBr4YzD1MZa8eapt2Z4 Ouew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=kgDRRKAe; 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 k12si886931edr.443.2019.03.26.05.18.13; Tue, 26 Mar 2019 05:18:14 -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=kgDRRKAe; 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 8C9E74C93; Tue, 26 Mar 2019 13:18:08 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80051.outbound.protection.outlook.com [40.107.8.51]) by dpdk.org (Postfix) with ESMTP id E01632BD3; Tue, 26 Mar 2019 13:18:05 +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=596q+1mJmT16s4rOJ9Tx4wQIKEH4dkbqQVA+SO33fII=; b=kgDRRKAebeewHzs9/mlzzdbzYeAQh3HnmpMp8P4EuzCMHetfuGDDYvg2lZdlhYni2IMlF0Ptnqm5cWwFDS6nLbxRyaiEF6mMtyplHO0Q3WIUqvgGakAXdMj1U7QlLjbuMVpUYmoCP4WvPOKcYm7PgF2s3M/RBeNl4j6O53XlrW4= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2575.eurprd04.prod.outlook.com (10.168.65.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Tue, 26 Mar 2019 12:18:04 +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:18:04 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: Shreyansh Jain , Nipun Gupta , "stable@dpdk.org" Thread-Topic: [PATCH 2/5] raw/dpaa2_qdma: fix to support multiprocess execution Thread-Index: AQHU4832ZgGhawRt3Eu+uUatmr4ovQ== Date: Tue, 26 Mar 2019 12:18:04 +0000 Message-ID: <20190326121610.28024-2-hemant.agrawal@nxp.com> References: <20190326121610.28024-1-hemant.agrawal@nxp.com> In-Reply-To: <20190326121610.28024-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: BM1PR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::31) 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: b0cc8e21-7c86-4941-81f5-08d6b1e518d0 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:VI1PR0401MB2575; x-ms-traffictypediagnostic: VI1PR0401MB2575: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(136003)(346002)(39860400002)(376002)(199004)(189003)(186003)(36756003)(44832011)(53936002)(4326008)(76176011)(71190400001)(11346002)(71200400001)(476003)(6436002)(2616005)(5640700003)(486006)(2501003)(446003)(6486002)(14444005)(25786009)(14454004)(99286004)(256004)(2351001)(450100002)(2906002)(105586002)(86362001)(5660300002)(106356001)(81166006)(7736002)(1730700003)(1076003)(3846002)(97736004)(81156014)(52116002)(54906003)(66066001)(6116002)(68736007)(6506007)(386003)(478600001)(26005)(316002)(6916009)(6512007)(50226002)(8936002)(8676002)(102836004)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2575; 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: oghjt7v00YS1yYO53w+ouNz12x8LIG+WIPNtSQcas2twkb7zbpu52TdgNbKvN/XiqpPg5HyLeq+Ex8Wr/1nZkKY9qzxG2hK6dPv/Xw5UmrOrwqGRsGEqULODMssmBBR12yCXfBE72z0P7jLzvKzRsCzezPK6wo5oEt6kTT1OQZn8c67n+HLyvj3BmmsCDiC6seW5Ne9soeCDaih7ZvXEl2YfrVXo17S5PwoWKH4w7i3Yk+VhGXhfso2EMYRKI18TSVNQqIKHs/yIiRuGVasjL4VD8dnC0u9zA35KnCGZ5Jfsrg0CYD2SSaIa8PhmosU2whxuHa0EbwMqhTYouchT+gSy2gVPQ09yjD7y08W9ps/t+H3o0lpzB6r95fGqMUD2L0QMLbY2St70dfASF5MEPVQPIe/SsJ2hePJxn1nFcqc= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0cc8e21-7c86-4941-81f5-08d6b1e518d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:18:04.4811 (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: VI1PR0401MB2575 Subject: [dpdk-dev] [PATCH 2/5] raw/dpaa2_qdma: fix to support multiprocess execution 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: Shreyansh Jain Fixes: c22fab9a6c34 ("raw/dpaa2_qdma: support configuration APIs") Cc: nipun.gupta@nxp.com Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain --- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index afa5e5a3d..a3f0f7fdd 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -219,6 +219,7 @@ int rte_qdma_configure(struct rte_qdma_config *qdma_config) { int ret; + char fle_pool_name[32]; /* RTE_MEMZONE_NAMESIZE = 32 */ DPAA2_QDMA_FUNC_TRACE(); @@ -258,8 +259,12 @@ rte_qdma_configure(struct rte_qdma_config *qdma_config) } qdma_dev.max_vqs = qdma_config->max_vqs; - /* Allocate FLE pool */ - qdma_dev.fle_pool = rte_mempool_create("qdma_fle_pool", + /* Allocate FLE pool; just append PID so that in case of + * multiprocess, the pool's don't collide. + */ + snprintf(fle_pool_name, sizeof(fle_pool_name), "qdma_fle_pool%u", + getpid()); + qdma_dev.fle_pool = rte_mempool_create(fle_pool_name, qdma_config->fle_pool_count, QDMA_FLE_POOL_SIZE, QDMA_FLE_CACHE_SIZE(qdma_config->fle_pool_count), 0, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0); @@ -303,6 +308,7 @@ rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags) /* Return in case no VQ is free */ if (i == qdma_dev.max_vqs) { rte_spinlock_unlock(&qdma_dev.lock); + DPAA2_QDMA_ERR("Unable to get lock on QDMA device"); return -ENODEV; } @@ -793,9 +799,6 @@ dpaa2_dpdmai_dev_uninit(struct rte_rawdev *rawdev) DPAA2_QDMA_FUNC_TRACE(); - if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; - /* Remove HW queues from global list */ remove_hw_queues_from_list(dpdmai_dev); @@ -834,10 +837,6 @@ dpaa2_dpdmai_dev_init(struct rte_rawdev *rawdev, int dpdmai_id) DPAA2_QDMA_FUNC_TRACE(); - /* For secondary processes, the primary has done all the work */ - if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; - /* Open DPDMAI device */ dpdmai_dev->dpdmai_id = dpdmai_id; dpdmai_dev->dpdmai.regs = rte_mcp_ptr_list[MC_PORTAL_INDEX]; From patchwork Tue Mar 26 12:18:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 161215 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5143575jan; Tue, 26 Mar 2019 05:18:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfNhP+zHOPrxLqmfAiG06qT3Dd+oh1tULUJNl0sD8ADHqjXJmhnz0ey0hznicLDpOcsSkn X-Received: by 2002:a17:906:5c7:: with SMTP id t7mr8318829ejt.129.1553602707026; Tue, 26 Mar 2019 05:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553602707; cv=none; d=google.com; s=arc-20160816; b=cRIgtpPCXnhAhiExtRVm1PUzsTngjNBbKiA9dZmyD+eBOaYfrqEUlOXln8A2wN/pi6 Cg+QASl6CsF243fwCOrYpvmMO8JSTHWphSTIrLksco6STPlxj8OnA4Vghkr7EDkZkElo 2YONdZs5+XFFxdcskBnpZJVORpBiaLMIZshw4uR0QyHL2kx9J3xGHH23Zc2phlW7ux0G uR+JFNXvCVdhlYiHgqvdZIsNqZfC1QEixerL6F5BssteJRp/L2zCKQWCRAMGRfQgRohb icI8/qXylkebtIBcfZTgVewkja3ignhgr6Ny+v7thDM/27rtUolTG8MK9qtb98oIvBpT GMqQ== 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 :in-reply-to:references:message-id:date:thread-index:thread-topic:cc :to:from:dkim-signature; bh=SKlP5dflNKjzmJPAWJ/guIpnSdMPewtpGeObvUam2s0=; b=x3aNr4+A2NmH0spJyjFVFCnV2yU1/+GdMmd2HxKtFPxRcPkje5hFp2AJVREENKoo87 rtU39nMFyKXDOKCmXq40EbjVEimZb5GKh4/6Gbkix2t1OLibLMnTcKXlRh5eE6zsG6pF DKnch/nmsv0DZ9Y4TGFZfVXs8NBP5Fbh7R06mdTp/ODI3S+R9gMEa70rpoA0h7GPdCxM eu34cZq//UFbkUNzXy8OTGAZ/RDKQB/RxzoIFKqnYNv31rkyy0NbNPv/kp1BTuNoBX9u d36g6ty3H7tVVonOvp/PrPzJqlpcG5yHZv3VYDIBG8vtXGG+R93gJkEjiTd2r4ls2k/o sevQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=u8Wtm96v; 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 a10si1662314edn.51.2019.03.26.05.18.26; Tue, 26 Mar 2019 05:18:27 -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=u8Wtm96v; 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 D8FA14C9C; Tue, 26 Mar 2019 13:18:13 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80052.outbound.protection.outlook.com [40.107.8.52]) by dpdk.org (Postfix) with ESMTP id 137BA4CAB for ; Tue, 26 Mar 2019 13:18:12 +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=SKlP5dflNKjzmJPAWJ/guIpnSdMPewtpGeObvUam2s0=; b=u8Wtm96vG6E8cQcly8YpjnR9YxApxdhvz1ofVP76po3q/vpwaqiQCPcGNTTj7BejljrINve5MBrd09J7IGlWdK9rZXPI39cu4Iyrlsok6XlxcBX8f9MUpzDIa5uCADoSSdIlORLWvxL6J7y/uGkYR78X6/LNFYDzeFK4gX17Glc= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2575.eurprd04.prod.outlook.com (10.168.65.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Tue, 26 Mar 2019 12:18:05 +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:18:05 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: Shreyansh Jain , Yi Liu Thread-Topic: [PATCH 3/5] raw/dpaa2_qdma: add burst mode support Thread-Index: AQHU4833WQmLmfRiSkW+QYJ2NM5WoQ== Date: Tue, 26 Mar 2019 12:18:05 +0000 Message-ID: <20190326121610.28024-3-hemant.agrawal@nxp.com> References: <20190326121610.28024-1-hemant.agrawal@nxp.com> In-Reply-To: <20190326121610.28024-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: BM1PR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::31) 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: 0f621fc5-6111-4022-0702-08d6b1e5198e 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:VI1PR0401MB2575; x-ms-traffictypediagnostic: VI1PR0401MB2575: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(136003)(346002)(39860400002)(376002)(199004)(189003)(186003)(36756003)(44832011)(53936002)(4326008)(76176011)(71190400001)(11346002)(71200400001)(476003)(6436002)(2616005)(5640700003)(486006)(2501003)(446003)(6486002)(14444005)(25786009)(14454004)(99286004)(256004)(30864003)(2351001)(2906002)(105586002)(86362001)(5660300002)(106356001)(81166006)(7736002)(1730700003)(1076003)(3846002)(97736004)(81156014)(52116002)(54906003)(66066001)(6116002)(68736007)(6506007)(386003)(478600001)(26005)(316002)(6916009)(6512007)(50226002)(8936002)(8676002)(102836004)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2575; 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: mx1yikZQw2E3pqlQbPbhuRiSwD6KDfzP8MYsgKR7HfBovq3s27J/gr6SzitYjuDnkHnJS/ispHPeAv3z06zeakzC0C8cbDRytqyw3bXCsCTxZjQVqPKmsyJUUHwTUl0XiMflcLOdPMPJpkidwYF8R61GTffb0JN/AWFBz8vkKfpXq6dC2pRzqzkADCaqzK1hqtmyZpYGtMEkOMuwO1UdDZt/Q6iflCY2w5rroeBpjvkLjQk3TrQrQCensqfBMGuIrs//It2PUlTHigyMjjGg0oUSyQtgFUys/mnPHYqEn0/qivDcGLKnBUJXPAq7EI04RyRR1GCcedwxytF9TPciUny8Y769h34i5IZxIC7ZLCEkE5uDuLnxPFbUJgURlH5XEmPqVgVNrZvGVx8HeflpA8l4pnOKlf5CUnHE0jRwmU4= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f621fc5-6111-4022-0702-08d6b1e5198e X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:18:05.7192 (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: VI1PR0401MB2575 Subject: [dpdk-dev] [PATCH 3/5] raw/dpaa2_qdma: add burst mode support 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" This patch adds support the batch processing for the qdma jobs Signed-off-by: Hemant Agrawal Signed-off-by: Yi Liu --- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 309 ++++++++++---------- drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h | 6 +- 2 files changed, 167 insertions(+), 148 deletions(-) -- 2.17.1 diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index a3f0f7fdd..679bf66e9 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2018 NXP + * Copyright 2018-2019 NXP */ #include +#include +#include #include #include @@ -13,6 +15,7 @@ #include #include #include +#include #include #include @@ -395,21 +398,31 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, DPAA2_SET_FLE_FIN(fle); } -static int -dpdmai_dev_enqueue(struct dpaa2_dpdmai_dev *dpdmai_dev, - uint16_t txq_id, - uint16_t vq_id, - struct rte_qdma_job *job) +int +rte_qdma_vq_enqueue_multi(uint16_t vq_id, + struct rte_qdma_job **job, + uint16_t nb_jobs) { + struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; + struct qdma_hw_queue *qdma_pq = qdma_vq->hw_queue; + struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; struct qdma_io_meta *io_meta; - struct qbman_fd fd; + struct qbman_fd fd_arr[MAX_TX_RING_SLOTS]; struct dpaa2_queue *txq; struct qbman_fle *fle; struct qbman_eq_desc eqdesc; struct qbman_swp *swp; int ret; + uint32_t num_to_send = 0; + uint16_t num_tx = 0; + uint16_t num_txed = 0; - DPAA2_QDMA_FUNC_TRACE(); + /* Return error in case of wrong lcore_id */ + if (rte_lcore_id() != qdma_vq->lcore_id) { + DPAA2_QDMA_ERR("QDMA enqueue for vqid %d on wrong core", + vq_id); + return -1; + } if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); @@ -420,7 +433,7 @@ dpdmai_dev_enqueue(struct dpaa2_dpdmai_dev *dpdmai_dev, } swp = DPAA2_PER_LCORE_PORTAL; - txq = &(dpdmai_dev->tx_queue[txq_id]); + txq = &(dpdmai_dev->tx_queue[qdma_pq->queue_id]); /* Prepare enqueue descriptor */ qbman_eq_desc_clear(&eqdesc); @@ -428,97 +441,86 @@ dpdmai_dev_enqueue(struct dpaa2_dpdmai_dev *dpdmai_dev, qbman_eq_desc_set_no_orp(&eqdesc, 0); qbman_eq_desc_set_response(&eqdesc, 0, 0); - /* - * Get an FLE/SDD from FLE pool. - * Note: IO metadata is before the FLE and SDD memory. - */ - ret = rte_mempool_get(qdma_dev.fle_pool, (void **)(&io_meta)); - if (ret) { - DPAA2_QDMA_DP_WARN("Memory alloc failed for FLE"); - return ret; - } - - /* Set the metadata */ - io_meta->cnxt = (size_t)job; - io_meta->id = vq_id; - - fle = (struct qbman_fle *)(io_meta + 1); - - /* populate Frame descriptor */ - memset(&fd, 0, sizeof(struct qbman_fd)); - DPAA2_SET_FD_ADDR(&fd, DPAA2_VADDR_TO_IOVA(fle)); - DPAA2_SET_FD_COMPOUND_FMT(&fd); - DPAA2_SET_FD_FRC(&fd, QDMA_SER_CTX); + while (nb_jobs > 0) { + uint32_t loop; + + num_to_send = (nb_jobs > dpaa2_eqcr_size) ? + dpaa2_eqcr_size : nb_jobs; + + for (loop = 0; loop < num_to_send; loop++) { + /* + * Get an FLE/SDD from FLE pool. + * Note: IO metadata is before the FLE and SDD memory. + */ + ret = rte_mempool_get(qdma_dev.fle_pool, + (void **)(&io_meta)); + if (ret) { + DPAA2_QDMA_DP_WARN("Me alloc failed for FLE"); + return ret; + } - /* Populate FLE */ - memset(fle, 0, QDMA_FLE_POOL_SIZE); - dpaa2_qdma_populate_fle(fle, job->src, job->dest, job->len, job->flags); + /* Set the metadata */ + io_meta->cnxt = (size_t)job[num_tx]; + io_meta->id = vq_id; - /* Enqueue the packet to the QBMAN */ - do { - ret = qbman_swp_enqueue_multiple(swp, &eqdesc, &fd, NULL, 1); - if (ret < 0 && ret != -EBUSY) - DPAA2_QDMA_ERR("Transmit failure with err: %d", ret); - } while (ret == -EBUSY); + fle = (struct qbman_fle *)(io_meta + 1); - DPAA2_QDMA_DP_DEBUG("Successfully transmitted a packet"); + /* populate Frame descriptor */ + memset(&fd_arr[loop], 0, sizeof(struct qbman_fd)); + DPAA2_SET_FD_ADDR(&fd_arr[loop], + DPAA2_VADDR_TO_IOVA(fle)); + DPAA2_SET_FD_COMPOUND_FMT(&fd_arr[loop]); + DPAA2_SET_FD_FRC(&fd_arr[loop], QDMA_SER_CTX); - return ret; -} + /* Populate FLE */ + memset(fle, 0, QDMA_FLE_POOL_SIZE); + dpaa2_qdma_populate_fle(fle, job[num_tx]->src, + job[num_tx]->dest, + job[num_tx]->len, + job[num_tx]->flags); -int __rte_experimental -rte_qdma_vq_enqueue_multi(uint16_t vq_id, - struct rte_qdma_job **job, - uint16_t nb_jobs) -{ - int i, ret; + num_tx++; + } - DPAA2_QDMA_FUNC_TRACE(); + /* Enqueue the packet to the QBMAN */ + uint32_t enqueue_loop = 0; + while (enqueue_loop < num_to_send) { + enqueue_loop += qbman_swp_enqueue_multiple(swp, + &eqdesc, + &fd_arr[enqueue_loop], + NULL, + num_to_send - enqueue_loop); + } - for (i = 0; i < nb_jobs; i++) { - ret = rte_qdma_vq_enqueue(vq_id, job[i]); - if (ret < 0) - break; + num_txed += num_to_send; + nb_jobs -= num_to_send; } - - return i; + qdma_vq->num_enqueues += num_txed; + return num_txed; } -int __rte_experimental +int rte_qdma_vq_enqueue(uint16_t vq_id, struct rte_qdma_job *job) { - struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; - struct qdma_hw_queue *qdma_pq = qdma_vq->hw_queue; - struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; int ret; - DPAA2_QDMA_FUNC_TRACE(); - - /* Return error in case of wrong lcore_id */ - if (rte_lcore_id() != qdma_vq->lcore_id) { - DPAA2_QDMA_ERR("QDMA enqueue for vqid %d on wrong core", - vq_id); - return -EINVAL; - } - - ret = dpdmai_dev_enqueue(dpdmai_dev, qdma_pq->queue_id, vq_id, job); + ret = rte_qdma_vq_enqueue_multi(vq_id, &job, 1); if (ret < 0) { DPAA2_QDMA_ERR("DPDMAI device enqueue failed: %d", ret); return ret; } - qdma_vq->num_enqueues++; - return 1; } /* Function to receive a QDMA job for a given device and queue*/ static int -dpdmai_dev_dequeue(struct dpaa2_dpdmai_dev *dpdmai_dev, +dpdmai_dev_dequeue_multijob(struct dpaa2_dpdmai_dev *dpdmai_dev, uint16_t rxq_id, uint16_t *vq_id, - struct rte_qdma_job **job) + struct rte_qdma_job **job, + uint16_t nb_jobs) { struct qdma_io_meta *io_meta; struct dpaa2_queue *rxq; @@ -531,8 +533,6 @@ dpdmai_dev_dequeue(struct dpaa2_dpdmai_dev *dpdmai_dev, uint8_t status; int ret; - DPAA2_QDMA_FUNC_TRACE(); - if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { @@ -541,7 +541,6 @@ dpdmai_dev_dequeue(struct dpaa2_dpdmai_dev *dpdmai_dev, } } swp = DPAA2_PER_LCORE_PORTAL; - rxq = &(dpdmai_dev->rx_queue[rxq_id]); dq_storage = rxq->q_storage->dq_storage[0]; fqid = rxq->fqid; @@ -551,7 +550,10 @@ dpdmai_dev_dequeue(struct dpaa2_dpdmai_dev *dpdmai_dev, qbman_pull_desc_set_fq(&pulldesc, fqid); qbman_pull_desc_set_storage(&pulldesc, dq_storage, (uint64_t)(DPAA2_VADDR_TO_IOVA(dq_storage)), 1); - qbman_pull_desc_set_numframes(&pulldesc, 1); + if (nb_jobs > dpaa2_dqrr_size) + qbman_pull_desc_set_numframes(&pulldesc, dpaa2_dqrr_size); + else + qbman_pull_desc_set_numframes(&pulldesc, nb_jobs); while (1) { if (qbman_swp_pull(swp, &pulldesc)) { @@ -561,125 +563,138 @@ dpdmai_dev_dequeue(struct dpaa2_dpdmai_dev *dpdmai_dev, break; } - /* Check if previous issued command is completed. */ + rte_prefetch0((void *)((size_t)(dq_storage + 1))); + /* Check if the previous issued command is completed. */ while (!qbman_check_command_complete(dq_storage)) ; - /* Loop until dq_storage is updated with new token by QBMAN */ - while (!qbman_check_new_result(dq_storage)) - ; - /* Check for valid frame. */ - status = qbman_result_DQ_flags(dq_storage); - if (unlikely((status & QBMAN_DQ_STAT_VALIDFRAME) == 0)) { - DPAA2_QDMA_DP_DEBUG("No frame is delivered"); - return 0; - } + int num_pulled = 0; + int pending = 1; + do { + /* Loop until the dq_storage is updated with + * new token by QBMAN + */ + while (!qbman_check_new_result(dq_storage)) + ; - /* Get the FD */ - fd = qbman_result_DQ_fd(dq_storage); + rte_prefetch0((void *)((size_t)(dq_storage + 2))); + /* Check whether Last Pull command is Expired and + * setting Condition for Loop termination + */ + if (qbman_result_DQ_is_pull_complete(dq_storage)) { + pending = 0; + /* Check for valid frame. */ + status = qbman_result_DQ_flags(dq_storage); + if (unlikely((status & + QBMAN_DQ_STAT_VALIDFRAME) == 0)) + continue; + } + fd = qbman_result_DQ_fd(dq_storage); - /* - * Fetch metadata from FLE. job and vq_id were set - * in metadata in the enqueue operation. - */ - fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); - io_meta = (struct qdma_io_meta *)(fle) - 1; - if (vq_id) - *vq_id = io_meta->id; + /* + * Fetch metadata from FLE. job and vq_id were set + * in metadata in the enqueue operation. + */ + fle = (struct qbman_fle *) + DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); + io_meta = (struct qdma_io_meta *)(fle) - 1; + if (vq_id) + vq_id[num_pulled] = io_meta->id; - *job = (struct rte_qdma_job *)(size_t)io_meta->cnxt; - (*job)->status = DPAA2_GET_FD_ERR(fd); + job[num_pulled] = (struct rte_qdma_job *)(size_t)io_meta->cnxt; + job[num_pulled]->status = DPAA2_GET_FD_ERR(fd); - /* Free FLE to the pool */ - rte_mempool_put(qdma_dev.fle_pool, io_meta); + /* Free FLE to the pool */ + rte_mempool_put(qdma_dev.fle_pool, io_meta); - DPAA2_QDMA_DP_DEBUG("packet received"); + dq_storage++; + num_pulled++; + } while (pending && (num_pulled <= dpaa2_dqrr_size)); - return 1; + return num_pulled; } -int __rte_experimental +int rte_qdma_vq_dequeue_multi(uint16_t vq_id, struct rte_qdma_job **job, uint16_t nb_jobs) -{ - int i; - - DPAA2_QDMA_FUNC_TRACE(); - - for (i = 0; i < nb_jobs; i++) { - job[i] = rte_qdma_vq_dequeue(vq_id); - if (!job[i]) - break; - } - - return i; -} - -struct rte_qdma_job * __rte_experimental -rte_qdma_vq_dequeue(uint16_t vq_id) { struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; struct qdma_hw_queue *qdma_pq = qdma_vq->hw_queue; - struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; - struct rte_qdma_job *job = NULL; struct qdma_virt_queue *temp_qdma_vq; - int dequeue_budget = QDMA_DEQUEUE_BUDGET; - int ring_count, ret, i; - uint16_t temp_vq_id; - - DPAA2_QDMA_FUNC_TRACE(); + struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; + int ring_count, ret = 0, i; /* Return error in case of wrong lcore_id */ if (rte_lcore_id() != (unsigned int)(qdma_vq->lcore_id)) { - DPAA2_QDMA_ERR("QDMA dequeue for vqid %d on wrong core", + DPAA2_QDMA_WARN("QDMA dequeue for vqid %d on wrong core", vq_id); - return NULL; + return -1; } /* Only dequeue when there are pending jobs on VQ */ if (qdma_vq->num_enqueues == qdma_vq->num_dequeues) - return NULL; + return 0; + + if (qdma_vq->num_enqueues < (qdma_vq->num_dequeues + nb_jobs)) + nb_jobs = (qdma_vq->num_enqueues - qdma_vq->num_dequeues); if (qdma_vq->exclusive_hw_queue) { /* In case of exclusive queue directly fetch from HW queue */ - ret = dpdmai_dev_dequeue(dpdmai_dev, qdma_pq->queue_id, - NULL, &job); + ret = dpdmai_dev_dequeue_multijob(dpdmai_dev, qdma_pq->queue_id, + NULL, job, nb_jobs); if (ret < 0) { DPAA2_QDMA_ERR( "Dequeue from DPDMAI device failed: %d", ret); - return NULL; + return ret; } + qdma_vq->num_dequeues += ret; } else { + uint16_t temp_vq_id[RTE_QDMA_BURST_NB_MAX]; /* * Get the QDMA completed jobs from the software ring. * In case they are not available on the ring poke the HW * to fetch completed jobs from corresponding HW queues */ ring_count = rte_ring_count(qdma_vq->status_ring); - if (ring_count == 0) { + if (ring_count < nb_jobs) { /* TODO - How to have right budget */ - for (i = 0; i < dequeue_budget; i++) { - ret = dpdmai_dev_dequeue(dpdmai_dev, - qdma_pq->queue_id, &temp_vq_id, &job); - if (ret == 0) - break; - temp_qdma_vq = &qdma_vqs[temp_vq_id]; + ret = dpdmai_dev_dequeue_multijob(dpdmai_dev, + qdma_pq->queue_id, + temp_vq_id, job, nb_jobs); + for (i = 0; i < ret; i++) { + temp_qdma_vq = &qdma_vqs[temp_vq_id[i]]; rte_ring_enqueue(temp_qdma_vq->status_ring, - (void *)(job)); + (void *)(job[i])); ring_count = rte_ring_count( qdma_vq->status_ring); - if (ring_count) - break; } } - /* Dequeue job from the software ring to provide to the user */ - rte_ring_dequeue(qdma_vq->status_ring, (void **)&job); - if (job) - qdma_vq->num_dequeues++; + if (ring_count) { + /* Dequeue job from the software ring + * to provide to the user + */ + ret = rte_ring_dequeue_bulk(qdma_vq->status_ring, + (void **)job, ring_count, NULL); + if (ret) + qdma_vq->num_dequeues += ret; + } } + return ret; +} + +struct rte_qdma_job * +rte_qdma_vq_dequeue(uint16_t vq_id) +{ + int ret; + struct rte_qdma_job *job = NULL; + + ret = rte_qdma_vq_dequeue_multi(vq_id, &job, 1); + if (ret < 0) + DPAA2_QDMA_DP_WARN("DPDMAI device dequeue failed: %d", ret); + return job; } diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h index c9697b4d7..e1ccc19e8 100644 --- a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h +++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h @@ -12,6 +12,9 @@ * */ +/** Maximum qdma burst size */ +#define RTE_QDMA_BURST_NB_MAX 32 + /** Determines the mode of operation */ enum { /** @@ -225,7 +228,8 @@ rte_qdma_vq_enqueue(uint16_t vq_id, * Number of QDMA jobs requested for dequeue by the user. * * @returns - * Number of jobs actually dequeued. + * - >=0: Number of jobs successfully received + * - <0: Error code. */ int rte_qdma_vq_dequeue_multi(uint16_t vq_id, From patchwork Tue Mar 26 12:18:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 161216 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5143742jan; Tue, 26 Mar 2019 05:18:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw81FQUM0FYGDEPt3gaZTc9l9rLBytcjDHEKzXvuuJmKvvAFQV2Tzy1LTXwM3PdX51tcFkg X-Received: by 2002:a17:906:4ca:: with SMTP id g10mr17537052eja.88.1553602717065; Tue, 26 Mar 2019 05:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553602717; cv=none; d=google.com; s=arc-20160816; b=BuT//hCc6/ZCCytzcmqRZIE4Xxor2FSUdPQfNOk9jc8P/YUhKzVFSDBNFGcVJzj4nj MYE9fjfqDBDUURHuU/JMqtDO1k7V1d1eOWPrJxrBBqqClQkVuGwLCuJ0C6sX3AaJZbPC 103oq1yuXu9eVrGM8R03rT9sGgRBcV0G8GhA27fm2urvmiDfXE5LFaIMjuLT1cJdPRPS e/eerkhmCZ21gCO25Jzyk0orUL4kaQnmQVLpQL03NNtbNAawOEfKxeNuIefmOAdYe+0/ J7wTr2uHbMw8Eqvo+yP90vh9sMG4KlyUb7qQg6NlBNfogLvUlJHt8+mLa+FvFuPkH3kr j0Kw== 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 :in-reply-to:references:message-id:date:thread-index:thread-topic:cc :to:from:dkim-signature; bh=9tEYNQrmd85suMQMryhRQjL9LK7hP1ALM9s7L09LBew=; b=LTDCs7N/68stI7c47QDtQ+2HvgODktnGTjNUKs2QvhhBHh2ibhJx5fBj5lGpYIUpbW qUdnPWcxB9SIdwkfOi7yts31GSASKL6uKvVj3cxcJe3nvHN5lIYuQkXaJ63erB8b0jfs fYuaC6cKCa9Dzmb0vKru9Gx3GfzQPnzKlQ5URc94URNLWToDPLWKUPGuuPP529szWT3Y wKOJAM5+jiukKY2s/TlT2iSS/cros5rewjHXK51v0plqOCx4uENoF/GO3grLB8AKpoUv RO29AZouqJTN9qiEpnNfDuu9tx6EWuSO3cpJqe8sL7jmWvFUVpOAEHzJNN/U/PmQ5GIM SFWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=h7bMYhfX; 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 v28si1142843ejk.226.2019.03.26.05.18.36; Tue, 26 Mar 2019 05:18:37 -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=h7bMYhfX; 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 B793C4CBD; Tue, 26 Mar 2019 13:18:16 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80083.outbound.protection.outlook.com [40.107.8.83]) by dpdk.org (Postfix) with ESMTP id 9BDC23195 for ; Tue, 26 Mar 2019 13:18:12 +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=9tEYNQrmd85suMQMryhRQjL9LK7hP1ALM9s7L09LBew=; b=h7bMYhfXmJyvuhT4JN+KfXd1l2H7b1vRTi2FRC1Gm0Hjk/BEnU7aqmEScZLq0repMx5okFIYm1qO355cDWbZ9dexEUtAGQYYnU924udCtYorl8gFGRbtT8XMW60pUMaGx4n7Z4cVn8DQErge+EVNu/INTv+Pv/cevpDukqLUZQQ= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2575.eurprd04.prod.outlook.com (10.168.65.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Tue, 26 Mar 2019 12:18:11 +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:18:11 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: Shreyansh Jain , "M.h. Lian" , Sachin Saxena Thread-Topic: [PATCH 4/5] raw/dpaa2_qdma: add rbp mode support Thread-Index: AQHU48344OJj4NMcakCOOgnKOJrCkw== Date: Tue, 26 Mar 2019 12:18:07 +0000 Message-ID: <20190326121610.28024-4-hemant.agrawal@nxp.com> References: <20190326121610.28024-1-hemant.agrawal@nxp.com> In-Reply-To: <20190326121610.28024-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: BM1PR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::31) 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: 7d4eb55d-8cc8-43d8-37d1-08d6b1e51a63 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:VI1PR0401MB2575; x-ms-traffictypediagnostic: VI1PR0401MB2575: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(136003)(346002)(39860400002)(376002)(199004)(189003)(186003)(36756003)(44832011)(53936002)(4326008)(76176011)(71190400001)(11346002)(71200400001)(476003)(6436002)(2616005)(5640700003)(486006)(2501003)(6666004)(446003)(6486002)(53946003)(14444005)(25786009)(14454004)(99286004)(256004)(30864003)(2351001)(2906002)(105586002)(86362001)(5660300002)(106356001)(81166006)(7736002)(1730700003)(1076003)(3846002)(97736004)(81156014)(52116002)(54906003)(66066001)(6116002)(68736007)(6506007)(386003)(478600001)(26005)(316002)(6916009)(6512007)(50226002)(8936002)(8676002)(102836004)(305945005)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2575; 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: MoOTLE6cLuyEe4yPSpkaRJQdxkGaNKqzqsKCQezzUL9+Wee8jp0DK5xlXhI4u1lZR2BBPA4oVbyhYTpbvnCJXRZgglI7RyxF+HDB//JYuV+x85HZsfYEukd593L03JzWzSaO5hwLnhF9Ru8sXUIyYNzd8D5WmltbxcVlXTU0+fHT2Q1uPpdYCUdGSiWRhzONuk85VzhRN0cul0PZ9sLdhgyczAVhsmaRNM4kOY/els3DQ4KoATeImhkNJVmvfJ6yXLwvgnwdLAMdh0h5d3NuFKkRlgCdA3PR3j7V8j+p5jDbdHxp7cpD1nOy81R9GIjKCvCcwA3meJK/0yCl4NVGnZEtB+FG/zgfzsGjEegmB2Rg8Xjk+yhKPEb35EUaNDxmfdOXtwyeQIXDcWFAvwzSfgz26HomYZoQ8r59/R2dFks= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d4eb55d-8cc8-43d8-37d1-08d6b1e51a63 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:18:07.2224 (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: VI1PR0401MB2575 Subject: [dpdk-dev] [PATCH 4/5] raw/dpaa2_qdma: add rbp mode support 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" Add support for route by port mode. The route by port feature in HW helps in translating the PCI addresss of connected device. Signed-off-by: Minghuan Lian Signed-off-by: Sachin Saxena --- drivers/raw/dpaa2_qdma/Makefile | 2 +- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 403 +++++++++++++------- drivers/raw/dpaa2_qdma/dpaa2_qdma.h | 65 +++- drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h | 60 ++- 4 files changed, 383 insertions(+), 147 deletions(-) -- 2.17.1 diff --git a/drivers/raw/dpaa2_qdma/Makefile b/drivers/raw/dpaa2_qdma/Makefile index 3b6269a8f..a8e7643fc 100644 --- a/drivers/raw/dpaa2_qdma/Makefile +++ b/drivers/raw/dpaa2_qdma/Makefile @@ -25,7 +25,7 @@ LDLIBS += -lrte_common_dpaax EXPORT_MAP := rte_pmd_dpaa2_qdma_version.map -LIBABIVER := 2 +LIBABIVER := 3 # # all source are stored in SRCS-y diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index 679bf66e9..7c547d55f 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -21,13 +21,16 @@ #include #include +#include "rte_pmd_dpaa2_qdma.h" #include "dpaa2_qdma.h" #include "dpaa2_qdma_logs.h" -#include "rte_pmd_dpaa2_qdma.h" /* Dynamic log type identifier */ int dpaa2_qdma_logtype; +uint32_t dpaa2_coherent_no_alloc_cache; +uint32_t dpaa2_coherent_alloc_cache; + /* QDMA device */ static struct qdma_device qdma_dev; @@ -347,14 +350,29 @@ rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags) qdma_vqs[i].in_use = 1; qdma_vqs[i].lcore_id = lcore_id; - + memset(&qdma_vqs[i].rbp, 0, sizeof(struct rte_qdma_rbp)); rte_spinlock_unlock(&qdma_dev.lock); return i; } +/*create vq for route-by-port*/ +int +rte_qdma_vq_create_rbp(uint32_t lcore_id, uint32_t flags, + struct rte_qdma_rbp *rbp) +{ + int i; + + i = rte_qdma_vq_create(lcore_id, flags); + + memcpy(&qdma_vqs[i].rbp, rbp, sizeof(struct rte_qdma_rbp)); + + return i; +} + static void dpaa2_qdma_populate_fle(struct qbman_fle *fle, + struct rte_qdma_rbp *rbp, uint64_t src, uint64_t dest, size_t len, uint32_t flags) { @@ -370,10 +388,36 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, DPAA2_SET_FLE_LEN(fle, (2 * (sizeof(struct qdma_sdd)))); /* source and destination descriptor */ - DPAA2_SET_SDD_RD_COHERENT(sdd); /* source descriptor CMD */ - sdd++; - DPAA2_SET_SDD_WR_COHERENT(sdd); /* dest descriptor CMD */ + if (rbp && rbp->enable) { + /* source */ + sdd->read_cmd.portid = rbp->sportid; + sdd->rbpcmd_simple.pfid = rbp->spfid; + sdd->rbpcmd_simple.vfid = rbp->svfid; + + if (rbp->srbp) { + sdd->read_cmd.rbp = rbp->srbp; + sdd->read_cmd.rdtype = DPAA2_RBP_MEM_RW; + } else { + sdd->read_cmd.rdtype = dpaa2_coherent_no_alloc_cache; + } + sdd++; + /* destination */ + sdd->write_cmd.portid = rbp->dportid; + sdd->rbpcmd_simple.pfid = rbp->dpfid; + sdd->rbpcmd_simple.vfid = rbp->dvfid; + + if (rbp->drbp) { + sdd->write_cmd.rbp = rbp->drbp; + sdd->write_cmd.wrttype = DPAA2_RBP_MEM_RW; + } else { + sdd->write_cmd.wrttype = dpaa2_coherent_alloc_cache; + } + } else { + sdd->read_cmd.rdtype = dpaa2_coherent_no_alloc_cache; + sdd++; + sdd->write_cmd.wrttype = dpaa2_coherent_alloc_cache; + } fle++; /* source frame list to source buffer */ if (flags & RTE_QDMA_JOB_SRC_PHY) { @@ -398,31 +442,57 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, DPAA2_SET_FLE_FIN(fle); } -int -rte_qdma_vq_enqueue_multi(uint16_t vq_id, - struct rte_qdma_job **job, - uint16_t nb_jobs) +static inline uint16_t dpdmai_dev_set_fd(struct qbman_fd *fd, + struct rte_qdma_job *job, + struct rte_qdma_rbp *rbp, + uint16_t vq_id) { - struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; - struct qdma_hw_queue *qdma_pq = qdma_vq->hw_queue; - struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; struct qdma_io_meta *io_meta; - struct qbman_fd fd_arr[MAX_TX_RING_SLOTS]; - struct dpaa2_queue *txq; struct qbman_fle *fle; + int ret = 0; + /* + * Get an FLE/SDD from FLE pool. + * Note: IO metadata is before the FLE and SDD memory. + */ + ret = rte_mempool_get(qdma_dev.fle_pool, (void **)(&io_meta)); + if (ret) { + DPAA2_QDMA_DP_DEBUG("Memory alloc failed for FLE"); + return ret; + } + + /* Set the metadata */ + io_meta->cnxt = (size_t)job; + io_meta->id = vq_id; + + fle = (struct qbman_fle *)(io_meta + 1); + + DPAA2_SET_FD_ADDR(fd, DPAA2_VADDR_TO_IOVA(fle)); + DPAA2_SET_FD_COMPOUND_FMT(fd); + DPAA2_SET_FD_FRC(fd, QDMA_SER_CTX); + + /* Populate FLE */ + memset(fle, 0, QDMA_FLE_POOL_SIZE); + dpaa2_qdma_populate_fle(fle, rbp, job->src, job->dest, + job->len, job->flags); + + return 0; +} + +static int +dpdmai_dev_enqueue_multi(struct dpaa2_dpdmai_dev *dpdmai_dev, + uint16_t txq_id, + uint16_t vq_id, + struct rte_qdma_rbp *rbp, + struct rte_qdma_job **job, + uint16_t nb_jobs) +{ + struct qbman_fd fd[RTE_QDMA_BURST_NB_MAX]; + struct dpaa2_queue *txq; struct qbman_eq_desc eqdesc; struct qbman_swp *swp; int ret; uint32_t num_to_send = 0; uint16_t num_tx = 0; - uint16_t num_txed = 0; - - /* Return error in case of wrong lcore_id */ - if (rte_lcore_id() != qdma_vq->lcore_id) { - DPAA2_QDMA_ERR("QDMA enqueue for vqid %d on wrong core", - vq_id); - return -1; - } if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); @@ -433,7 +503,7 @@ rte_qdma_vq_enqueue_multi(uint16_t vq_id, } swp = DPAA2_PER_LCORE_PORTAL; - txq = &(dpdmai_dev->tx_queue[qdma_pq->queue_id]); + txq = &(dpdmai_dev->tx_queue[txq_id]); /* Prepare enqueue descriptor */ qbman_eq_desc_clear(&eqdesc); @@ -441,6 +511,8 @@ rte_qdma_vq_enqueue_multi(uint16_t vq_id, qbman_eq_desc_set_no_orp(&eqdesc, 0); qbman_eq_desc_set_response(&eqdesc, 0, 0); + memset(fd, 0, RTE_QDMA_BURST_NB_MAX * sizeof(struct qbman_fd)); + while (nb_jobs > 0) { uint32_t loop; @@ -448,73 +520,100 @@ rte_qdma_vq_enqueue_multi(uint16_t vq_id, dpaa2_eqcr_size : nb_jobs; for (loop = 0; loop < num_to_send; loop++) { - /* - * Get an FLE/SDD from FLE pool. - * Note: IO metadata is before the FLE and SDD memory. - */ - ret = rte_mempool_get(qdma_dev.fle_pool, - (void **)(&io_meta)); - if (ret) { - DPAA2_QDMA_DP_WARN("Me alloc failed for FLE"); - return ret; + ret = dpdmai_dev_set_fd(&fd[loop], + job[num_tx], rbp, vq_id); + if (ret < 0) { + /* Set nb_jobs to loop, so outer while loop + * breaks out. + */ + nb_jobs = loop; + break; } - /* Set the metadata */ - io_meta->cnxt = (size_t)job[num_tx]; - io_meta->id = vq_id; - - fle = (struct qbman_fle *)(io_meta + 1); - - /* populate Frame descriptor */ - memset(&fd_arr[loop], 0, sizeof(struct qbman_fd)); - DPAA2_SET_FD_ADDR(&fd_arr[loop], - DPAA2_VADDR_TO_IOVA(fle)); - DPAA2_SET_FD_COMPOUND_FMT(&fd_arr[loop]); - DPAA2_SET_FD_FRC(&fd_arr[loop], QDMA_SER_CTX); - - /* Populate FLE */ - memset(fle, 0, QDMA_FLE_POOL_SIZE); - dpaa2_qdma_populate_fle(fle, job[num_tx]->src, - job[num_tx]->dest, - job[num_tx]->len, - job[num_tx]->flags); - num_tx++; } /* Enqueue the packet to the QBMAN */ uint32_t enqueue_loop = 0; - while (enqueue_loop < num_to_send) { + while (enqueue_loop < loop) { enqueue_loop += qbman_swp_enqueue_multiple(swp, &eqdesc, - &fd_arr[enqueue_loop], + &fd[enqueue_loop], NULL, - num_to_send - enqueue_loop); + loop - enqueue_loop); } - - num_txed += num_to_send; - nb_jobs -= num_to_send; + nb_jobs -= loop; } - qdma_vq->num_enqueues += num_txed; - return num_txed; + return num_tx; } int -rte_qdma_vq_enqueue(uint16_t vq_id, - struct rte_qdma_job *job) +rte_qdma_vq_enqueue_multi(uint16_t vq_id, + struct rte_qdma_job **job, + uint16_t nb_jobs) { + struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; + struct qdma_hw_queue *qdma_pq = qdma_vq->hw_queue; + struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; int ret; - ret = rte_qdma_vq_enqueue_multi(vq_id, &job, 1); + DPAA2_QDMA_FUNC_TRACE(); + + /* Return error in case of wrong lcore_id */ + if (rte_lcore_id() != qdma_vq->lcore_id) { + DPAA2_QDMA_ERR("QDMA enqueue for vqid %d on wrong core", + vq_id); + return -EINVAL; + } + + ret = dpdmai_dev_enqueue_multi(dpdmai_dev, + qdma_pq->queue_id, + vq_id, + &qdma_vq->rbp, + job, + nb_jobs); if (ret < 0) { DPAA2_QDMA_ERR("DPDMAI device enqueue failed: %d", ret); return ret; } - return 1; + qdma_vq->num_enqueues += ret; + + return ret; +} + +int +rte_qdma_vq_enqueue(uint16_t vq_id, + struct rte_qdma_job *job) +{ + return rte_qdma_vq_enqueue_multi(vq_id, &job, 1); +} + +static inline uint16_t dpdmai_dev_get_job(const struct qbman_fd *fd, + struct rte_qdma_job **job) +{ + struct qbman_fle *fle; + struct qdma_io_meta *io_meta; + uint16_t vqid; + /* + * Fetch metadata from FLE. job and vq_id were set + * in metadata in the enqueue operation. + */ + fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); + io_meta = (struct qdma_io_meta *)(fle) - 1; + + *job = (struct rte_qdma_job *)(size_t)io_meta->cnxt; + (*job)->status = (DPAA2_GET_FD_ERR(fd) << 8) | + (DPAA2_GET_FD_FRC(fd) & 0xFF); + + vqid = io_meta->id; + + /* Free FLE to the pool */ + rte_mempool_put(qdma_dev.fle_pool, io_meta); + + return vqid; } -/* Function to receive a QDMA job for a given device and queue*/ static int dpdmai_dev_dequeue_multijob(struct dpaa2_dpdmai_dev *dpdmai_dev, uint16_t rxq_id, @@ -522,16 +621,18 @@ dpdmai_dev_dequeue_multijob(struct dpaa2_dpdmai_dev *dpdmai_dev, struct rte_qdma_job **job, uint16_t nb_jobs) { - struct qdma_io_meta *io_meta; struct dpaa2_queue *rxq; struct qbman_result *dq_storage; struct qbman_pull_desc pulldesc; - const struct qbman_fd *fd; struct qbman_swp *swp; - struct qbman_fle *fle; uint32_t fqid; - uint8_t status; - int ret; + uint8_t status, pending; + uint8_t num_rx = 0; + const struct qbman_fd *fd; + uint16_t vqid; + int ret, next_pull = nb_jobs, num_pulled = 0; + + DPAA2_QDMA_FUNC_TRACE(); if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); @@ -541,77 +642,75 @@ dpdmai_dev_dequeue_multijob(struct dpaa2_dpdmai_dev *dpdmai_dev, } } swp = DPAA2_PER_LCORE_PORTAL; + rxq = &(dpdmai_dev->rx_queue[rxq_id]); - dq_storage = rxq->q_storage->dq_storage[0]; fqid = rxq->fqid; - /* Prepare dequeue descriptor */ - qbman_pull_desc_clear(&pulldesc); - qbman_pull_desc_set_fq(&pulldesc, fqid); - qbman_pull_desc_set_storage(&pulldesc, dq_storage, - (uint64_t)(DPAA2_VADDR_TO_IOVA(dq_storage)), 1); - if (nb_jobs > dpaa2_dqrr_size) - qbman_pull_desc_set_numframes(&pulldesc, dpaa2_dqrr_size); - else - qbman_pull_desc_set_numframes(&pulldesc, nb_jobs); - - while (1) { - if (qbman_swp_pull(swp, &pulldesc)) { - DPAA2_QDMA_DP_WARN("VDQ command not issued. QBMAN busy"); - continue; + do { + dq_storage = rxq->q_storage->dq_storage[0]; + /* Prepare dequeue descriptor */ + qbman_pull_desc_clear(&pulldesc); + qbman_pull_desc_set_fq(&pulldesc, fqid); + qbman_pull_desc_set_storage(&pulldesc, dq_storage, + (uint64_t)(DPAA2_VADDR_TO_IOVA(dq_storage)), 1); + + if (next_pull > dpaa2_dqrr_size) { + qbman_pull_desc_set_numframes(&pulldesc, + dpaa2_dqrr_size); + next_pull -= dpaa2_dqrr_size; + } else { + qbman_pull_desc_set_numframes(&pulldesc, next_pull); + next_pull = 0; } - break; - } - rte_prefetch0((void *)((size_t)(dq_storage + 1))); - /* Check if the previous issued command is completed. */ - while (!qbman_check_command_complete(dq_storage)) - ; + while (1) { + if (qbman_swp_pull(swp, &pulldesc)) { + DPAA2_QDMA_DP_WARN("VDQ command not issued. QBMAN busy"); + /* Portal was busy, try again */ + continue; + } + break; + } - int num_pulled = 0; - int pending = 1; - do { - /* Loop until the dq_storage is updated with - * new token by QBMAN - */ - while (!qbman_check_new_result(dq_storage)) + rte_prefetch0((void *)((size_t)(dq_storage + 1))); + /* Check if the previous issued command is completed. */ + while (!qbman_check_command_complete(dq_storage)) ; - rte_prefetch0((void *)((size_t)(dq_storage + 2))); - /* Check whether Last Pull command is Expired and - * setting Condition for Loop termination - */ - if (qbman_result_DQ_is_pull_complete(dq_storage)) { - pending = 0; - /* Check for valid frame. */ - status = qbman_result_DQ_flags(dq_storage); - if (unlikely((status & - QBMAN_DQ_STAT_VALIDFRAME) == 0)) - continue; - } - fd = qbman_result_DQ_fd(dq_storage); + num_pulled = 0; + pending = 1; - /* - * Fetch metadata from FLE. job and vq_id were set - * in metadata in the enqueue operation. - */ - fle = (struct qbman_fle *) - DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); - io_meta = (struct qdma_io_meta *)(fle) - 1; - if (vq_id) - vq_id[num_pulled] = io_meta->id; + do { + /* Loop until dq_storage is updated + * with new token by QBMAN + */ + while (!qbman_check_new_result(dq_storage)) + ; + rte_prefetch0((void *)((size_t)(dq_storage + 2))); + + if (qbman_result_DQ_is_pull_complete(dq_storage)) { + pending = 0; + /* Check for valid frame. */ + status = qbman_result_DQ_flags(dq_storage); + if (unlikely((status & + QBMAN_DQ_STAT_VALIDFRAME) == 0)) + continue; + } + fd = qbman_result_DQ_fd(dq_storage); - job[num_pulled] = (struct rte_qdma_job *)(size_t)io_meta->cnxt; - job[num_pulled]->status = DPAA2_GET_FD_ERR(fd); + vqid = dpdmai_dev_get_job(fd, &job[num_rx]); + if (vq_id) + vq_id[num_rx] = vqid; - /* Free FLE to the pool */ - rte_mempool_put(qdma_dev.fle_pool, io_meta); + dq_storage++; + num_rx++; + num_pulled++; - dq_storage++; - num_pulled++; - } while (pending && (num_pulled <= dpaa2_dqrr_size)); + } while (pending); + /* Last VDQ provided all packets and more packets are requested */ + } while (next_pull && num_pulled == dpaa2_dqrr_size); - return num_pulled; + return num_rx; } int @@ -666,9 +765,9 @@ rte_qdma_vq_dequeue_multi(uint16_t vq_id, temp_qdma_vq = &qdma_vqs[temp_vq_id[i]]; rte_ring_enqueue(temp_qdma_vq->status_ring, (void *)(job[i])); - ring_count = rte_ring_count( - qdma_vq->status_ring); } + ring_count = rte_ring_count( + qdma_vq->status_ring); } if (ring_count) { @@ -745,6 +844,35 @@ rte_qdma_vq_destroy(uint16_t vq_id) return 0; } +int +rte_qdma_vq_destroy_rbp(uint16_t vq_id) +{ + struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; + + DPAA2_QDMA_FUNC_TRACE(); + + /* In case there are pending jobs on any VQ, return -EBUSY */ + if (qdma_vq->num_enqueues != qdma_vq->num_dequeues) + return -EBUSY; + + rte_spinlock_lock(&qdma_dev.lock); + + if (qdma_vq->exclusive_hw_queue) { + free_hw_queue(qdma_vq->hw_queue); + } else { + if (qdma_vqs->status_ring) + rte_ring_free(qdma_vqs->status_ring); + + put_hw_queue(qdma_vq->hw_queue); + } + + memset(qdma_vq, 0, sizeof(struct qdma_virt_queue)); + + rte_spinlock_lock(&qdma_dev.lock); + + return 0; +} + void rte_qdma_stop(void) { @@ -941,6 +1069,21 @@ dpaa2_dpdmai_dev_init(struct rte_rawdev *rawdev, int dpdmai_id) DPAA2_QDMA_ERR("Adding H/W queue to list failed"); goto init_err; } + + if (!dpaa2_coherent_no_alloc_cache) { + if (dpaa2_svr_family == SVR_LX2160A) { + dpaa2_coherent_no_alloc_cache = + DPAA2_LX2_COHERENT_NO_ALLOCATE_CACHE; + dpaa2_coherent_alloc_cache = + DPAA2_LX2_COHERENT_ALLOCATE_CACHE; + } else { + dpaa2_coherent_no_alloc_cache = + DPAA2_COHERENT_NO_ALLOCATE_CACHE; + dpaa2_coherent_alloc_cache = + DPAA2_COHERENT_ALLOCATE_CACHE; + } + } + DPAA2_QDMA_DEBUG("Initialized dpdmai object successfully"); return 0; diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/dpaa2_qdma.h index 0cbe90255..f15dda694 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.h +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.h @@ -22,28 +22,24 @@ struct qdma_io_meta; /** Notification by FQD_CTX[fqid] */ #define QDMA_SER_CTX (1 << 8) - +#define DPAA2_RBP_MEM_RW 0x0 /** * Source descriptor command read transaction type for RBP=0: * coherent copy of cacheable memory */ -#define DPAA2_SET_SDD_RD_COHERENT(sdd) ((sdd)->cmd = (0xb << 28)) +#define DPAA2_COHERENT_NO_ALLOCATE_CACHE 0xb +#define DPAA2_LX2_COHERENT_NO_ALLOCATE_CACHE 0x7 /** * Destination descriptor command write transaction type for RBP=0: * coherent copy of cacheable memory */ -#define DPAA2_SET_SDD_WR_COHERENT(sdd) ((sdd)->cmd = (0x6 << 28)) +#define DPAA2_COHERENT_ALLOCATE_CACHE 0x6 +#define DPAA2_LX2_COHERENT_ALLOCATE_CACHE 0xb /** Maximum possible H/W Queues on each core */ #define MAX_HW_QUEUE_PER_CORE 64 -/** - * In case of Virtual Queue mode, this specifies the number of - * dequeue the 'qdma_vq_dequeue/multi' API does from the H/W Queue - * in case there is no job present on the Virtual Queue ring. - */ -#define QDMA_DEQUEUE_BUDGET 64 - +#define QDMA_RBP_UPPER_ADDRESS_MASK (0xfff0000000000) /** * Represents a QDMA device. * A single QDMA device exists which is combination of multiple DPDMAI rawdev's. @@ -90,6 +86,8 @@ struct qdma_virt_queue { struct rte_ring *status_ring; /** Associated hw queue */ struct qdma_hw_queue *hw_queue; + /** Route by port */ + struct rte_qdma_rbp rbp; /** Associated lcore id */ uint32_t lcore_id; /** States if this vq is in use or not */ @@ -118,7 +116,7 @@ struct qdma_io_meta { */ uint64_t cnxt; /** VQ ID is stored as a part of metadata of the enqueue command */ - uint64_t id; + uint64_t id; }; /** Source/Destination Descriptor */ @@ -127,9 +125,48 @@ struct qdma_sdd { /** Stride configuration */ uint32_t stride; /** Route-by-port command */ - uint32_t rbpcmd; - uint32_t cmd; -} __attribute__((__packed__)); + union { + uint32_t rbpcmd; + struct rbpcmd_st { + uint32_t vfid:6; + uint32_t rsv4:2; + uint32_t pfid:1; + uint32_t rsv3:7; + uint32_t attr:3; + uint32_t rsv2:1; + uint32_t at:2; + uint32_t vfa:1; + uint32_t ca:1; + uint32_t tc:3; + uint32_t rsv1:5; + } rbpcmd_simple; + }; + union { + uint32_t cmd; + struct rcmd_simple { + uint32_t portid:4; + uint32_t rsv1:14; + uint32_t rbp:1; + uint32_t ssen:1; + uint32_t rthrotl:4; + uint32_t sqos:3; + uint32_t ns:1; + uint32_t rdtype:4; + } read_cmd; + struct wcmd_simple { + uint32_t portid:4; + uint32_t rsv3:10; + uint32_t rsv2:2; + uint32_t lwc:2; + uint32_t rbp:1; + uint32_t dsen:1; + uint32_t rsv1:4; + uint32_t dqos:3; + uint32_t ns:1; + uint32_t wrttype:4; + } write_cmd; + }; +} __attribute__ ((__packed__)); /** Represents a DPDMAI raw device */ struct dpaa2_dpdmai_dev { diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h index e1ccc19e8..bbc66a286 100644 --- a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h +++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h @@ -13,7 +13,7 @@ */ /** Maximum qdma burst size */ -#define RTE_QDMA_BURST_NB_MAX 32 +#define RTE_QDMA_BURST_NB_MAX 256 /** Determines the mode of operation */ enum { @@ -73,6 +73,40 @@ struct rte_qdma_config { int fle_pool_count; }; +struct rte_qdma_rbp { + uint32_t use_ultrashort:1; + uint32_t enable:1; + /** + * dportid: + * 0000 PCI-Express 1 + * 0001 PCI-Express 2 + * 0010 PCI-Express 3 + * 0011 PCI-Express 4 + * 0100 PCI-Express 5 + * 0101 PCI-Express 6 + */ + uint32_t dportid:4; + uint32_t dpfid:2; + uint32_t dvfid:6; + /*using route by port for destination */ + uint32_t drbp:1; + /** + * sportid: + * 0000 PCI-Express 1 + * 0001 PCI-Express 2 + * 0010 PCI-Express 3 + * 0011 PCI-Express 4 + * 0100 PCI-Express 5 + * 0101 PCI-Express 6 + */ + uint32_t sportid:4; + uint32_t spfid:2; + uint32_t svfid:6; + /* using route by port for source */ + uint32_t srbp:1; + uint32_t rsv:4; +}; + /** Provides QDMA device statistics */ struct rte_qdma_vq_stats { /** States if this vq has exclusively associated hw queue */ @@ -105,8 +139,10 @@ struct rte_qdma_job { /** * Status of the transaction. * This is filled in the dequeue operation by the driver. + * upper 8bits acc_err for route by port. + * lower 8bits fd error */ - uint8_t status; + uint16_t status; }; /** @@ -177,6 +213,11 @@ rte_qdma_start(void); int rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags); +/*create vq for route-by-port*/ +int +rte_qdma_vq_create_rbp(uint32_t lcore_id, uint32_t flags, + struct rte_qdma_rbp *rbp); + /** * Enqueue multiple jobs to a Virtual Queue. * If the enqueue is successful, the H/W will perform DMA operations @@ -275,6 +316,21 @@ rte_qdma_vq_stats(uint16_t vq_id, int rte_qdma_vq_destroy(uint16_t vq_id); +/** + * Destroy the RBP specific Virtual Queue specified by vq_id. + * This API can be called from any thread/core. User can create/destroy + * VQ's at runtime. + * + * @param vq_id + * RBP based Virtual Queue ID which needs to be deinialized. + * + * @returns + * - 0: Success. + * - <0: Error code. + */ + +int __rte_experimental +rte_qdma_vq_destroy_rbp(uint16_t vq_id); /** * Stop QDMA device. */ From patchwork Tue Mar 26 12:18:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 161217 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5143948jan; Tue, 26 Mar 2019 05:18:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqybKDUYVG8TtFwye6xTNag0uZ6g94ntrDYjILE6hfD2gIvZwbckZLL1JSvwigiVbNg6PI1Q X-Received: by 2002:a50:ad72:: with SMTP id z47mr20140169edc.270.1553602728359; Tue, 26 Mar 2019 05:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553602728; cv=none; d=google.com; s=arc-20160816; b=iKPKRsCH+Kv27ild9kJI0diEZTQu2F3jPkUCMthmUizzZJm9ky2aYjWqdHEIU/NceR MlSPfkuURbJfMY3Bbg7VWfeZ46BMbBHFf2WZ0ervByMez3XvxFEgtNGSu0dF5YaUdgUN GLwreWrd1dUf5eL0v3R/VeZfaAgIJfR8DXWkUJeGsaWi8mHNahuKmB8mK8V8srHMbbe1 YihCOqm0R0jSPBXppT0ImgUTzbTW+wPtVpPquzIuCf8AfdddZqaITiEmCjlsNQVFfhVb wcsO+V8zeFLXXuswCgNjvTLrQviuB8Te4ho1e2fI4tIZQcDKEactGtijTirrBNcUoMuX 0e3g== 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 :in-reply-to:references:message-id:date:thread-index:thread-topic:cc :to:from:dkim-signature; bh=x9Y9pC+JJh2FigZvmplzaNB2fLzZeNRUfq2rfe3U4/Y=; b=g/VY+418upZWPzSQ/KN/iwiuvUF68cTM60xDw/XD+JzeOd5kBqJZqxX8/PD3T3kbsM Hv62ryQ1IbSPs2zWqLmOaMoQ1cRIAa6CW/pQjb5D+G8DTc7OYWoGLI3xB5g2VnOtpHLX yCT216BmWhV7mDNjlydAC4dAZ/0bxr2/Mrz7R2lPcVOzkpht3KeqGhzvtAU0EqICTyJO TOopdCaXTy7VB1Jem3kkNy1cNE1WdfIG6g1FOJcJmSjWLFC9o6eb/laUjCK9T5qYm9/u TblS5/cGXG5XgtaiB6OQtq+6GJ2r1NzETZo2jrTBXlni7JsPlOh8m6tL/4Q8Js+ft287 rCUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ALu1PFJB; 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 g7si87645ejp.74.2019.03.26.05.18.48; Tue, 26 Mar 2019 05:18: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=ALu1PFJB; 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 092E94CE4; Tue, 26 Mar 2019 13:18:19 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80083.outbound.protection.outlook.com [40.107.8.83]) by dpdk.org (Postfix) with ESMTP id BA31B4CAB for ; Tue, 26 Mar 2019 13:18:12 +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=x9Y9pC+JJh2FigZvmplzaNB2fLzZeNRUfq2rfe3U4/Y=; b=ALu1PFJBeznaoMhpT9WykuHb2AJaF2yB5o8JxICGr/zOQxHjPmOKy1HKl4s+NU6a9iqlslxYmDW4AkK7w0psfTxZ4cP7Cw534DB420/H+ENDvn9sH5kW7HzWTwtAFhKs6aYXKFYt9wGlo1wsOtqEPgA5iZSujmSgk71WxmiiQIM= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2575.eurprd04.prod.outlook.com (10.168.65.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Tue, 26 Mar 2019 12:18:11 +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:18:11 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: Shreyansh Jain , Nipun Gupta Thread-Topic: [PATCH 5/5] raw/dpaa2x: remove rte logs from data path Thread-Index: AQHU48347U9V8C/Bbk+bClyr5+PbNQ== Date: Tue, 26 Mar 2019 12:18:08 +0000 Message-ID: <20190326121610.28024-5-hemant.agrawal@nxp.com> References: <20190326121610.28024-1-hemant.agrawal@nxp.com> In-Reply-To: <20190326121610.28024-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: BM1PR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::31) 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: cd24dfb2-63db-47e2-509b-08d6b1e51b30 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:VI1PR0401MB2575; x-ms-traffictypediagnostic: VI1PR0401MB2575: x-microsoft-antispam-prvs: x-forefront-prvs: 09888BC01D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(136003)(346002)(39860400002)(376002)(199004)(189003)(186003)(36756003)(44832011)(53936002)(4326008)(76176011)(71190400001)(11346002)(71200400001)(476003)(6436002)(2616005)(5640700003)(486006)(2501003)(6666004)(446003)(6486002)(25786009)(14454004)(99286004)(256004)(2351001)(2906002)(105586002)(86362001)(5660300002)(106356001)(81166006)(7736002)(1730700003)(1076003)(3846002)(97736004)(81156014)(52116002)(54906003)(66066001)(6116002)(68736007)(6506007)(386003)(478600001)(26005)(316002)(6916009)(6512007)(50226002)(8936002)(8676002)(102836004)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2575; 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: l6Rvbyz7lv/MxiKaagzWR48diFRkCdd47tdxkgCiWGexKopTH3t//HwR0zgJXWI2w0FUjOMHHqjAZeHVWiMWhChZg+LS1H6wWeimjw825wp6KfUsI5imN2PqtPYH/E+IeoGym6Miuvg8BeWIW2frieqdtnFRPHyu4svRbggDvTdnGdOIE5qDIYE5KDluvWu3a3bTMzX20NWQw/zsjiJsyTNVPsFK+WaqmCIf5tNCuC/EoO6kDW6xDoSMgPcRQYyUuD4uq1LVdikwsTSrkBUb6wOrTrUwoxN6Th/kzDfZ7YYAGpc8lbohOqEbLEMfxEbYVDbE67n7w0sFLKnIZ94pZKbW6Elh1MXLUk84NlBMdWaSJEJowPUj7ht5hX4Jf4etMJdF2wZF6moSja5h9u7QY11+j56JltK4yLR3vf28KWc= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd24dfb2-63db-47e2-509b-08d6b1e51b30 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2019 12:18:08.4594 (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: VI1PR0401MB2575 Subject: [dpdk-dev] [PATCH 5/5] raw/dpaa2x: remove rte logs from data path 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: Nipun Gupta The runtime traces shall not be present in datapath Signed-off-by: Nipun Gupta --- drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 4 ---- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 8 -------- drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) -- 2.17.1 diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c index 469960a3e..7d311b2ee 100644 --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c @@ -67,8 +67,6 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev, struct qbman_swp *swp; int ret; - DPAA2_CMDIF_FUNC_TRACE(); - RTE_SET_USED(count); if (unlikely(!DPAA2_PER_LCORE_DPIO)) { @@ -128,8 +126,6 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev, uint8_t status; int ret; - DPAA2_CMDIF_FUNC_TRACE(); - RTE_SET_USED(count); if (unlikely(!DPAA2_PER_LCORE_DPIO)) { diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index 7c547d55f..215396933 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -378,8 +378,6 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, { struct qdma_sdd *sdd; - DPAA2_QDMA_FUNC_TRACE(); - sdd = (struct qdma_sdd *)((uint8_t *)(fle) + (DPAA2_QDMA_MAX_FLE * sizeof(struct qbman_fle))); @@ -557,8 +555,6 @@ rte_qdma_vq_enqueue_multi(uint16_t vq_id, struct dpaa2_dpdmai_dev *dpdmai_dev = qdma_pq->dpdmai_dev; int ret; - DPAA2_QDMA_FUNC_TRACE(); - /* Return error in case of wrong lcore_id */ if (rte_lcore_id() != qdma_vq->lcore_id) { DPAA2_QDMA_ERR("QDMA enqueue for vqid %d on wrong core", @@ -632,8 +628,6 @@ dpdmai_dev_dequeue_multijob(struct dpaa2_dpdmai_dev *dpdmai_dev, uint16_t vqid; int ret, next_pull = nb_jobs, num_pulled = 0; - DPAA2_QDMA_FUNC_TRACE(); - if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { @@ -803,8 +797,6 @@ rte_qdma_vq_stats(uint16_t vq_id, { struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id]; - DPAA2_QDMA_FUNC_TRACE(); - if (qdma_vq->in_use) { vq_status->exclusive_hw_queue = qdma_vq->exclusive_hw_queue; vq_status->lcore_id = qdma_vq->lcore_id; diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h index bbc66a286..ce491d5d4 100644 --- a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h +++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h @@ -329,7 +329,7 @@ rte_qdma_vq_destroy(uint16_t vq_id); * - <0: Error code. */ -int __rte_experimental +int rte_qdma_vq_destroy_rbp(uint16_t vq_id); /** * Stop QDMA device.