From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0070.outbound.protection.outlook.com [104.47.36.70]) by dpdk.org (Postfix) with ESMTP id 4576A6932 for ; Tue, 21 Feb 2017 10:29:52 +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=5wV+IoXdzg396AoTryRs7p3YRDURf/TcHvMHcP866qA=; b=VA/7fZwSPpYUAUoPGLkm3CHB1iDZDn97COYp3+ARq/L8/5PUhjoEqV3kUiNo8jE7jS5xazrUFRXk56JzJ+/ytKFI22ub/eSwGXD2cvBtbpLX4xcMz7Xqe2yYRzc1CBiMlLi4iXvvBcYB+37LcxlWUPWfTIU+NNJKGKCgmMJO/UU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shijith.Thotton@cavium.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Tue, 21 Feb 2017 09:29:48 +0000 From: Shijith Thotton To: dev@dpdk.org Cc: Jerin Jacob , Derek Chickles , Venkat Koppula , Mallesham Jatharakonda Date: Tue, 21 Feb 2017 14:56:48 +0530 Message-Id: <1487669225-30091-34-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-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: MA1PR01CA0089.INDPRD01.PROD.OUTLOOK.COM (10.174.56.29) To SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) X-MS-Office365-Filtering-Correlation-Id: 4a5418a0-d1e9-4112-7bfa-08d45a3c2f70 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 3:dNRoTpDW4L1dR8RzP3HjBeIJros/RNHP2SRczJ4IH8d/CKPJZYttrWcBr7wGO3o7TFkTd47ozKpb5WH12u1r6Jor1f6MR4MUFKjubs9QPGAVX0Fhwbbu1CyTSfCwHkZq/xcUNHxt8Dr3eUiqMZYa7VRWxMZqfsBlVK+04lCXXw3Lwjr7W6k6quKIDZzbQ+saQotqiS3afnEwCtbXlA/EqRanl0E4tiMto9kpB0Rt6O4KsJlizUtzBq1u624RLYFBdaEtuMVDj6xNhvUNFIdkOw==; 25:M+rmsY5f/LUTaSuWozm6v9o+dVjTUKaRFMDgUHlEzGdp3MrSf4LNjOGVbG1HcGC6F9Phw6hreLOJbAobAieZ2YdrXLoASUDaeVdL2F9WL/skEDbkDSntv7C9SgRTHMMT3mQtcameD+Gk4usHy+AGo5KETZ1JGd2zCHs0LZwzgsGUM6ChYAEkmd53+midosNEj0UTSD5FQ3S/8iutt7DQv7UyMPOrhWXFaYh3PnQEjWrcjyzmrZ00eD1N+Rx5n5r2GTEknKnSZyif3F/syC9Vg+1Gg3dK93B2wgwhTLeemoyamR9HjwzE5VAjZAt94yj8iacUgNBtNVwHw9d7KchUT4PXh8txJksKyuEApKjbTaMxVgtzA0YcvTBT1rGhJoB3FVcO2PuAfh+xrUKrwB+/yXFpCACNtBeHB0L5zjZaCY3T8YRPCquc/lwM1LFftwFFXWxzJ2a/aOTEhc7KCe/ncA== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 31:i3Sfy6jWDrMERwF0WCkq+u8OJQf2TNGDZHCVNsFA+bbTPgsS4/a5lwyWZBItbG5PUOAKTmxmaoD0MLE1uK+v+DStcTzw7T90FXibzBBUCJ31W9YUqa6oopqGFf1PVqwUNp6Uo683aLqg9WwVjHAkNfUNKTiP4bM40flh08VJ+C26aAoa6gDmEP9pHaiMuOGqc+gEj7pNqFroFsFshDh349TSpA7cM0n9fIOfLKKZwhg=; 20:EO6AkCh6yc2aMQ+PQP7JZIFdSxtialEvh5MdpgnGz79DiBAKclVN5ab0C/cTwdLGC1p19q7mE14hgstUqbBFXTEItU1BFUdTUC3SAKecpdcQHgr/Z+DnTRCdXXpsqhYfO179bVnZYET5E8SdC1UczF9xlcJX4LO+ZPch2nZNkgiy0GXoWv4rybVIS5VPpBMIqENXihMwPWbgDx4HQZKjd0G6AqgMjKfFJkqDHiXkx2eT3RUvDK+XCyaJLeQQAN3NADe93eomDaWMUFZBt1m5jtzyBawX+qWoX8UAg1s6evpWWyVN/wgo99QI/SxM0lQro8FSIH/tSRMonn8hY8JKKqeeTKDp5HFPm0MTr3JexJWgNVCdqWNtRNozhP/8V5yOU8v+qLURjO6JcDZuKRNOP/weTrFeAx62WitcN0EsNMJHqc9cUwCFpZOE/tFTd7Dy62s9OEXmjZ3QUNdN8MHC8CDSJgZm7GqF8ba2Ymt9maPECJDZpIkGG8mNMSro+w7jJX0PDnoEEYWa2arTipsfDpH0cRQrTgmg6gIO1Vtwww0s4WQAhH9kCZ1hJRW5471Xc8ZUKlAfHfc+5uxQpf+9XTiLu7Dae8i0vPA0s2aR2J4= 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)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:SN1PR07MB2285; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 4:bZ1ecWjYcTDvY20oVBi5a7ccyL+PTXjDsbWHiIIxIR3GKcWRnlc6MHxPX8vpwy1gtUWkNBUZon4dNEnd9namdrSvzcAjo1fS57y9N73txjGvf0TL6CgbRm0oXzf08Tz5kfkmwg1hkSALLK4b/4UuVTeWPnLsSXB4a4uV8MqIgQWB21j0ToSdKPbMmi3Y212OZr2v0UbUUENXkjJGRK7DaG6XxB1WoLOel3lD8eMajdWjCDXRMGKXL3gZfq7/2aEmjWmPkgmC7yHcePMnuk5tVlFsynyVLd3ci/35kOySsBULpPeAUp0egPq9sexmdhUEoSrQSxBoO2BCUStU1vutzTUdmVVZwLTrQJLhdD5PfBQ7XQKDVPftXxFM12aAC2OAcVSgiL8sV09/CeyvyuwGu8DiIi9nZZVIApLCxKHIHUCid/Kmo4Ane6J0gDwfY9UWjqs/QJgsSiJixJMv7UbGIMSwgJciP48jFHIPiR8OMlsI55XZFddcfr9HdnZl6NOW7jX7VkEwE5ah6fjGttqhJVBX868AWpJWf/4ejbYEmfcbmLcCmNISSeW4D7y+LBDs/wCcBeKWtPUe/+vmckjpbU4GgHr896vjYUIJf4QKaqs= X-Forefront-PRVS: 0225B0D5BC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(39410400002)(39830400002)(189002)(199003)(50226002)(81166006)(42186005)(2361001)(101416001)(81156014)(305945005)(3846002)(6116002)(5009440100003)(8676002)(105586002)(7736002)(53936002)(36756003)(110136004)(106356001)(6506006)(25786008)(38730400002)(2351001)(92566002)(48376002)(6486002)(97736004)(50466002)(5003940100001)(189998001)(68736007)(2906002)(4326007)(33646002)(76176999)(54906002)(5660300001)(6916009)(50986999)(2950100002)(6512007)(4720700003)(42882006)(66066001)(47776003)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2285; H:lio357.in.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2285; 23:2j4LkDF2L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dtELTI9z8fMzfGYs23kRhCw3xVL52WAv0BTttaDA==; 24:Yvhjq0QuORfjQB99ihxYQNuTriS/90D4ogSmxeAOL6S3XMszjHcKvaE6e/1ctPwOCATvA0Q5y2zqif7PNidMfZdad37t6u6z/rfp6OHsN1g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 7:SB9/En1XDN6pBX8KIt2/17amwgjfrmfDXmZS5LdzlbNzOoiSOEB/qUA/grok7th9ltrtT0B9Ktxy5zdKIooNk22GnR7AlkmqJmCbRfaBU8lIWRulokMATEyljnxYKTKnUdBncw5NkSBsMnybMCEqVcUZmy2HKPawKfDArde9T0K3dG8zM8hI1RSHkqu7seOnjM/TCQJmmcAcPZSRn983GQZRmSIftkTNUmYcJ2Qnv1KTWKU37WaiFyP2LCOJm3i9pYHphYeK7VsxTS6veQQqN2CoKwJco0ExNUpEE6lxVY5ruc1EfmEynJNcLKVhMnvI1gSAg6l5X2F1vYwD07CypQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 09:29:48.7770 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2285 Subject: [dpdk-dev] [PATCH 33/50] 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: Tue, 21 Feb 2017 09:29:52 -0000 Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula 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 bf85089..e997e40 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 448c8b9..edb1577 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 9b94fbc..2461fef 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