From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0055.outbound.protection.outlook.com [104.47.41.55]) by dpdk.org (Postfix) with ESMTP id 634D81B161 for ; Fri, 12 Jan 2018 16:08:05 +0100 (CET) Received: from MWHPR03CA0047.namprd03.prod.outlook.com (10.174.173.164) by CY4PR03MB2693.namprd03.prod.outlook.com (10.173.43.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Fri, 12 Jan 2018 15:08:04 +0000 Received: from BL2FFO11FD052.protection.gbl (2a01:111:f400:7c09::193) by MWHPR03CA0047.outlook.office365.com (2603:10b6:301:3b::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.386.5 via Frontend Transport; Fri, 12 Jan 2018 15:08:04 +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 BL2FFO11FD052.mail.protection.outlook.com (10.173.161.214) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Fri, 12 Jan 2018 15:08:03 +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 w0CF7oOw020468; Fri, 12 Jan 2018 08:07:57 -0700 From: Nipun Gupta To: CC: , , Nipun Gupta Date: Sat, 13 Jan 2018 02:52:57 +0530 Message-ID: <1515792181-11836-3-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515792181-11836-1-git-send-email-nipun.gupta@nxp.com> References: <1515792181-11836-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131602432832317903; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(39380400002)(396003)(376002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(54906003)(16586007)(296002)(316002)(77096006)(356003)(47776003)(59450400001)(8656006)(53936002)(105606002)(2351001)(106466001)(85426001)(305945005)(5660300001)(2906002)(498600001)(81156014)(68736007)(51416003)(76176011)(8676002)(104016004)(81166006)(97736004)(575784001)(4326008)(86362001)(8936002)(36756003)(50466002)(48376002)(2950100002)(6916009)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2693; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD052; 1:Klgxc8OeNpKJR8DKAdvQZq4XE693l9G/+fDncIij6VnBgbz0CMX7f7DVgmAa6JWVBSUtxD4cAIwn4alwhnop1OmzPlQItv3z9k7jGHrggomd5daweoQgFn3+43VCge/y MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d24c827-d076-4550-29cf-08d559ce4703 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020083)(5600026)(4604075)(2017052603307); SRVR:CY4PR03MB2693; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 3:Q1mfjEY942XsxZaFlScmAOvk7e2e91v6IvZ59cjT/Jr/YRWb0cYbT1F5FXJ3Ij492XWIkP0+5n9iXhKjE/o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5SRGbn7gCaaMtBj1vCa3Jt2taTR4TdXCz1m2G9KClFq62iki1Re1ap8mgtfRaeGFLuGOAJhNBC/iTbR6LdURYK0UcdnhHIWRTBwFOVk8YZP0nQQLTEn7p5807Rx0ze6vU/IeulZKA/8fsyelmZfYAD6ula9d3OYI21d9ayEsL3K5FQ2HJglE1FqbQIcMvNGpRPmrQ== 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)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231023)(944501144)(3002001)(6055026)(6096035)(20161123565025)(201703131430075)(201703131520075)(201703131433075)(201703131448075)(201703151042153)(20161123559100)(20161123561025)(20161123556025)(20161123563025)(201708071742011); SRVR:CY4PR03MB2693; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2693; X-Forefront-PRVS: 0550778858 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2693; 23:S9A64h9LqfYrDJUfcrhTy5JF77A7E2m5lbwKKbaKL?= =?us-ascii?Q?oJlgcdSTGhTbv8PJY3F+pSKYPoL9Hao5SmNHy70QQbRUyOjCFHjYbBtNcNqY?= =?us-ascii?Q?kjbrbBrhX+xZIZsQem85UeDnqvxcDpXmHmX20WKmH+hdzNF98GZyCOU2nLR/?= =?us-ascii?Q?rwNc+GMghCxHC9t3LlzjA4sPZKxuvFzG/UwatM/p6TPTSs00ATFT7Ty0xkIc?= =?us-ascii?Q?uNU9dTu243bVG25GTv1AZsD+TNerekOyXayzytBZ4VdDdWSnvRwqgqGA2+85?= =?us-ascii?Q?OUSI0jH2tcSmLEm1Mx3AxwtdqRZj0A87BC/73y4dudE8MYn+rEhNHFHMEQwE?= =?us-ascii?Q?bj64Jv+U03ByKj1QND1Ek0ng3+7MVqkVsX5drFOxhpDOp6y3FyrIEBjY7TV9?= =?us-ascii?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DLuwxwsexeEBOpXMaEEyahtNJpKpq4FzectC1wwp3as8CokboYqj/MczN1t0jrpCkUC/EjakuYSa3J2Vku+y3w+XPEtp/r1qlR4W7Q1IkZBLeKqbOfM2oUuMG6Dwp9ctO+qbZ1Mk+JwgJxz1WJg4stJFQggu5ZaaUDiQ/3wiYayhXqs+YFBoYlNis99YiQUkTddlUlnIsTcxhBAa4c9IMFc+PCw==; 5:ohdlBTY0Z+VUoZT+6f0GiiTm8uZ2mVPMpn9ikjfna7SUqY60XmGe6iGRAz5xh7v4ifQGUdwq/LdePzUwgDBReidw5YtmP4pLS8UeI7IyfEElzDpOa4kfORrsm40bWf2b0To5/KNdOyAxdad3FrAR4sIJqAKbl8qAXGF3QvWrgZM=; 24:mY9qNlV2TZSJz1ebflffmUOVMaMHYFdg9HdLBCt9ibb0G/niELPsa4ChocLrv11cNlrYEQyHlg9eKPz+CEd7LTWturjfNZXChNmuJ2KtGPA=; 7:KYYyfIv735ZDHkWe7QlofThVhxuq1Zn2W+mSXN6TgozSELS4OrzA7eJEkIeccSm4M4opkJc/Llo4lxAFOsItN10jx/dYZ2SMLV58N6THD33O5LR9o9BTUH8cCz5gGbODdsMORCdwbI7vuFQzv6ySiAQbEhZBrfUjYJLFWHcmyOoWBMjTIhL1lw4Sspx7vqif5aN5a5W6ERWcUoY3vyI/i+k3lIufiat091JJk8SF96xr7E/Sn0z/H3bHNEC9Bbvu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 15:08:03.0601 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d24c827-d076-4550-29cf-08d559ce4703 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: CY4PR03MB2693 Subject: [dpdk-dev] [PATCH 2/6 v2] bus/fslmc: introduce API to consume dqrr using index 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: Fri, 12 Jan 2018 15:08:05 -0000 A new API qbman_swp_dqrr_idx_consume is defined which takes input as DQRR index to consume corresponding DQRR entry. Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h | 7 +++++++ drivers/bus/fslmc/qbman/qbman_portal.c | 7 +++++++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 1 + 3 files changed, 15 insertions(+) diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h index 019deae..10f38ca 100644 --- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h +++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h @@ -389,6 +389,13 @@ void qbman_pull_desc_set_channel(struct qbman_pull_desc *d, uint32_t chid, void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq); /** + * qbman_swp_dqrr_idx_consume() - Given the DQRR index consume the DQRR entry + * @s: the software portal object. + * @dqrr_index: the DQRR index entry to be consumed. + */ +void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index); + +/** * qbman_get_dqrr_idx() - Get dqrr index from the given dqrr * @dqrr: the given dqrr object. * diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c index b5c8b50..b02dfa2 100644 --- a/drivers/bus/fslmc/qbman/qbman_portal.c +++ b/drivers/bus/fslmc/qbman/qbman_portal.c @@ -859,6 +859,13 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, qbman_cinh_write(&s->sys, QBMAN_CINH_SWP_DCAP, QBMAN_IDX_FROM_DQRR(dq)); } +/* Consume DQRR entries previously returned from qbman_swp_dqrr_next(). */ +void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, + uint8_t dqrr_index) +{ + qbman_cinh_write(&s->sys, QBMAN_CINH_SWP_DCAP, dqrr_index); +} + /*********************************/ /* Polling user-provided storage */ /*********************************/ diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index f59fc67..17e0ee4 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -97,5 +97,6 @@ DPDK_18.02 { dpaa2_virt_mode; qbman_fq_query_state; qbman_fq_state_frame_count; + qbman_swp_dqrr_idx_consume; } DPDK_17.11; -- 1.9.1