From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0080.outbound.protection.outlook.com [104.47.42.80]) by dpdk.org (Postfix) with ESMTP id 39DE5BD32 for ; Thu, 2 Mar 2017 12:39:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/eSZw1IX7ybMa+GJbZWEzWm1Z/0vowifcDjKGNg2/FM=; b=V0jRyAwuBpGWSjktJpNNG5Nhj1F6b7Mh9g2Cpgfv4yp/7bRgCGWRl6ZJZjmRrlDbiDgtxuDwoHcxuOMxJwKBT4Wp1xMtE24CUEDUEmOdwH2ghOwtv6tjA3Fnt6tJWpgqpAggNoDK2nxjj/uR4BCtAcTUigxrWFZJZOzGK9xs66E= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Thu, 2 Mar 2017 11:39:27 +0000 From: Shijith Thotton To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Date: Thu, 2 Mar 2017 17:02:35 +0530 Message-Id: <1488454371-3342-31-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.163.198.156) To CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) X-MS-Office365-Filtering-Correlation-Id: 0a1d1b49-4e2f-4418-3efa-08d46160c9f4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 3:eRw6/G4GBJTKvCO4oozdBW69X/w68qcuMHjWi3D/n57gKtrNKvWIHspyVXEDOnW0Z1kJfhWUXVIgbDv6erA+z4B6CGpsCb2t1FUIrycr79gQnewGT+bwc/vHsPzEo+vJn+ft0CzA9Ppixa86+y2uCUb+fkDiltCrv18qp9QufGsuiHC5AedL0J4ohqvGv1DgAYb2ZkkdRndl4BFx2RTusd+MPBtb3TxMHcsrSFBh7qO47xztWb/X5Y8rOY8rVnlsCfw5i/gb9JOmxOlIZIIGdA==; 25:5Od0XQ8nh+h+g5X12r0FTx4gHEYTe6Q8TZ4FnGPX8pOzi4zzJTgeSwA9v1yKLQsCEG6WKMuWmNcG1bLqyFCe7NHCohuCR69c1yltIaHINWFL+Fp4zzPiFMZPET8JqEUv075jk1bwkNreNG0FKwsnGoAbntgWfGkweuWzcdbvUGWzyVaBDQ9QwpzWUFMXi4PONobxhHLWo2OUN6eitqDJmybVYRFh2GSfZI87T5wMhUgN67TsmG6XiEinAyhp9F8k6dpEEqWfMFr1OcSiGb9CF0fWkgI4/WprnAD3IdLkfKE242A0wMIj51XNq+u9dTUruellqyypByxEyZ/Csyo0T9SUjEJjdQ34pPa4DbJkVyKEaQdwjC0F3miaT3DhZ5i5XQbe+FsMUYVGEqsR9w4Bdt04UgsCzsKQPn4c80pMLUoVo5w6Qc4QMPt5rd9flgqcHnJaPE3LbLcYJhjp9FmPNA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 31:/zm0D7CSWtUN4MPJuI308EK7NufjiuLHAhoMkUVt7uBQn5xXsblNXBm2P2pvDi6CMDvePnsa4E37uhiZaNh3sl88MUrHxYpSl8G+kXVIHrnSd9YPvL5Wz8dbKyCDXOYXw3NvAc/59qOfXSqriGvkjP556UZgF1aa6gdgptgUDCOCv2xKny6mwwCqZNZlpSCJYwpbfmFQlJjYlw3AYBB8JZuEbKYdpo9coKd4sX/YriLv7hM5+pEBjdVygkjCR1dq; 20:0r2tWwANjrRWjersfzeHQDwFtX4ADyQXtedDJbNVQBaxnM2f8ogtYp6lpjICAHl7T1LmVN8UX+F0DZRzal4lDz6tpuO5L0/dg1G0FxI933CMezXRPGVXPBBJT6VcBx2QH9Zmd3V2BYIkkGF5yzma/8u9395Pu9eX0TzTkkCdeqb7ptk6Ozu2bBgpu/H4ZAHeIOovvLcf/KDYTeOsM3MjJpXdjGfmnGX7I7sIBekGg+LfqDWe8zGuHWQ8XaTgz0oCHsflYGD/JSLhsknxTrg/tvzdz0yac3mFdP1L4Vbltl6ZptYy3wFuygTgiA3iP3G6osqzpk0O+iVzkFhYRKO653buLNoXG4KPpAF9PoluAhbi86A4BoMcEhoV5qWH/+hxtQ2aDVf/BDkIuTzuLWPIE8zi3RwEMD9bm+goV9pZHv9KeDWF4w/E3t6sd/FOW9RGz9RsGNIyshulpFF5+qPmnRYtq64aJgx2au1FN/ZX4ZAofoQPJSya3HT1HMA57jLuDgf+IF/+PR+l41T6vYGIG1amhPvpvshplWs8mhpwzfL8tZCqYr2R7ZQ8meu2ejCom42MrGDgjcETJ1i3swNpqx47Y6nD0pL0WDvuch6DPQo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR07MB2277; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 4:M5u1m0xtlmdP+OeFUtL/t4OUYjebaZ5i+r4d6Y3XjYCmRMihaj/j45tLk+kVrlvbbOFt7sjM3zfVspNOVdRYLG1QtYjlWaqK8PtT5O6hieCpFbWT21VseSgeoKSd66396+7qlqG8lm+gttIeI4B7uEBCNnzins+5065L24EOkr3QBUJOcKxbm06epgBjdqzL3LtGkNv/2KAZaRj3hJguJAsLLG4sSJVmtR6oDS7nnbGGqagfPMazB4eK1l/V4FDo4um5ZfcTGfQwoiGntMFCm/WqCtuo5o/TTklzx/zxNZo455rxHXJfh8VIxl5WCArmjzqMA+21txeGxRp0aKbAm7ajWheM9gYFHZBOckySJa7qGaGrdR8Q+s/tYp0CVS8t4HrbhnwQymOSZ/zYjjrB+WPfP/Pm/xG/QKLqB0Wgx7gC0mDNjWXTPSSjv3BgQX1A4YRMjXEKoWbqYIsxLMYp8sH0RFN5XEqyssCAxH1TPi2BSZorfi3UY+xkrTOPzJai2BSXP5MvhA8dgI1IncNYflist1VAZOXA+B/hdcJErnKF3q7BenCazoqM1vuTmB+slgDVrHYvm6QSYWciYnVlQZaIvrKMCA12pec/VRHOe2k= X-Forefront-PRVS: 023495660C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(2950100002)(6916009)(42882006)(5660300001)(92566002)(4720700003)(33646002)(48376002)(50226002)(6666003)(2906002)(5003940100001)(36756003)(8676002)(50466002)(81166006)(110136004)(38730400002)(4326008)(305945005)(2361001)(53936002)(2351001)(25786008)(6512007)(189998001)(54906002)(47776003)(6506006)(6486002)(66066001)(6116002)(3846002)(50986999)(76176999)(5009440100003)(42186005)(7736002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2277; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2277; 23:KicfW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o68?= =?us-ascii?Q?WM0VKQx0914PBMVntjBYYvrfKMWFT4hz9WVLgNwF4BWu+pw8jMRbaZpoflfP?= =?us-ascii?Q?D2dUSmNYYtMeakiWbzPWysdvxJ5x2aTNbzS62CglYaB66/HPHMzeQ+30pcsf?= =?us-ascii?Q?HT/q1FtikChSHML0ma3zfBchqDtKG+zJ8NbOwE08hu3E3uiaCl09ysQUgbNz?= =?us-ascii?Q?yHSo8SZquc4IfS2aaobsFMODIOctt2/9AOGWySoDFmsCzhmTQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 6:xbxavWrk/Y/pA8QXX2K2oUWxIs7EClXHbGbvP4QGCp1PKEAWnh6/6YrWAdYpmxmQAvEhaYa0Bz8fRcnmlhz65RPJZ8GjbLo9/FFi3+EwmK+SzN8TrCXP/fq0ayD2HUf8HoOLW0z+hLvYL9XNWFjw4KV2mEvHqpwvlgVxruk/TaAK7zeI4hpeLkA60tc4PTyK11TFul2quXoB3VYO+L/knnppm7yojgjtjX5bJilZLFcM6t2id+LW/PK77oUUOVNo+4+JcwUMQ51iFmOr6ajk9hkSVkoKBYPLDny3fK2wCjfS3dUUkBP9tOI1/PiIGlLZYlDI+zzdR5noVVRvzR9hYskk5n61mJB/Oh/4XUSIvEm8hfLH8fb9oxFPw+HLuQZiqXzbNCW+H4gtVO86HOIyrw==; 5:DaLh7dBmGDarw78wDTdbzHBEL46KJWihfW4MfIhto9L1u4GGNTcEFi4/OAW0lkZNyEkkKgT/VS0JfuWumE93zaKbzUbUImlP5BU0eo89VzH0b5jV8LcWIzutmdAUsrC+LnFq4iLzPs0u2i/dGVOSSQ==; 24:Xa8Zh/NyVs5lxsuBcQg06s8IdFowYS1piiT3i5u/lSsDZOJK8wHQp4WsX2oFZGlTtN0uo+Rm+kc4MACADjk/NciFlKB4Mz6VzL7HVJUs1DU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 7:5j9kgz84/qyac7n95tTbNZ7RWiYN4wdEg6rVByY1+G9xJmFLOi4+IDF7nEiQ03KucMZZlV9AqEI1Ky+uQIopM+xIdU/deSDk3mjNVDrZWIFVvKdr1XdNYmDRCXNbYj5wLmeoYDRo/s462arGHL9vtQZ9zmt2QqdtOpMzJLCyyUdDQQ7roHDCSSzKWv+6A7KAP13ByoCtIn6CTjFBgL5Ujv486frFkVALlKaJy7IrniOkdJnp5zpIFnMxkiKnROJe2YLHU4BOxxMOB8VK8LWOcyl/rBKejz+F3SaZ4bAUhtupQpYkbqFH3RYh3lg8vt0tkPW1JmOfj/75ostwVHZ/Mg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2017 11:39:27.2813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2277 Subject: [dpdk-dev] [PATCH v2 30/46] net/liquidio: add API to release Tx queue 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, 02 Mar 2017 11:39:31 -0000 Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula Signed-off-by: Srisivasubramanian S Signed-off-by: Mallesham Jatharakonda --- drivers/net/liquidio/lio_ethdev.c | 31 +++++++++++++++++++++++++++++++ drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/liquidio/lio_rxtx.h | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index b8baa4f..97acfcc 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -216,6 +216,36 @@ return 0; } +/** + * Release the transmit queue/ringbuffer. Called by + * the upper layers. + * + * @param txq + * Opaque pointer to the transmit queue to release + * + * @return + * - nothing + */ +static void +lio_dev_tx_queue_release(void *txq) +{ + struct lio_instr_queue *tq = txq; + struct lio_device *lio_dev = tq->lio_dev; + uint32_t fw_mapped_iq_no; + + /* Run time queue deletion not supported */ + if (lio_dev->port_configured) + return; + + if (tq != NULL) { + /* Free sg_list */ + lio_delete_sglist(tq); + + fw_mapped_iq_no = tq->txpciq.s.q_no; + lio_delete_instruction_queue(tq->lio_dev, fw_mapped_iq_no); + } +} + static int lio_dev_configure(struct rte_eth_dev *eth_dev) { struct lio_device *lio_dev = LIO_DEV(eth_dev); @@ -387,6 +417,7 @@ static int lio_dev_configure(struct rte_eth_dev *eth_dev) .rx_queue_setup = lio_dev_rx_queue_setup, .rx_queue_release = lio_dev_rx_queue_release, .tx_queue_setup = lio_dev_tx_queue_setup, + .tx_queue_release = lio_dev_tx_queue_release, }; static void diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 64c0385..6a1d265 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -1439,7 +1439,7 @@ struct lio_soft_command * return node; } -static void +void lio_delete_sglist(struct lio_instr_queue *txq) { struct lio_device *lio_dev = txq->lio_dev; diff --git a/drivers/net/liquidio/lio_rxtx.h b/drivers/net/liquidio/lio_rxtx.h index 0a4cc2b..964a884 100644 --- a/drivers/net/liquidio/lio_rxtx.h +++ b/drivers/net/liquidio/lio_rxtx.h @@ -699,6 +699,7 @@ uint16_t lio_dev_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget); void lio_delete_droq_queue(struct lio_device *lio_dev, int oq_no); +void lio_delete_sglist(struct lio_instr_queue *txq); int lio_setup_sglists(struct lio_device *lio_dev, int iq_no, int fw_mapped_iq, int num_descs, unsigned int socket_id); uint16_t lio_dev_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, -- 1.8.3.1