From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0084.outbound.protection.outlook.com [104.47.38.84]) by dpdk.org (Postfix) with ESMTP id 8E4E71B2B8 for ; Wed, 17 Jan 2018 06:24:28 +0100 (CET) Received: from BN6PR03CA0083.namprd03.prod.outlook.com (10.164.122.149) by BN3PR03MB2356.namprd03.prod.outlook.com (10.166.74.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Wed, 17 Jan 2018 05:24:27 +0000 Received: from BN1BFFO11FD009.protection.gbl (2a01:111:f400:7c10::1:110) by BN6PR03CA0083.outlook.office365.com (2603:10b6:405:6f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Wed, 17 Jan 2018 05:24:27 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD009.mail.protection.outlook.com (10.58.144.72) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Wed, 17 Jan 2018 05:24:26 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0H5O79s027272; Tue, 16 Jan 2018 22:24:24 -0700 From: Nipun Gupta To: CC: , , Nipun Gupta Date: Wed, 17 Jan 2018 17:09:13 +0530 Message-ID: <1516189154-28331-6-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516189154-28331-1-git-send-email-nipun.gupta@nxp.com> References: <1515792181-11836-1-git-send-email-nipun.gupta@nxp.com> <1516189154-28331-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131606402671397928; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(39860400002)(39380400002)(376002)(346002)(396003)(2980300002)(1109001)(1110001)(339900001)(22813001)(189003)(199004)(8676002)(8936002)(77096006)(68736007)(36756003)(50226002)(47776003)(51416003)(305945005)(76176011)(86362001)(575784001)(356003)(59450400001)(16586007)(6666003)(81156014)(316002)(54906003)(81166006)(296002)(106466001)(6916009)(2950100002)(8656006)(105606002)(2351001)(508600001)(5660300001)(50466002)(104016004)(53936002)(48376002)(97736004)(4326008)(2906002)(85426001)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2356; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD009; 1:R9jVRJ3EOFI1iosfTq3Xpz66c70r7VcsqG9TYfZAbIAjcEv/G+g6LqHy1/fl388FuVTttpddJPUxRZv8T78XMgZbeEGrohxHdn+U20DlosierxSBBAOWFdPb8Y21qF6Y MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 17c89fad-1ec4-460f-4c28-08d55d6a93dc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2356; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 3:/9mbDVye8o4Zrq9kN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A+G2Z8EnggCPi6HXExEsxiDL1tgQoamxIKB/Jxh5XrlV8KnkXr05wZtWhASA+7ALvtl+KSGeZJgIn+35gMkBc64PBrLdtYEhNACBbHlaZkqW0XlMrJGPceSjU5ByAyCBH+LxxK4UxsFLdMC9ZRv+kXHOC9TmVCwRmfYmuAuS7/SpDWwD/+hqBBgZTi2pzJQLFYBP2BlIEPHoWLcGn12ock9zBTX6G4sSunk7j0k4rw20yHon/tgT2RL/i04Bg2bz4vt34MZp2St0Dw5FoWJtvtjcVOcKNg9Yi2chgfs4vh+8iRUGvM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(2400041)(944501161)(10201501046)(6055026)(6096035)(20161123561025)(20161123565025)(20161123563025)(20161123559100)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(20161123556025)(201708071742011); SRVR:BN3PR03MB2356; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2356; X-Forefront-PRVS: 0555EC8317 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2356; 23:C/06t965yTJy3CQ8QcU29TBWRbOCBogIwGBsaCudT?= =?us-ascii?Q?qg0rESKu3Z7dNKUcdbUxD8u7J5SvrRzEF/LcmR6x5eM3m+Es5YDUuu+7avb4?= =?us-ascii?Q?O6V379yRtZhbZgORXoKpPqdAD35GHEqZC3XM0hKOWercUkv3cGPmqiXGwBpj?= =?us-ascii?Q?FsqxBkgngnRYjQoCeeUTMX+IgixRJa6yBA8q5Gvtfdup7IOTgYQwpuectEjW?= =?us-ascii?Q?my9eqRpyGOJhODJkyO/xCbfS07pZk7879tvV1rCIqGcs+1JC78tnZICra5u1?= =?us-ascii?Q?AmSdaH7eBXrOjokgDfkZiB+BOZeR/9UgSyAuouT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?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 6:OSZYRqyb0VAuusuiPyYwFZKZSpslPhUhWEvfDROKCApsEVbrp8wxOXQo77m439n4682G+kVsHT9pi8uH9dxuHjZI3VAOZaCFjsE9+fU//9mHjvFdfCvIIa5MijLL67N67zrRueQeEgDB9qOPbHaw5XuotffUTdLogqam2T8SD9mgIOTo5RKG0Tu9YiGrTZTFgYQjJR324eiGlKvJZ7eY744nIM/LWponJBnJMArYvat0cXhIrl4/0CQBIlwmEKozgM6BR6ZWdTRK+fxkwvCzC4ku6hZzUXgjSgEFVcyrzT/eCjK5KHcRz04qMjqyWJdH6E9IljEJVjroFb13WvkPaKz16w9dAM/QDe7pFuGYl/0=; 5:XV3/0cNeHVhWncCBR9wXPVkRtcIVHYo1rL4WlfzMgg/KwteV4wPe6GpSFrP3YvNveeJKyS7AAQtBe5KDSbsZ9jPlPjgHsLMLvArqAlMlcYlklzs6u4/G3+cmKJITDvlDQtlGIqknDt/RMlVJBCmAjohDToU97qhBvMNQHMTrKUM=; 24:6gr6NZfGWJ02RLDwLh20B43uKX2p+C26wohgQ+MBvOke3YGE/MMGS2EfEfA+aJ5gyNTN224DinUDWRRRYOvbejgyqEdLVPSi4eCOjNAeksQ=; 7:E1UARIrfKi1b4rtbESXVBRnnpwmovGOegJ2t0kEHfVigU9ZoXIk4pXtkaMbeZ2YzBO3ZLRRAuKiyj9hNfDxmUIz27RwCUYEVlDF9StkXN5r9B3Y67SUE6Kia5rSVYys0aLo3IliO+Q47mHPg35/k46hDOv2SDJ+clbmtolYgi2ByPvlpd84WXYc/ENYd5CgUxXuEMQNtzFBya56eTwwajmWFJTtQAlInTufZAZknDN6u3jdyJ7pqwPtcre47wxwh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2018 05:24:26.9681 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17c89fad-1ec4-460f-4c28-08d55d6a93dc X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2356 Subject: [dpdk-dev] [PATCH 5/6 v3] bus/fslmc: add flag to configure DCA in QBMAN multi Tx 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: Wed, 17 Jan 2018 05:24:28 -0000 With the current QBMAN multi-tx API, we need to create separate enqueue descriptors for each of the packet which is required to be enqueued to the hardware, once we support Atomic Queues (with DCA) in dpaa2 drivers. Creating enqueue descriptor for each packet is costly and have significant performance impact. This patch introduces a flag parameter in the QBMAN multi-tx API, so that DCA configuration (and later on ORP/ODP for ordered queues) can be passed using flags and be updated in the EQCR using this flag. Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal --- drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h | 5 +++++ drivers/bus/fslmc/qbman/qbman_portal.c | 7 +++++++ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1 + drivers/net/dpaa2/dpaa2_rxtx.c | 6 ++++-- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h index 10f38ca..95d785f 100644 --- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h +++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h @@ -566,6 +566,9 @@ static inline int qbman_result_is_SCN(const struct qbman_result *dq) /* volatile dequeue command is expired */ #define QBMAN_DQ_STAT_EXPIRED 0x01 +#define QBMAN_EQCR_DCA_IDXMASK 0x0f +#define QBMAN_ENQUEUE_FLAG_DCA (1ULL << 31) + /** * qbman_result_DQ_flags() - Get the STAT field of dequeue response * @dq: the dequeue result. @@ -956,6 +959,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d, int qbman_swp_enqueue_multiple(struct qbman_swp *s, const struct qbman_eq_desc *d, const struct qbman_fd *fd, + uint32_t *flags, int num_frames); /** * qbman_swp_enqueue_multiple_desc() - Enqueue multiple frames with @@ -963,6 +967,7 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s, * @s: the software portal used for enqueue. * @d: the enqueue descriptor. * @fd: the frame descriptor to be enqueued. + * @flags: bit-mask of QBMAN_ENQUEUE_FLAG_*** options * @num_frames: the number of the frames to be enqueued. * * Return the number of enqueued frames, -EBUSY if the EQCR is not ready. diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c index b02dfa2..2d324f7 100644 --- a/drivers/bus/fslmc/qbman/qbman_portal.c +++ b/drivers/bus/fslmc/qbman/qbman_portal.c @@ -496,6 +496,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d, int qbman_swp_enqueue_multiple(struct qbman_swp *s, const struct qbman_eq_desc *d, const struct qbman_fd *fd, + uint32_t *flags, int num_frames) { uint32_t *p; @@ -538,6 +539,12 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s, p = qbman_cena_write_start_wo_shadow(&s->sys, QBMAN_CENA_SWP_EQCR(eqcr_pi & 7)); p[0] = cl[0] | s->eqcr.pi_vb; + if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) { + struct qbman_eq_desc *d = (struct qbman_eq_desc *)p; + + d->eq.dca = (1 << QB_ENQUEUE_CMD_DCA_EN_SHIFT) | + ((flags[i]) & QBMAN_EQCR_DCA_IDXMASK); + } eqcr_pi++; eqcr_pi &= 0xF; if (!(eqcr_pi & 7)) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 977c49a..a67d979 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -673,6 +673,7 @@ while (loop < frames_to_send) { loop += qbman_swp_enqueue_multiple(swp, &eqdesc, &fd_arr[loop], + NULL, frames_to_send - loop); } diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 53466c3..c43e3a1 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -761,7 +761,8 @@ void __attribute__((hot)) loop = 0; while (loop < frames_to_send) { loop += qbman_swp_enqueue_multiple(swp, &eqdesc, - &fd_arr[loop], frames_to_send - loop); + &fd_arr[loop], NULL, + frames_to_send - loop); } num_tx += frames_to_send; @@ -777,7 +778,8 @@ void __attribute__((hot)) while (i < loop) { i += qbman_swp_enqueue_multiple(swp, &eqdesc, - &fd_arr[i], loop - i); + &fd_arr[i], NULL, + loop - i); } num_tx += loop; } -- 1.9.1