From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0063.outbound.protection.outlook.com [104.47.40.63]) by dpdk.org (Postfix) with ESMTP id C0712D0FC for ; Sun, 9 Apr 2017 09:49:14 +0200 (CEST) Received: from BY2PR03CA052.namprd03.prod.outlook.com (10.141.249.25) by DM5PR03MB3113.namprd03.prod.outlook.com (10.174.190.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Sun, 9 Apr 2017 07:49:13 +0000 Received: from BN1BFFO11FD023.protection.gbl (2a01:111:f400:7c10::1:132) by BY2PR03CA052.outlook.office365.com (2a01:111:e400:2c5d::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17 via Frontend Transport; Sun, 9 Apr 2017 07:49:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.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 BN1BFFO11FD023.mail.protection.outlook.com (10.58.144.86) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1019.14 via Frontend Transport; Sun, 9 Apr 2017 07:49:11 +0000 Received: from DTS-02.ap.freescale.net (DTS-02.ap.freescale.net [10.232.132.223]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v397mBLe024015; Sun, 9 Apr 2017 00:49:09 -0700 From: Hemant Agrawal To: , CC: , , Date: Sun, 9 Apr 2017 13:20:24 +0530 Message-ID: <1491724224-6319-22-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491724224-6319-1-git-send-email-hemant.agrawal@nxp.com> References: <1489754838-1455-1-git-send-email-hemant.agrawal@nxp.com> <1491724224-6319-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131361977518745281; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39450400003)(39860400002)(39840400002)(39380400002)(39400400002)(39410400002)(39850400002)(2980300002)(1110001)(1109001)(3190300001)(339900001)(189002)(199003)(9170700003)(2906002)(53936002)(54906002)(105606002)(106466001)(104016004)(5003940100001)(4326008)(33646002)(8936002)(86362001)(2950100002)(6666003)(47776003)(38730400002)(8656002)(76176999)(50986999)(36756003)(50466002)(77096006)(85426001)(81166006)(50226002)(305945005)(8676002)(189998001)(48376002)(356003)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB3113; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD023; 1:ygUbasr4cki92tfO+hTLpwLiAxilde5dAfL+++l4ZYOPrpjCqKO8Xquid+JSNI7WOMDe3B+H0sXcEZ+TQ2mE8z7ylZDNH70EFi9cRjtO/msX40cgxGMZQgGHnRaAz6tUKIJMKCQKV0KraeOYvDoZcylg/u2ntQayhCFIeEBxRZZYG8CVxfUl5dA3RaxPX1AWOPe8tQ5BXM9KXAUUiNu/S16e10+l8vHv9uQ9hhLh6ts1GYu0HKxlorkXHqJ9vI65+vaJ+3wAsllO4Ib7D5ia1/CVnF/b/5Qxz6FpO7KTMt6NRJWZPpmlfqH84Mt9PWqJLpI2GUFAJSH3ApqUa86g0hvz+vCib0R9jykYqAxx8eKclx2xkCO6aguNlLrSFF2IS+x/UvP8lqyf2/QjMNv1XNSQMfmCmKP5JP2B/ilIfddlE/lGyvOU1NLDTDFbmL59W1+grdXuF2eQ0fwTH4YjfNDGlc8YeRVREmeQo+yJyVXJP2+ZGJIF0XQcNtJOtql116OHF8MXAuvyCO92MgseJIYflmgiweWh/lJpCtiv5MPG+Nl5CAjNfAlX513COoDYpnMLr1SOGKVXxzHVIeTqNBafcCZKfB/JqfF9IBEmxXL5kh0pDnfccCQ6ljZKkm9vuzuOEhNUPmvckCa2Gpd4vBqmRcVZ5TQj3fzicdARNUwMAgX1G5jyaA+hflb2xKRA MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 678591e3-c9e7-405b-0560-08d47f1ce974 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:DM5PR03MB3113; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 3:cnuGSrQy4ZOipMjpGkH9aDmQyz2tUXAQvcPrrbJjYFy4LQfls91XThdoCnPIuOiJN3KtycMAU9rIvfYHpPF9h/af8j4EtaxS2GqKzPn4OcVdJrUv2kYHlb8qXfCR5dGaGUeXrtj/bM/uSIlWkzsDFI/FjoUlqouJ/rFXrgaFcUlRMBbwBlpqGab4E1e3EVwt5LNTtqe0le9frh/fC8OIkgJfxnM9uqh7PDllb9IANxARmEJ3OnVOe8DYv3twZNw9/B1IKYthmAjvTV/tandvXHHces0lmZbqYLRgdgkhl54xeQhC7YIhxC/QMMj6NFuw/1OTsyp0NA5Xyph32tJgdq60eh0ePw+1kczsF/4Jl1bCrPSzaksMY1P2Gsg1MdKTP85+lekRIWZ/0f0DRCBxDWO/2Tc9Jtmx1kyepLC7DTBBMAFYAKqh3KXy493+ygQp; 25:iWJzZ45O/wayzXg7aXkBwurnB48Pgkc0aLTNGbXumfxp9YpdKtzZE3kbJ+Q9P+ER/iQIAHjr/Rvp6l36676EDL+4UNOkzbmuJdWiBGs6RTvGWmV/Rbu/GifK6NfPTe+zGGh1z7ZxOl5F3rXl7G5OWLmX8QHrGjC1Q+gUNrGs96wmuImVe62cRue8iB/wvEkX18ubesDnsIXtrUUYxkplaBzNe8J+imtgChud8hav61WyiO2NN0WFfT6PcHUt+VKQuZgN4M+783Bt2FAW0YJnmE/1jklP4NUclCIHk9MI14/E9lWsZu+ePZcnmlk4xG4da1+eFNqW5GH1aFRC2OFovm6o93SBxQgGxH29DFfBvjkXSi7+3y4Ov0aA3Kk8x/X7FguFnbEtc04I7QeUDvJfos6pOO9q1IyJXXqpw9CR6l2tYSPU8AvrtcHzeywQcRox X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 31:Rrd1B4GA56iYA1tNkg6tgdCL37hqzQv+0bQWqL0VolHCvx0zKP6+DqmCAj8TuO5iF0iAoUqi2MfC0rvQdSC72s3sM5wnYol7y1n8K0pYk73xm6gna2IJctAlNXmFOdG7NpTLdrCQHoFbZRzuX/Nrs7vGjof1Df7+v+4tHoToHbrZL3coowH0bJc/olBqX4v1g9W1pMgaMddW2nogZVLbmX7ysOAuQXEW6h08raG2VlHRhn6yEOCSJsaciYzEEzy99xWo7Am53+gDnN7x6AATMQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13018025)(13024025)(13023025)(13017025)(13015025)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259075)(20161123556025)(20161123565025)(20161123561025); SRVR:DM5PR03MB3113; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB3113; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 4:SsaclnpX2u5DsNuVYdWizCefA+yjoD6ZUCr5n3vnrRNaXj/dbuvhgWBw8kka8mLvdcmQT6EdXNSH3IbXWK53RZVdAS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etadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 7:Fw0OFQzSd45YgS4OZn2ySMBnk3uYCi55C+4Fx3IeLGeHgNaW9mwS3JAmTVbKDAIEPCOfRrEsVtjbOd4rgTgxQT7n2rP3cdXBOsnE5KwLZvAk89Pfm4MrR0EcT2T9VmOIcp6rPbfkLSiEA5W/LQ/WPj6SabjhDZrjjfb4EwPEEwLUPYSWB6Pr+fL7GOtmGGrd126U040XDZVoqR2mLUuaOpFdbnIgLJTVMhT8MoIBER0V4SBLGR8KB6R4XAVJkCjrFFp/rd1itPvo/s59fnrVDamoYtVvYPZtE5nJar3lxVQSJy9ReDiD0p45fFMaR6YJUP8rW3hyywcH9xn0ODyGhg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2017 07:49:11.6873 (UTC) 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: DM5PR03MB3113 Subject: [dpdk-dev] [PATCH v3 21/21] bus/fslmc: frame queue based dq storage alloc 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: Sun, 09 Apr 2017 07:49:15 -0000 This patch adds generic functions for allowing dq storage for the frame queues. As the frame queues are common resource for different drivers this is helpful. Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 32 +++++++++++++++++++++++++++++ drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 7 +++++++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 2 ++ 3 files changed, 41 insertions(+) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 0de67e8..82496a3 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -409,3 +409,35 @@ dpaa2_create_dpio_device(struct fslmc_vfio_device *vdev, return 0; } + +void +dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage) +{ + int i = 0; + + for (i = 0; i < NUM_DQS_PER_QUEUE; i++) { + if (q_storage->dq_storage[i]) + rte_free(q_storage->dq_storage[i]); + } +} + +int +dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage) +{ + int i = 0; + + for (i = 0; i < NUM_DQS_PER_QUEUE; i++) { + q_storage->dq_storage[i] = rte_malloc(NULL, + DPAA2_DQRR_RING_SIZE * sizeof(struct qbman_result), + RTE_CACHE_LINE_SIZE); + if (!q_storage->dq_storage[i]) + goto fail; + } + return 0; +fail: + i -= 1; + while (i >= 0) + rte_free(q_storage->dq_storage[i]); + + return -1; +} diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h index b1a1b8f..f2e1168 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h @@ -59,5 +59,12 @@ int dpaa2_affine_qbman_swp(void); /* Affine additional DPIO portal to current crypto processing thread */ int dpaa2_affine_qbman_swp_sec(void); +/* allocate memory for FQ - dq storage */ +int +dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage); + +/* free memory for FQ- dq storage */ +void +dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage); #endif /* _DPAA2_HW_DPIO_H_ */ diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index 09c4fac..a55b250 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -4,7 +4,9 @@ DPDK_17.05 { dpaa2_affine_qbman_swp; dpaa2_affine_qbman_swp_sec; dpaa2_alloc_dpbp_dev; + dpaa2_alloc_dq_storage; dpaa2_free_dpbp_dev; + dpaa2_free_dq_storage; dpbp_disable; dpbp_enable; dpbp_get_attributes; -- 2.1.4