From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0043.outbound.protection.outlook.com [104.47.41.43]) by dpdk.org (Postfix) with ESMTP id 26FDA7CDB for ; Thu, 15 Jun 2017 11:00:28 +0200 (CEST) Received: from BN3PR03CA0096.namprd03.prod.outlook.com (10.174.66.14) by SN2PR03MB2399.namprd03.prod.outlook.com (10.166.210.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Thu, 15 Jun 2017 09:00:26 +0000 Received: from BN1AFFO11FD030.protection.gbl (2a01:111:f400:7c10::126) by BN3PR03CA0096.outlook.office365.com (2603:10b6:400:4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Thu, 15 Jun 2017 09:00:26 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.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 BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1157.12 via Frontend Transport; Thu, 15 Jun 2017 09:00: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 v5F8xWSf012830; Thu, 15 Jun 2017 02:00:23 -0700 From: Nipun Gupta To: CC: , , , , , , Nipun Gupta Date: Thu, 15 Jun 2017 14:28:47 +0530 Message-ID: <1497517136-11824-12-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1497517136-11824-1-git-send-email-nipun.gupta@nxp.com> References: <1495735361-4840-1-git-send-email-nipun.gupta@nxp.com> <1497517136-11824-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131419908265486571; (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)(39380400002)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(39400400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(33646002)(2351001)(2950100002)(8676002)(106466001)(105606002)(6666003)(50466002)(356003)(104016004)(77096006)(81166006)(189998001)(6916009)(110136004)(54906002)(498600001)(38730400002)(8656002)(53936002)(4326008)(305945005)(5660300001)(50986999)(50226002)(76176999)(8936002)(2906002)(86362001)(48376002)(47776003)(85426001)(5003940100001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2399; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD030; 1:r648Gd0v+1BVHSuXZ4pm/WHjhiPG5mz5DSS6X4VGpM6Lkls3Y5hpWYBKb+NkbXPNyUNeXqiVgERd1GC6xbm4YGRvCreVcJiPj1nKBm47bir0+POYvA2JS7U+QktzY4lGl0jwz5f9L68BsGA9O2iBwWpvouYZmVdj7hY3MgaHrWm1HTyl4G+WdM9qrXjENXZLAcqpSgSb6rIcBQpUpSUFsqKOYWDK2MK+rYERm+iuxPhaRmIYDFp75vfrBJl3IRELAMXgtDKMZOV/9fgVsouPGt2fkRMWFzcOuvZFxa8P2rp9lPRmJpFop+y3PGChAN4VKuPV6RPIQGpnlcLBI5/kzhwF/jLoK4Z0FzoVYQCPUOMrrE0T7ObT2skACK+oL+bLglZJxonvoyym7xkOTu3vg7uMaTEbuBU2k1VE1bHUxkkTkayOCuaTU7xxlFixGJ1tkTJ7zatWzkdrHp1j/V58axl7WlUP8+wkEhRZeMKOGWoVVKQD8BN+bJWmtC3Nott2y6toYzmcdy29uPLnwE92T/ovx7dKnRTKsx+516aci3hLdAGUm4N1dx+U3RWAjIPS5FvYDgRVMJHVcaOMUqQIZ6He1G00xs93ZcTPSFHlqPZI9wDhoNOE7ZmAecDoTxJxND7lBtNgSOq8Em4TOTrpivp8U01DfLB24HEAMHSUPfq/OwZn7cn8i8rbEdiSVfmmSF6oieM25k2qt9epaNbQiCYqmUeIJguGfMWK3+y028U= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8610bb25-2ede-464d-28eb-08d4b3ccf70b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:SN2PR03MB2399; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2399; 3:MokOUeDGXCc5F1+Tq5lBi0AgkyuH6JUbntRQJwvqKD0AEAVqlDaXNiyt9G4PJgl7uiIQBIvFsiWzW+nE6Vy5XISKaIS32T9vayHK/yxGZIJfHdSljdvfd4irPrnreDUzTn9LcL64rYt0CtpleybE0jLszVGSN0PBtcJQgyzqZB/XTpGsqT2xkUkAnXL79aK48xgVbclPO7b5Wrt058UsMwt20xZ14Q5embV93K2s2/1XcHbnRW+1Xdts819Fp5DYlK2vvvH8VExpTDbyC75sy0hu15PvW3GrpFU8EVVfTL8rqqbd/gJRi2kekvMUB3RXaOhUvrFG+ZfWQsBmr8pEpNoSIOES2WVgWxigoZELpTFzJRDMvQx94Z/FNE369ZcY83gP5XkdechoXB2rzKqMJmWc9MGafhxQsY2NbFP8v/aKWsUF1+c1DkqnWUqX1M4j; 25:GvYe8xSTp4vcJ2sgeF3Gu5VGVmDrSZtgHjjsYNpaXCXKBs4QJhRS7SOIO4loQbqZK1cCxqVqJTDtpIhhDdU7nqpExIJviLgutL37sKfZETpszJUhCxNPeytRp4gJW/Z/aKwhpOZSU3by6r+WGSA9fqKtxf7WHGIxw+7DDhUt/ts8NWLOiLRxsMvhrQCSnUEqENenGF+fizoHpjpfOF2DsfsOGBvOkm1gXxUkrT9dpVbaFJcw2pcDD5bG+EZCKbOrHi7jQ2D0/rMMM/hFZNI6N5AzL0mFqKZ8WNwsPivZxYdQF0qx4PWo4UrBrk6u67SxOtYrilBRvMq6NQWQWwOtBGTcV8mfWWUlTzfxck0VYzJsQHD12052Q/8ugGuY+dDkAg+ssEtBpKPASfF9i/rJjcdufKGPlSKQ42gTOmrXN5VFPqSuUVgQkf4Vpo8x+tLcKQEJT6MElCOjwjhPji0AyiqCnrFGDft2NNVqKlAFthk= X-MS-TrafficTypeDiagnostic: SN2PR03MB2399: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2399; 31:rZmRc/+xsTO3QjTUh+L7wzW8ldAK0DlOOO72jCWCdQuFcbrDtJJ4i2l6ORbmyTn6+VxVYquNhlqLhyZgWYCndGEYE+tjuErBCRLdlS8x+DLpelUyrSREvMCddCsGHVPifWVp0otEh3MLXJxeCjCoYipniUItY2drMf6pivvAifptntUBtrhUexw2+ozs1rME9Qr4CU8umU+xNenB6f5pwoqfCuhodMQ73LICT9072a8HyjD1LX0FPZckku2n5J44wgGN4OKU2T32zqd5I6eu8Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123563025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123556025)(20161123559100)(20161123561025)(20161123565025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2399; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2399; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2399; 4:VGz4YBFGKerz/z+vOYqRgWRiovPn1Efysjct0971+4?= =?us-ascii?Q?Xu43pH/gXQpy/gAZGz5l7fenlVFD03GdKtNNZiL0jf6go3OpJYQFKY8QmBtt?= =?us-ascii?Q?kMD6te1zxlYhewKzIiFM/9eaoa47fPFcMz8iiXiQDlGy8+ConyecQwAu04O9?= =?us-ascii?Q?0uYTXGVo7v3LqQwDk1JFkn7N78ih0x8taSbPxSU9oBFv1Aknu4Nd82dW/jcn?= =?us-ascii?Q?oKud2iWeyHEOyOtxVVd0Vv7Wex3IRPHQ1EnphcwSnecvHOYeLB68z/Lca9YX?= =?us-ascii?Q?Ve9sPQDn4qb+OQns978coaOR9bQveVlHKMchf51JepGRhHzVyQUf/P0kO8wC?= =?us-ascii?Q?oeQgpRFhAMUuSR72cQ/fmuKUBCoWs7FWJkRhlyeITPHo6BGqZcroeJc6c6JX?= =?us-ascii?Q?yt8okEnIImmtBO0FP3m79CUAu1V1M7f9aFRXRCaCNCGNIoKQdOd2NWSQksW7?= =?us-ascii?Q?IXB9uG6BM5dpAPlO/t86nvTPQ1ByjzuI3FElbuzXs0qE8rRb8yUyNeTZmOU2?= =?us-ascii?Q?5Ww3lMI+UymZ+pZAB1sm3Eh5wJBA6gkjYuZsIWJxdOFJF8ZyGfPLgAxfm50A?= =?us-ascii?Q?svFjhvrD6itl2PEoW2rBEmzIA4Z2jOqHPSQqUsTgGXplKIWugbPMKRZr76Vi?= =?us-ascii?Q?Q2nUqnsQ7zeCVO7SewfoaCAibZiw888emFXYio4gG87hsLJToXanvvilyuhf?= =?us-ascii?Q?vYWN9I3jIoRsSH2GLmDfe2Udbt1yt33CHsgeI7iWqjlgeaVht6mBKld9QCn7?= =?us-ascii?Q?Ygf5euNGv8/wGOEsz2aEyAkKMxc4pwhiTA5qfaArwydbb+j5Stj5myB+Xe6O?= =?us-ascii?Q?a3/7DLzmScrmbC8pheiGBJPf8j0Bx57zcYzLxxxeOrrwS5+K/V1PA/e4fqT9?= =?us-ascii?Q?qVQZhuhIlZvSlnh3rcOLWevPrL/pvgE+kZ5TibEfROdjrVhYkDzkCoRDly8O?= =?us-ascii?Q?MFWGMTSvf1rACBYTccs9ZtlTHpwmHlr3Luz2E0qpmT+uKCoVmduLzrewdh0j?= =?us-ascii?Q?wr6nkL1F2HiY/T4ImBoLIHLA0s0VpKbfYa4hxadPizVeNiPjGrUIIL1qisNx?= =?us-ascii?Q?I3g4Zlvhj/EFHC993mqzNqucNbs+GN+UUWvwfKCxTKsWlMKV0KGO+KacsW4l?= =?us-ascii?Q?xm0h69laL0Rvkex5Z+5PfBnbj+gxXzZiPcnenSMrhA3SQ1ZI5Dic2F8WIs6A?= =?us-ascii?Q?YERwq8KpnPiKa9WOXVlIX3/wyxqS3ET4hFDBcV82g6CWnYi5b/yoseb4U0lw?= =?us-ascii?Q?HI//sE88uv2XEo9HuX1u7zYZbxPEOSPsqn2FdoZfvbfWQXcfftw4uAHuLtCw?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0339F89554 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2399; 23:bdrCDe2XPYe956PTxTIMfEEbdBbEqxtFhw4TpYt+C?= =?us-ascii?Q?WQzPXmLx/FNy+FwDzQtYjEsho6/ceEG+Lzh7ApASK3R/XMLKGU71Ook+3LHR?= =?us-ascii?Q?b1JghZIMJBr/VbykHa8oRThw9GhthxtL6QKp3kknxB5K1Y+wP2njD/ZwwzQt?= =?us-ascii?Q?gho4cgBqExOPSuNo8zfFVSGRlMa+lkh93Dz7qU8/Un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ZoLnwx+QuIOghcLMfvInR32/FzsGt/g+q7NyqNxTs2myIy9S/lwuF7qPbCg0P1mlJySeIZELrSGaIXbDOAuo4nofWQJZJlyqVgXU9TS1cv3pyxLJxdcKNIQ+gH3jLJ1bz3Nj2d1petLA7bNU0ep0wlDuhlY8TwDMlQeni2p4qj2YfXgfODxGFL7zTb+dLYYFbLRTT/0EWvOfr5Obrdr1SKgEjvkzAIVa36mKVYRA3i7yJ25IYz18Gvb9r/eEcFq0383rNahXq+cQnOJS5ELrGvp0KYBGwUO0CGl3lJojrg==; 24:twahdOltzRV1s721mA9Ap1yy3a7by/wPAInys94wxw4oV15AIe7r37c9XBLZImCJIX6WCSwd5QI7OAwJF/KRaC490n9NddsDCfGYwFZsniU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2399; 7:wWy1XEp4eVCxxBhP2QVCqQmaIg7++qIncxPVNDKV3iTFUbScq2K/InZePR6GTFY89oONZ8b/1yBDbhMuZ2bTUVh97FszQrIVjuzhRmqHKNDBCu7iAg+pE/BWBcaOnk3eOA8NwmpoW8h1G73XEl8k609zCx8OPnjj2W68TLkpY4/plvYgJvpQdMm/LW0x8sz3x5Hxkw1wrIc2IEAuh3PhL3C+g2Oc/qrEOGxmiMN/08iXXMcHJL+M29RvLOuG3i+KahLO7wp9MSUJHvXchk4caHj1LgYttM6pG6s5ZysVswjQ7vc+gFcptbOddtS9pt3cYX8XePuNZnEFwqifTNYaCA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2017 09:00:26.3770 (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: SN2PR03MB2399 Subject: [dpdk-dev] [PATCH 11/20 v2] bus/fslmc: add support for static dequeue from portal 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: Thu, 15 Jun 2017 09:00:29 -0000 Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/mc/dpio.c | 44 +++++++++++++++++++++++++++++ drivers/bus/fslmc/mc/fsl_dpio.h | 30 ++++++++++++++++++++ drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 1 + drivers/bus/fslmc/rte_bus_fslmc_version.map | 2 ++ 4 files changed, 77 insertions(+) diff --git a/drivers/bus/fslmc/mc/dpio.c b/drivers/bus/fslmc/mc/dpio.c index d84232a..3553952 100644 --- a/drivers/bus/fslmc/mc/dpio.c +++ b/drivers/bus/fslmc/mc/dpio.c @@ -257,6 +257,50 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io, return 0; } +int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + int dpcon_id, + uint8_t *channel_index) +{ + struct mc_command cmd = { 0 }; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPIO_CMDID_ADD_STATIC_DEQUEUE_CHANNEL, + cmd_flags, + token); + DPIO_CMD_ADD_STATIC_DEQUEUE_CHANNEL(cmd, dpcon_id); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + DPIO_RSP_ADD_STATIC_DEQUEUE_CHANNEL(cmd, *channel_index); + + return 0; +} + +int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + int dpcon_id) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header( + DPIO_CMDID_REMOVE_STATIC_DEQUEUE_CHANNEL, + cmd_flags, + token); + DPIO_CMD_REMOVE_STATIC_DEQUEUE_CHANNEL(cmd, dpcon_id); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} + int dpio_get_api_version(struct fsl_mc_io *mc_io, uint32_t cmd_flags, uint16_t *major_ver, diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h index 6d86f07..39b572d 100644 --- a/drivers/bus/fslmc/mc/fsl_dpio.h +++ b/drivers/bus/fslmc/mc/fsl_dpio.h @@ -230,6 +230,36 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io, uint8_t *sdest); /** + * dpio_add_static_dequeue_channel() - Add a static dequeue channel. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPIO object + * @dpcon_id: DPCON object ID + * @channel_index: Returned channel index to be used in qbman API + * + * Return: '0' on Success; Error code otherwise. + */ +int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + int dpcon_id, + uint8_t *channel_index); + +/** + * dpio_remove_static_dequeue_channel() - Remove a static dequeue channel. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPIO object + * @dpcon_id: DPCON object ID + * + * Return: '0' on Success; Error code otherwise. + */ +int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io, + uint32_t cmd_flags, + uint16_t token, + int dpcon_id); + +/** * struct dpio_attr - Structure representing DPIO attributes * @id: DPIO object ID * @qbman_portal_ce_offset: offset of the software portal cache-enabled area diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h index 4269800..77efe37 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h @@ -42,6 +42,7 @@ struct dpaa2_io_portal_t { struct dpaa2_dpio_dev *sec_dpio_dev; uint64_t net_tid; uint64_t sec_tid; + void *eventdev; }; /*! Global per thread DPIO portal */ diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index fdc6e21..79cb648 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -58,6 +58,8 @@ DPDK_17.08 { dpci_set_rx_queue; dpcon_open; dpcon_get_attributes; + dpio_add_static_dequeue_channel; + dpio_remove_static_dequeue_channel; qbman_eq_desc_set_dca; qbman_get_dqrr_from_idx; qbman_get_dqrr_idx; -- 1.9.1