From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0068.outbound.protection.outlook.com [104.47.40.68]) by dpdk.org (Postfix) with ESMTP id 4895CFB1A for ; Fri, 3 Mar 2017 08:15:26 +0100 (CET) Received: from BLUPR0301CA0007.namprd03.prod.outlook.com (10.162.113.145) by BY2PR0301MB0726.namprd03.prod.outlook.com (10.160.63.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Fri, 3 Mar 2017 07:15:24 +0000 Received: from BN1AFFO11FD009.protection.gbl (2a01:111:f400:7c10::163) by BLUPR0301CA0007.outlook.office365.com (2a01:111:e400:5259::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12 via Frontend Transport; Fri, 3 Mar 2017 07:15:23 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none; caviumnetworks.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 BN1AFFO11FD009.mail.protection.outlook.com (10.58.52.69) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.933.11 via Frontend Transport; Fri, 3 Mar 2017 07:15:22 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v237D50m005035; Fri, 3 Mar 2017 00:15:19 -0700 From: Hemant Agrawal To: CC: , , , , , Date: Fri, 3 Mar 2017 18:17:02 +0530 Message-ID: <1488545223-25739-46-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1488545223-25739-1-git-send-email-hemant.agrawal@nxp.com> References: <1487205586-6785-1-git-send-email-hemant.agrawal@nxp.com> <1488545223-25739-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131329989230172812; (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)(7916002)(336005)(39400400002)(39450400003)(39840400002)(39410400002)(39380400002)(39850400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(8936002)(36756003)(86362001)(104016004)(105606002)(50226002)(81166006)(33646002)(8676002)(50986999)(189998001)(106466001)(2351001)(76176999)(626004)(305945005)(48376002)(54906002)(50466002)(356003)(53936002)(8656002)(4326008)(85426001)(2906002)(5660300001)(110136004)(77096006)(92566002)(38730400002)(47776003)(6916009)(5003940100001)(2950100002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0726; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD009; 1:tL9UACHbw/BiXUCDs0vSNYdK4w4PHtk30LtxCGu05w6WsMXPW4EOjQ6Cynw7Rl2c8vVFoD3S4jFqoHHWFvfSURUWrK+/50OTDgSRC3jB0i8k7luR27lBbhvszBbRTTZSWaVYsu/1bu8EAdiWE3jKMWvvQPZLPaQbvmKQCJWm7flPA9R0nuQpG6INDA843ZXU5ZVYpyjJCV8Yb+c6+LRRMXWWAAK9BTpsWWXSse91EDTYRCtohEJ/ETbFcDVOtmE+5o1i/TcnN6TrdPlOu2FqEFBDYIfYib48VmlQm/3WwCgbutJCuY45GEd6o0Y5ZfEOKg/oZtEFwFrO063m3hp+ZuKQrvVUi4a2DYViVQ3mUoG88epvo3CWZkRnXMLodrHIolLJ/vLZki3N/IY0FU4MxSDNYtbGEbs7sW08SN71ml8+UFrocHmkrbzwPWLMa0vfkcDDcJt1TVyVWVm3K7e8gjD0wA5Z50GfB0TodWMfsMnskOxnOMC05FkRuJgCApO/n/jPd20rZpAu+6pBnCi8y/1a4+5YfjCwdDONHueTekQbE3EAdllMFzOcfRp0aYzULRWA96vBtworhYwbCyQIWnJIshi6+uRmfXCYCqE4ehiJzPwl+NBncly+plYTsdmLh9xzkTTzeq7qD871Ckz/wQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 64dedd4f-a8fc-45ae-392c-08d462050ee0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB0726; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0726; 3:zTsBH2yiOd9GmXZ7gMld/kfIjrBL7iFtZufyY3oeCwBUAAHYkxJdM5TMqmxms9FVXDU3vt7tQX07msPgMy4Z8oLbApT9F6AVb7u7nng2rF4BftB7UAkjDJ/lp5XrjFPwIVVHsluNfVs+VWrsJ7I1BxeTx+lVPy+ePUrUSFtJvofd0HBnwhk+JhlKLV/bMcoFQs7heA5WBI6ma5MsJHI4ifn2qyACgBtH+HluMWqqVA1zMN/7At2d/todWLpY2lbtbZpBeMWx3aT4qnB281fVhCQHr+2uAcT8XqKr8vEPIgl5bpO1d80m0qdmHWyirC2vZYxl280Fw6hMjY4+8MI8URZIELDCWG5e5PJQZupuku8XJstCaVWEiUsRbiEGh+mo; 25:UzuZZgektqKmrmjukN9C6DVQ9yUn1FO8v2FZPg0lyFVKrc3zVtNSi/w7LkbeRA+WS2HK/EnI//AF654LDt2T4TG005PeVO7AXrdTCE3fJIwwDHvqebFxpZXHXjCmhQvR8+Yy+90reZnHN8e2XeATEHXOWcfjX+w1mPvmaUbIy1s5M3X1Lqp6ys8uY453tYKHv09umOINSKe19pSyrTGahFfWqYxG9Ko626cFn5PWaFTKROSjitdBy7lVlbBsobWAsSdZbw18T/nySE4C/WL0LCh1El+Ee9ki/uPvG/RLB15wQ6a4tjgoHvYHnddWJmt8PhH7PCrbr8H9mtTUDpPK6TWpPhoe6AGZKjEmy+b8GY4I/kJyAqbj8hlRBdqoyA8fMsTfUr+cDe52oxepZ2w2U2NHdt0LgBFTYwj0iWK0jKrN/exsni4bYdMRJFgwQnxa9+RQ3vm6JLte1wMwrRhbrw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0726; 31:7CamC6iwgCgcJbEtRkO+roZOoE04ghSVNpExrcsk/qJwsKoGZIx9s3kT3OClAoXlVK8r5xDueERtlvzoBuTf2LTantnoEfiwZ2h3sGVD7EVVv38XN/FI19UQYs8O/TRgxFjFYZCu2MizWzu4is+HUxWYe27lt3+9HCmWWqVdCtEZGQwiWSo72bhgWQZWIerKQSDbGlp7r/X7dyK3iLkw34Ker7pdGeKwz+/y4dV26UGueTqeAPc3Dq5GcyW8WDnc4jMZjDMptr+nkSKAKcKd9g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13015025)(13017025)(13023025)(13024025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123563025)(20161123561025)(20161123559025)(20161123556025); SRVR:BY2PR0301MB0726; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0726; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0726; 4:KDuNFkyC6ifUQIxP5KLQ4wnk9krSgwwcus7tuuV1/6qKjLSO9cDHofq0ENF0na8IseOwaZeapIOwHrWq6K+f/w3A9ubTbzTifYiNSkGgS6zkbzmkiJGOm49GoLnS0B2KTWE0p3ZAtATh8W90WDO6bsDtkd2bfF50x55DeQb56EwWo0LYhwGuH16sLiW4i1O9pcPPBekVZgQPriER0nZQpJ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32/isQcliOSbgfCEo2zywC?= =?us-ascii?Q?RSIWkEWDAShYfg8acVhXpZNkIuuDckHxAfjqKCWiK?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0726; 6:Jx1TGvVBLcHY+WzzvmnEnZ5xuepRLURCy7noYaaiFxriuso/p8wZMIOtpeVhw27mErwiPNuj7WX7hOPWAGSLtZjVuM0iKu9PCxABrySigExpWMa9IZLZu392/pYS5mMj7ngrXGJg7deUmDk/oeC2Aq/NR1D/n+JRv81pelMvC5+peVR+U0V47wic5TffXuiE/dmSU+3qcdLuWJQwPoKBGOjAyLmsE2Hl+tUEII6zjzSsotsOsnWSMdqi/24DQ4l1ZwZaAYibBlCaF/TnAoiN8r2Mcl3SQw4TW6dJdejyfKvEGQ1Li7eZXqZLtBatSXGHCJH3MU8eDOMjMN9K68XeOjezWqt3LR9nEt49Zd/hNBixiCo7QGskBAKApsbl4x7+/fjYH1Lc7Wr2cjE3yT02FUCa2CWxl8BgW3tigZ2WQlA=; 5:Z2hdWvszqxnwr+zmAqEaXik9lQAd8xfLm448KoNXjYzTHZ0Q8UpJxbyHRh0BmEOWaN6WoyrY0NBbOEvlchK5hVXzXrupX0+V99b6GwSsvIBRgZCeNOS8B+jrn1B5KfA/Zy5wPFJK32Y0bAyaJ9F5LM8uKTVhs2btR8sFY+7+QfcOYbFbSPZC4uSrDfm4qAmK; 24:+ELuv+Rdk/kfBUcx1WvPKe6MuG/ello3zv7wxyOp9va/eO6rQpUDwEwCU+u49sJnk8LUuyP4QVO35m4AMoqBz8XchIp8oXUqNPIH3PMG9lM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0726; 7:XxuSBcUwD0mSHohCd3BaF4XXv/YkOYl7S8LcvT6IaoYtdRmuD1Y0y4WMn0hexyar6xD9UfYugd0XGLevO7j6tdDQ5f/mfwbF7egFSciboz4+yEby9fS679eQhd0DT8a8hOBdeH4P5LW7XIP5MKXhfWBJ/f0APZ56Q256OYX8BCq3HuMBWpNenCb2UOGHQj4Wq55KCe2HnDqRvJDxwaZ+13dGhxfrs9Mije562qTx8lrazDzdzXn8JNKSRz7D7JanXBVq/ysXUuzVKTK8mKXaBflbSv34S6O1Z8nV7eb5FmiYhFkcU8vbWg5/96WSpKUAiY9u0PoBI0fw8wbdGbYVFg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 07:15:22.8144 (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: BY2PR0301MB0726 Subject: [dpdk-dev] [PATCHv8 45/46] 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: Fri, 03 Mar 2017 07:15:26 -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 bd1f643..c80d6c5 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -407,3 +407,35 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void) 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 @@ struct dpaa2_io_portal_t { /* 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 e357435..97d6b15 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; -- 1.9.1