From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0077.outbound.protection.outlook.com [104.47.42.77]) by dpdk.org (Postfix) with ESMTP id 20DCDFA75 for ; Thu, 2 Mar 2017 12:39: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=W1AirqT00I+yZihFnNEtaRESefSyfc2LHUioISjAft4=; b=Sjihg/q2hX0Abq9n4fZNfJfN0g7bmJ/QAxbI3zWRNRgvbC29irPu5BPPAvZAxmuJS+eLJ1iyOv5rsBo0oh8oliFmrMvCM4FBy9QKqixhlVItq5Ps3rEorza8Vls6L6ONIvGC+iEq5v5IzfAP4ET+AaiBtxfYlNHAI9roV+8bqnU= 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:24 +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:34 +0530 Message-Id: <1488454371-3342-30-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: f21f7bad-13ae-479b-3f22-08d46160c7f1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 3:dz/OxyklZlOaj4aXgrx/whBAeYvVNiSf8FP5MFZU6oIX1AJeHTS78e+PUHE7487Hdz6vQopnOcjMKUM8/Zg/+KcC7yc/q2OJ7200YIPYS93blDPzNHI/5MSMuu4+upvur5A+9JejiRO4VE7E6r6QT3NiGADYGh8BFa2Oh8XVbB1udRM7CC+iKTU7V37tmNVeGgMZIRqHQRwa2EXWDxghXq5ySo02ANsafsa1CRNjmMzmM37BS/1miEa8UCX/tTsOK4bMIUuCtorLbX1oawxsjA==; 25:9SlttmqP92giThNS+SXXsJfQ1m3u3u14bXENefzk9fWmhZVO1MTnBA5Ezdozv35DpRbUxf0xPubBiOJ9auSynN1LxIh2noedUA/u9Jp0Mh/P9dqKweBoyYr1LSBWiqcaYvPH+rDW9B91fgumwA8rmD096XiXMDIj5arwITJwmHOWohe1PFkpdTTtTA3NW5V30U5N3dT/NAUe5tfj+B1264L8JvXxOlxncKRRNUWr+oR9Z2lRr/cwzvm6afwQeCuugJsj8LTeTQVZDlhYURTb1lhQ7u/B/ZUIyzfzPhEYcTmrV7/mth3h7hYZ8GPbsa/GuPrnmIugHuiI4VBBYeQLrS/eX4pkhHPi55WrS1XlPChC6QjIh34eoXX4JPq3RDMcnqJ37TSLtmoL/yvBpYti2ecUQ/K8HOH2LHNL9GgeEsdjj/ICiz+fDboFVIRCscmpjybg8JSAcXjzM+dP3IqArQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 31:wY2573xuZ0D9javvR15ZWziov76xcO3mSDfXZ6SN8WMPyWMfYgI1C4wVTCTT/wGvrX8Pwf/QHCeuRIUWG+CAjC1M8z3nXJDpeSNl/qDO63G/I6fRjtljiyIZ77RiYoFFfveVxJiVmbkkBrsGc1r4w28F9mprGUCVErkIhrtKvykF32ceTeigscoaWgv/60f7PNY73H4Uwj2XMxayIXtSjzcC7+PC4uMheAk/H4bVxTmzvL41u2JEUr8KgieR4Tjf; 20:hMk9IXiGEZ/AiPG0L9wJ+vBOMMRZFO0qlQs8P5RD0TIKAA0apdOhDVSJxUu72PTg2NixZr1PyEaEdHsaHFYIy0flpPk4Hj08OwyUZPKVXUskPosD3qfD6HtDwhDSi8MNanRCyMkK6mbAxL3NU8bpXEZ/upRzUycTai2Xfl5B6d6BLIgN+z81HRC7WeEBD2DxuPeDUTRCRC4Lkl2AoneT2fkKjw7IMEB72oSWKWxnPrSEWtw3P5GFmHm8q1uWesMKBT6yoiopxfGv93wTVs3QvhiwotiZdOskrxvXnT8wytG3fKiqXkoenKYhJnNdxJLKSwUo5EzbsOwIcQn7X4tSNg4KhJ9IinTLPYLXs3ww1XADg03gMmckgBwjyQBgAvLy+8U207mSDlTsskwIbvEDPEkbazdb5woD/9daqlAqpO5h0NEGhn2nkCc8Zyq7jYYrA0zF3fmoQVsJzVdVtHSCav1ct2hFSgxEkv4bAUONrl7uZdFpj1WYZwwG+9SefBEfrZtSr1S7Fp9yqkK0LaSlZ+MXxpSpZLs5x47PWRxg1ZCqb0+PEU4DhA7HNLmLsf26VL9sDeP4WZqSQmSAV2fD0ciuqliIHQIAXHGDdbSqOYM= 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:KdZE/4SXR37XIUMLkXjPkAPmd8tZmCAgdtDEse/4RC91I6MZ3pSgVBGJojr1Fei74ruuDReHc/P6o9msWMaARlriahir2/+CtSp11OEYzhWtWbdxLIMqzjvkoWk2fw/lmjk5Xw4p4qIz5Y2C2cGaktIoHPLJ5Tt6sOYcNH54w97olPv3XMdA48dxqJIiOHeqQogliYVG3Lv0JA0sKyTAhWwBhihMdQuMPoe0C4pOU6GQ4hHSOaYcNGYoO0OKmiTie/TLfaf4QlvGNkevcXNYsL6IP8u8SS2JtvmwSgXwYJf7rfRh6scTIQZkjfAS6012rgt5tQ69rsWYF6NSZZy+n6zL6+uxf/Lwc4SVrsZrJrLuEtqs9V3hOK19oNW45SoEcYA5ajYQX4NK+AUPAfbEk4g07jKJlLcPEYi8GDQERdE9ozIdmHqe8b0QusKgxkG4n+J9K9fXY/DME29T4zu/4tud4zteljTTD9INwI+/a6wGXviiur1G40Mwys4ieKcSWxVRqlUY3XcAtrQ/NYirwTRi4ELeqbZxLKPoV5a5Mo4QyYY5vFOYoWxPDScN9QlKpZ9ElY702iqK5n2KEPcswWcktQKSQObYA/qwWg/oR6g= X-Forefront-PRVS: 023495660C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(43544003)(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:TsDkMHxZ58ocJP/ewEoJl1NCj6NodFVDdIhU5yQKK?= =?us-ascii?Q?CmL7zyCl3Zd+j+m2VZUgQoo3b7jJ2z6fAmeRmouFtCcnKMxtCt7/RaLFl+PH?= =?us-ascii?Q?n8m/6rRaGUHb3thL1mi++plSxg5DlaodwQpHEnIWeKzkzCObJpDbrxn8nSct?= =?us-ascii?Q?Sa1lYDA2aWNRhwA5GdiDRwCq+REqEEUEYiLogywypK7rLzojrpPxEWo7nIym?= =?us-ascii?Q?m+/h/KFsB2ujDfNXXshMtxZf1C2lLYU/QA9Vn48pFgure+EQZbo6tNMhwmOG?= =?us-ascii?Q?KLr+lf/E7Jhoi8GR18y1ysi0dFIhiGVnZ3tMkWcu8iCN7UifQLLHVv22Nbmk?= =?us-ascii?Q?qRCnnqcjW2YOaA57eWKXJb9WIk6oqPjXjZAxIVPsKAm+SB1iEkpSYdXePvep?= =?us-ascii?Q?li3QTuqsrjA9Sk4UkoX08BSioYErlET/Q8PMnH5NN6WZfdD9ugd0ZcUdeZZr?= =?us-ascii?Q?vg/iXs6pZT3hqN986ze57WbDHOsbV/7VWQQ86NL3r2ZTiwZ6zaxRa8bmHu8o?= =?us-ascii?Q?7iYz7v5JWdhD2GmQtQYuUJVZbD03JMys4XOFtxLqb5Pw4aR8lOlWzyapuLY2?= =?us-ascii?Q?62gKAdW2iCjWBmMw+Wpm/AFFLIW5foySpR5vCH0BKWPttNPBhiAb8bT7we6u?= =?us-ascii?Q?xkcjZlayANqChWgG4XvO8nV1f8EGrAgeIDtDbvKmJWdtXizjOeWjYI0IlrkQ?= =?us-ascii?Q?xbjBMtEZvdbyPcRn8az9GVstFEU+Ao5iMtlDeyQt0LmukSUl9OU3yLp/POUZ?= =?us-ascii?Q?wQAWPQsxtVvpUkgADkt7f3LdWpJBtr0Dmf/tgw8qGfY1Tcv+q3cQtPqdEopn?= =?us-ascii?Q?ddHR+ukG3icU6LLjMbaoSRwGDAVew9S8p4Gc7NUc9qM0IksMJacou5WRfZiY?= =?us-ascii?Q?58RPZF7Zil4nTaOKPPICHbO0+vPg2kjiuiiCfrgci5Gkevx2D6XavzyNGiSB?= =?us-ascii?Q?EUHVcEIGKE3OLJQ4oM+E7vXD3F8MufNpY86UWAJVYhJJiuvbQU0fj7dEg/+W?= =?us-ascii?Q?+571Gm8lGzq/KacpNwFhG/w4dWC9BmMUZD7+XoYVVP3k5+TpKlZ+9dCt/XWU?= =?us-ascii?Q?C0sr2IwevRwtS4ZntFHBowj3Ah6O7X0VQuuKZMhdgRMS3mpg5yfKmgW0MerN?= =?us-ascii?Q?AWOsFbfEgY=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 6:epcJrpnbgxeivbXhmoRxmNprys8GXxx3ns4wDUb29pN31mGBCGg5BaJhQX8icA4fyUJu2Unll5S9s93tQ6TKpbzfrV/Qb50pPKHGYo5dUfu4Xc2ZrqZ3tYuMcBjxlsWg8Mqkb6m4LovOL6BtWpX2G6MAvtYWRXz4o6v8PzUenK+WkxcdbgBzPoh8w1/ASTy5ck24xDfGc16E8995fwKzaFp0NXJP/rm4PoIuRq70C3S7zkKqgZxtjjYBOjdMhIFrkcf9q5x+WxdGdKo0VzxnAXEmzpj747ltbwLUZMgtj3eVItaA6dWJGsCUNwbg8OyBIg9sgsVEofX4H88DI65gg6DgixnvSKsfUJHkntKq2ZqsBqZrsWcq2+lAXTHrMJVVy91YTMArYNtuZhXG8YsnZg==; 5:1+GQA2gYGbmnog1fgMvvyDghg8jqJ8qejiKY6kPSUFlCNSFXq93XDUzXPdBj94sbe31yF/WW/H6SsrpBARf1QOQFipaAdpRa7uH6GWzrZS35rPZzwsbwzvPSb9YKHaZdP51aGNibnMByG0xP9jRj0A==; 24:iTGw6KEk3pXY8DLcRcfEz9WseuWn8spYMPitQWzhWOtiaZXtFUOwfvnGvCpBI5CQO/zIuopKfNRPN8Fcl3her9XHlVhmJUAMq8mC7MzYRhY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 7:QjqR8z6gn3ZBIYq3yzhqlsJvg5KpJOD5CSg5EriuGuD+HYlSWZ+aMwRrRqJOvF+b9RUzEmFw+dwowFkFQewx/lv8vfpbgsk87YZ0EFL0RAoLjocE75R9IgZpRJSJBE9Rg+rWnpTF0rzvmxNSjUBfU/fzurCSU8JIlgO/1M3bdIxObP2G494iXNXnyDC8pC0inHMgqf37ZEbR2yie25XC2xrWv3P1w3KW9zFT2M/UF5HT4DaSLSGWYWdBtSthspmYYvkb088jnlobwvqK+YNBnRV4O+qaJYWWdH5TR2QZUGGukc0uo0BlMubqxSNws8Fo74lAKxTs8ALbiqmF8NuxJA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2017 11:39:24.0000 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2277 Subject: [dpdk-dev] [PATCH v2 29/46] net/liquidio: add API to flush IQ 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:28 -0000 API to flush instruction queue checks how many packets reached device and frees associated host buffers using request list. 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 | 1 + drivers/net/liquidio/lio_rxtx.c | 187 +++++++++++++++++++++++++++++++++++++- drivers/net/liquidio/lio_rxtx.h | 1 + 3 files changed, 188 insertions(+), 1 deletion(-) diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 5c5aade..b8baa4f 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -281,6 +281,7 @@ static int lio_dev_configure(struct rte_eth_dev *eth_dev) * response arrived or timed-out. */ while ((*sc->status_word == LIO_COMPLETION_WORD_INIT) && --timeout) { + lio_flush_iq(lio_dev, lio_dev->instr_queue[sc->iq_no]); lio_process_ordered_list(lio_dev); rte_delay_ms(1); } diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 75ecbd5..64c0385 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -41,6 +41,9 @@ #include "lio_rxtx.h" #define LIO_MAX_SG 12 +/* Flush iq if available tx_desc fall below LIO_FLUSH_WM */ +#define LIO_FLUSH_WM(_iq) ((_iq)->max_count / 2) +#define LIO_PKT_IN_DONE_CNT_MASK 0x00000000FFFFFFFFULL static void lio_droq_compute_max_packet_bufs(struct lio_droq *droq) @@ -977,6 +980,146 @@ iq->request_list[idx].reqtype = reqtype; } +static inline void +lio_free_netsgbuf(void *buf) +{ + struct lio_buf_free_info *finfo = buf; + struct lio_device *lio_dev = finfo->lio_dev; + struct rte_mbuf *m = finfo->mbuf; + struct lio_gather *g = finfo->g; + uint8_t iq = finfo->iq_no; + + /* This will take care of multiple segments also */ + rte_pktmbuf_free(m); + + rte_spinlock_lock(&lio_dev->glist_lock[iq]); + STAILQ_INSERT_TAIL(&lio_dev->glist_head[iq], &g->list, entries); + rte_spinlock_unlock(&lio_dev->glist_lock[iq]); + rte_free(finfo); +} + +/* Can only run in process context */ +static int +lio_process_iq_request_list(struct lio_device *lio_dev, + struct lio_instr_queue *iq) +{ + struct octeon_instr_irh *irh = NULL; + uint32_t old = iq->flush_index; + struct lio_soft_command *sc; + uint32_t inst_count = 0; + int reqtype; + void *buf; + + while (old != iq->lio_read_index) { + reqtype = iq->request_list[old].reqtype; + buf = iq->request_list[old].buf; + + if (reqtype == LIO_REQTYPE_NONE) + goto skip_this; + + switch (reqtype) { + case LIO_REQTYPE_NORESP_NET: + rte_pktmbuf_free((struct rte_mbuf *)buf); + break; + case LIO_REQTYPE_NORESP_NET_SG: + lio_free_netsgbuf(buf); + break; + case LIO_REQTYPE_SOFT_COMMAND: + sc = buf; + irh = (struct octeon_instr_irh *)&sc->cmd.cmd3.irh; + if (irh->rflag) { + /* We're expecting a response from Octeon. + * It's up to lio_process_ordered_list() to + * process sc. Add sc to the ordered soft + * command response list because we expect + * a response from Octeon. + */ + rte_spinlock_lock(&lio_dev->response_list.lock); + rte_atomic64_inc( + &lio_dev->response_list.pending_req_count); + STAILQ_INSERT_TAIL( + &lio_dev->response_list.head, + &sc->node, entries); + rte_spinlock_unlock( + &lio_dev->response_list.lock); + } else { + if (sc->callback) { + /* This callback must not sleep */ + sc->callback(LIO_REQUEST_DONE, + sc->callback_arg); + } + } + break; + default: + lio_dev_err(lio_dev, + "Unknown reqtype: %d buf: %p at idx %d\n", + reqtype, buf, old); + } + + iq->request_list[old].buf = NULL; + iq->request_list[old].reqtype = 0; + +skip_this: + inst_count++; + old = lio_incr_index(old, 1, iq->max_count); + } + + iq->flush_index = old; + + return inst_count; +} + +static void +lio_update_read_index(struct lio_instr_queue *iq) +{ + uint32_t pkt_in_done = rte_read32(iq->inst_cnt_reg); + uint32_t last_done; + + last_done = pkt_in_done - iq->pkt_in_done; + iq->pkt_in_done = pkt_in_done; + + /* Add last_done and modulo with the IQ size to get new index */ + iq->lio_read_index = (iq->lio_read_index + + (uint32_t)(last_done & LIO_PKT_IN_DONE_CNT_MASK)) % + iq->max_count; +} + +int +lio_flush_iq(struct lio_device *lio_dev, struct lio_instr_queue *iq) +{ + uint32_t tot_inst_processed = 0; + uint32_t inst_processed = 0; + int tx_done = 1; + + if (rte_atomic64_test_and_set(&iq->iq_flush_running) == 0) + return tx_done; + + rte_spinlock_lock(&iq->lock); + + lio_update_read_index(iq); + + do { + /* Process any outstanding IQ packets. */ + if (iq->flush_index == iq->lio_read_index) + break; + + inst_processed = lio_process_iq_request_list(lio_dev, iq); + + if (inst_processed) + rte_atomic64_sub(&iq->instr_pending, inst_processed); + + tot_inst_processed += inst_processed; + inst_processed = 0; + + } while (1); + + rte_spinlock_unlock(&iq->lock); + + rte_atomic64_clear(&iq->iq_flush_running); + + return tx_done; +} + static int lio_send_command(struct lio_device *lio_dev, uint32_t iq_no, void *cmd, void *buf, uint32_t datasize __rte_unused, uint32_t reqtype) @@ -1385,6 +1528,35 @@ struct lio_soft_command * lio_dev->num_iqs--; } +static inline uint32_t +lio_iq_get_available(struct lio_device *lio_dev, uint32_t q_no) +{ + return ((lio_dev->instr_queue[q_no]->max_count - 1) - + (uint32_t)rte_atomic64_read( + &lio_dev->instr_queue[q_no]->instr_pending)); +} + +static inline int +lio_iq_is_full(struct lio_device *lio_dev, uint32_t q_no) +{ + return ((uint32_t)rte_atomic64_read( + &lio_dev->instr_queue[q_no]->instr_pending) >= + (lio_dev->instr_queue[q_no]->max_count - 2)); +} + +static int +lio_dev_cleanup_iq(struct lio_device *lio_dev, int iq_no) +{ + struct lio_instr_queue *iq = lio_dev->instr_queue[iq_no]; + uint32_t count = 10000; + + while ((lio_iq_get_available(lio_dev, iq_no) < LIO_FLUSH_WM(iq)) && + --count) + lio_flush_iq(lio_dev, iq); + + return count ? 0 : 1; +} + /** Send data packet to the device * @param lio_dev - lio device pointer * @param ndata - control structure with queueing, and buffer information @@ -1421,6 +1593,8 @@ struct lio_soft_command * goto xmit_failed; } + lio_dev_cleanup_iq(lio_dev, iq_no); + for (i = 0; i < nb_pkts; i++) { uint32_t pkt_len = 0; @@ -1432,6 +1606,14 @@ struct lio_soft_command * ndata.buf = m; ndata.q_no = iq_no; + if (lio_iq_is_full(lio_dev, ndata.q_no)) { + if (lio_dev_cleanup_iq(lio_dev, iq_no)) { + PMD_TX_LOG(lio_dev, ERR, + "Transmit failed iq:%d full\n", + ndata.q_no); + break; + } + } cmdsetup.cmd_setup64 = 0; cmdsetup.s.iq_no = iq_no; @@ -1524,8 +1706,11 @@ struct lio_soft_command * break; } - if (unlikely(status == LIO_IQ_SEND_STOP)) + if (unlikely(status == LIO_IQ_SEND_STOP)) { PMD_TX_LOG(lio_dev, DEBUG, "iq full\n"); + /* create space as iq is full */ + lio_dev_cleanup_iq(lio_dev, iq_no); + } processed++; } diff --git a/drivers/net/liquidio/lio_rxtx.h b/drivers/net/liquidio/lio_rxtx.h index b555bde..0a4cc2b 100644 --- a/drivers/net/liquidio/lio_rxtx.h +++ b/drivers/net/liquidio/lio_rxtx.h @@ -706,6 +706,7 @@ uint16_t lio_dev_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, int lio_setup_iq(struct lio_device *lio_dev, int q_index, union octeon_txpciq iq_no, uint32_t num_descs, void *app_ctx, unsigned int socket_id); +int lio_flush_iq(struct lio_device *lio_dev, struct lio_instr_queue *iq); void lio_delete_instruction_queue(struct lio_device *lio_dev, int iq_no); /** Setup instruction queue zero for the device * @param lio_dev which lio device to setup -- 1.8.3.1