From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0079.outbound.protection.outlook.com [104.47.36.79]) by dpdk.org (Postfix) with ESMTP id 00E78F614 for ; Sat, 25 Mar 2017 07:28:27 +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=mMk+1iGKl2LkmJTevSY/a6V9THt0Hog+3UJaohCXjvFP09HCIfFxUmquM/KR1+3vbIAU9hafLRNXx/f04qN05dxu7TfQif2x8dgcYNyaSiBNLAYnw4tkMlEADQZTpCqbYtoPqaTpj+L1humq2P8XGznbtzeCXRCXv1PG7wpWEoo= 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 CY1PR07MB2280.namprd07.prod.outlook.com (10.164.112.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Sat, 25 Mar 2017 06:28:24 +0000 From: Shijith Thotton To: Ferruh Yigit Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Date: Sat, 25 Mar 2017 11:54:41 +0530 Message-Id: <1490423097-6797-31-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1490423097-6797-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> <1490423097-6797-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: BM1PR01CA0117.INDPRD01.PROD.OUTLOOK.COM (10.174.208.33) To CY1PR07MB2280.namprd07.prod.outlook.com (10.164.112.158) X-MS-Office365-Filtering-Correlation-Id: b784695e-eead-4ba5-923b-08d473482536 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2280; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 3:LFBEG/F0jyY1qZLnSIit0sEZ9D+EIdXW70UhUJjfkjKS8Csz4kN+t30uErcHQUUUeEVWDEnzaSMV2fbRukp7yB9ywsDtAiD4I2xgyQfN6NufRUL+fSrJ3KRIukjUwxRjQ3xtsV/ZekTlQ6fghN8wJTDUt6+uMjUCw8QCpl2VvW7ZznXpKSoKP+rlIU94jjTPKL8lFREQleuubNRzka56IsvEcsTicjArY4vns0AL1wx1LmaHMIXN82trh2p9wnw6Fn5MqzDlGyM+D+xhrQ2dyw==; 25:6DxFwGZmKX6Rgqky9RT34Zu/niIPV32VdA0OATFT5tFsN75gfkIzb9/M7H24cfX62p7H9AOup2ghoD7rvZrvesYBuqDZkELIGUoUthqXiOSs/VQj0Jt7TG+/tsKKs1Zd93Au3rukTHMO9OCeBk2dVdEdpMmkcWQ7HLNo/+kFv+sBYkHQyavYq1ApYUO6J5N2aMYnWdZg+PknTV42HBFq53e186Zi8eBXpNIcEM68posvlPbQhm2xXO66TiyuKFtJVkiTk4f/+zjAF8VUU/pi+tXzyEiEl7bmgcGDxiW7o/RVCctHKbfpfbtQb4A4i8cxPm81kKl+FR4ULukA4KkXL+qU8tMqail+mlGGPFDZMavwwYLLNn5sr62r3ywJi9gVIbiEZfsaxnI0DauNs0IO3AVRrBIxDS2m4uWlMVS0ecVO7HrpyjoqgL5byuSnkww9G2UBPAfzRV5W+9yEXEZtEw== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 31:uthzUfzAOXfI8Ykm6s9eBUPY1p62zOfgAKW8fz4P5MTVs9x7Ajn5pFIetJIUazpI7EGbvTfu43nqYGIahVD9qRBLIOgwMP8MN5BdTciyx9G+s2uGk+YM5zW9SPYvPW9dEj2gpM5igQf3LhakSmESq7k4ZVliOK2C8hvewJAU2fyyDtIEHD7mO15j2XPvByC+aqNXCn66Sm06Jdx2l1gEWz3whbAVPLV+yX7lkFhfUkqqLp2b4UC0kaPnW09XnKtZ; 20:yFcs2berCODgJ8RRfIEBZ2DgXQtRxjdD5jmo5HQczFE50z9rQMJFBGI7iv/x9zmxY44YinfFHViv3pjSZIWFUGwH0MHJIS6+EOxaecH34wemKb8Bo0Byus8GlD0qRhRrRL3Xu92sfIpHs0NiI8P/Q3cYCxVZDqvfFr82uCDk5OEvaXFBNIrpiMYryimlZvEHai27YQBblem7/EHOdXOQ2HLusQOkeJygTqsu3XT/6KnMrnREU4bQwmeJEiD2gwEzeaeHXVd3jufB+CSvDULVBgboyt1lwYthVfiyRlpXmt9eXW7+navQ37y1OOVI3plhniYYrvES9PS80c47z7cf58Nv77/2grQcTE83Y3nc3u/Gd7XAQirBhymY6AIN1mspLxHGrUeHka+uQZLVYQ7dqXa5JdCU2G/Ju4qwT2SVuxgtwgebCFg+DpncnxAVq1l+1bzBfSWwNo6tFWw2HKuRYzD3pnhaidWCbZuqMi8y7k+dcmPiNWVDP26WvFCvkRlf/t5+S6SdeO6QWsTT4lVM4pLS06jd6GxRescHCXZcd0A/m3P+xaRZMvh2a3kSE1wxJ/FAyTD+B7DjkQ2DW3vI5hLwC5d3TX2fMSQKP+nxUiQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123558025)(20161123555025)(6072148); SRVR:CY1PR07MB2280; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2280; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 4:UmGSLPyByZgPdfEfBwpnQg0cVfM+V1GMEabgqp38BQgLvXg8O9ptPMgMIfLqHAkBvvIPZivt5Ua4QmGWLKvGWstHko8gnZCPVmyiGmciBw751lP8v1d5t9X5YOp8R0FfS8Y8+ZbINmBXV4DhvD0q2jIe5xkh6LvWKN2cPMvl2hvom4mHgszgLfauwICyYBEpibfhkTyqU264A+bOE/tP2utF0t4ZeeT+qHKgcy0jUhU0szyYdr22eblpStLK0RLwkJz65wT5lQ0hetPNVyhkocGPlu+jKhUrrHueZD8zCm2M80Dqa3vc/k6esuWO/gE6Ylsh66aWo0TNPZRHTPEjNeWIC9XeUTBR/ufdfN4wIx+LYZtvPb3r9VVFlOjvihH/YhhYzHwLIfK89bIvK0ybmiPQdrXnfktXuBq7orimzSRChsBe7f07/buC2y5HrE2SeowikRXPxTbgjYol1wLcKMuIVm7h4Ui3TToxkijtG9vIoMqJ5kQzkl5o2JYbwdR+UCP9c3Qs2zZAKvkwj88scsR/AheeVa0sUbFjRJgQFVDNhIqoTSSnD+1OlpP1jHqRcR7dbViVyTWLHY3rL81f7sRWjhA1EXW1Evb0mz/t238= X-Forefront-PRVS: 025796F161 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39410400002)(39830400002)(2906002)(2950100002)(5003940100001)(66066001)(42882006)(6916009)(50466002)(48376002)(47776003)(42186005)(53936002)(6512007)(68736007)(5009440100003)(54906002)(50226002)(38730400002)(6486002)(6666003)(25786009)(305945005)(81166006)(7736002)(6116002)(3846002)(4326008)(8676002)(6506006)(189998001)(36756003)(50986999)(76176999)(33646002)(4720700003)(5660300001)(110136004)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2280; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2280; 23:04iEnSCCDkdV3uR7o18Ike9r2QBYPBhwsj2XrD0xr?= =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cst/ikeFqf5KKiY?= =?us-ascii?Q?DXkGgduareI7qBp5i7O77jEHb6JL/Q1GhvqQtevYzDdPZgxnjjvFVhe8I0Gb?= =?us-ascii?Q?rwQUKerfqwznzcpvb5X/+DeBUAPBkjugUJYjMOzEilZyJNN5dZ/P8nh7uuqX?= =?us-ascii?Q?Hum7dvzRqTP893kDC7hAvO4FsN4?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 6:eiRJ+HmnMbyrIAdjDNRkM8rhFp1cEYW1oouAHfa06rLJf3rUpXZLAPsP2Zdw2l1Eo+ZretxCNHB3/b8OvEuMEeFdTR/uv54C6ZvX+HjzoliWIgYSj2hNSQ+l53xUfHYRbWKJX28Tf3PcYH+n6auPWRAe/gxpfJgBgnZHEO4OjbgCs4Z29oRtKMEpJviNU1PkTCrbggBj9CY1mB82CMImPmzYL+Nuq6c2ZZLv462Lb4FOZpMeG1+VXNW7JnF3OSYqAIj0nQpoxf1W1d/4SxTta1DDfWkb6zpsGHYH3LyeB66pp3bcz8207wLbyuNbHpId1YIzFJVipLQYvbqrmCwOoe0WAf6IBalga0N95tpbSCPAAn9zknOWdjyn7F3rAab6xzgOjgL0sRqhZJYhHKIZbA==; 5:EFJZxjYt9WBMVKDv6hZEDXXjqiCGz7q7mu+2ZDpqVX107nIrOGwZeWFbGE4n8y6HEZLbXbx7ezSoqkemUsYlfV5mz4hxLpOc3NLI4qYovWoOnslyQdMgCqckH21XbS8N9JZZjGRYatb/hPFK9ZmQ8w==; 24:RMhXIIW0EyUXipBHqVewVO8lx6+/oV6Qi7+JzyzKwThDUVCMRxNyOJtqSjWmVIqVCBilKD8Rb3X7SiqyJvaH0vZPz+wLd4ME0A/KHxRQSps= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 7:yEQHrcuI008wWjG0gpGuDO9I14rePLNmbTYFrPQbm/EQkcIpHE8fORbT7+9XKj9nyrkf4IPfFBaB7u7MCa/bOcdR2cH9525Ddt/pbHURWa2H8YOMuBn9LsW2e8ipy9cxMopMtSqnW4G4MexXMYNYQt55NFyJB5exbe3/8NHDPPum1RWlhv5KdHpsfLsq92h8XgRdJZ1dhl0CEbENyumJfts42LhgTUH7YLSS1p+v68hGzyZJyHw89jlKvBpki3M+fSbO0IplSLwIPwTP8co0JWksYg7g34kEtdlOg6STW/54mZSwXewiE2Jg92p9Vr9ojCks+0INCHh4j8ITQvmXLw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2017 06:28:24.1076 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2280 Subject: [dpdk-dev] [PATCH v3 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: Sat, 25 Mar 2017 06:28:28 -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