From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0049.outbound.protection.outlook.com [104.47.36.49]) by dpdk.org (Postfix) with ESMTP id D098BF932 for ; Sat, 25 Mar 2017 07:28:24 +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=mPnSJvh5U5+fp5Roi9lF4Jnb9op5Hg5GSkQV5c05mr5w3Mhr45UTAS7hEhiNlwdyJalWK4b6sNSdvGxpnVmLtLxS0ykouzDBKextrx+v36Ki7kCrets9l9Xix4Gb7UGXM+0Wf4iqPgKZQ/3lNph+SPQBOMdDxcI9oMXwm8Pcxs8= 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:21 +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:40 +0530 Message-Id: <1490423097-6797-30-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: 89b61d04-5d8c-444b-d1ec-08d473482362 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2280; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 3:ie1ZHEwRqlsZgg2Gz82n7A6fSxQZnpYveJZQAej0fXFCYFLSRA0gC7TAfZbnETVSa/4t3NOzKYOQatSjvWwk/W8OY0zp9ujo1ReSPUu1YlrE5cGulkEuMj3PNvp1ZBg2rJGY2+ncl9DX9R6eTLuTBp+kzQGbjaAVq3SzMVt6zUhXmWuLaD5eC8yXh5WI1IstmahNwGKozIWgQHE87Ktd9ewvoXauTp2JyvCJQy4ueDhDr+F+XkYZva8cQGvEmaCcZlXTWT/kuk7ZzrbzMaffSQ==; 25:G/6g58qDTaVZohobidyYe/b9/D+MTGwY8DeOTJEzxQvluZFbzF3Pgib/x21BHjWXkWZ7dhk4gW9B9mHYPQEl/UWs/QGAHdp0UikjndMrIz5DP2vhaX7vISZZ8kOii5t01r/MjpL1ii12iNI5iu9UvqAcLD9SCtxnE8XNtl5Wm+npJpeoDtfO90Aj+RW4Cve9Nr6UUA5+aHpiCU2ZAp5Ud7VNjFb70yqyobvqxQMxfZGOwqMtDG9OOE5b9VcPLb8nEqDFwZsoMlZ4C5AteAJ0CcnT6ox1xxdieLg1PkCaTn7dsSbcT7798ysO7xlssA4zS0LWRytO78lGJYeidfVtMELtc9yqEBjPxzv4oHVe9jfyZif8KCNVI2YXwl1wZ4kOGF5XL4ZaBNvHaPaXGHlJmMw5AUIS20k/dlFN+KXuC3vmBHM+da175RUMJwyALbwlV3ai3YLgzpeizx/rIOrF0A== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 31:z4Qt2lK2PLFzrj6HeS2fP5KLuZ5KDz4o9rC91GD0vbGlM+muticvU1JLMo7dOJhcNefVS18vZyyADPGUo0ptxCpdJ3dIsDD2WWh6O1qAWcCek9kfn513hNG2fRU1j8PnBiD3bgm9rEqVkkL2LvS6eBhRHQdRB/4oyzZpuV7Dy072eKCmUrF5WmD2Ty2Rtu8PQiWjdTDYV/6sg3UlJ5XXif6FfUpogZCLfvyTRdJ1RUo=; 20:D6PetKXRotaaVwO8BJFqFdDiNJyA2OaxBRuNYO2wx4oTOkRJJYUvuBXBaT3zt2gNsgirdIkc6C2iT/NIsCrSxE+wGfn71GdyWnTIbiFWK2Z0fxCILpq6iehsJbH96saBurCi82iM9X//8jARwfAWmJWZsPY5DN3qOfQoiwTCtx6I33wh6T6jmEP5jEbu04fR3AMACTifJugdd/FIHu97iHGP4A1lonUIV5J6TxPwn2pUdeG8BeyK7RY8Wrn3txKFMy72QaH5xWyRSELNWU4AHsggd4PKKFVjcIiqXhUHfzh65vGONPAUGzIuuM3IFZozbdgUOFtE/lTdBSVn+JJdiJ/3WXxmpACNYRVwgohgQP/RLyzWON/g681ckHk0uueG30NDJ0I12HlFSAe9sTCJ5+URTMGBi0PXYkCU2Nz0bebijL1VQToFdylxojQTSLD9v3adOAU3sH5jX7PLOTB2m5qiT+JTwTRzpbpcYbs19S4zNxVRODkzmiNPEV2Lh7WgGm5mY+B6NqIjooDLUk3yfA6/SwTofNY2arDUyVeQmNXGc59oCqa6BvflBlHIIXYhqAEZEer+DWuuQ+IQtCz+oO9dvBm54kY8fy/yjbEjghQ= 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:j2B7KgZxlLO0079CH/cVmkmrjHaKyycl+hReo3Qpivms5nxBdTLbknkIutLHGPRJNdl/AQAnvM5jDof+eSMFG+IifPX+j/VnAcSO8kWD+AYmB4hMbiHpDoYXonZIcs8EMeQrNlxnbyeilpoLv92mjS9vFk3xBg7vzkowEnsolhC00ZeRB33wNngC2kThf/cTCF1WNPTu9hBOCxewG3QILFdfKnXY3UmfxA87woBlrVpJpMw9zrFR9ElEeQ1JhndcNxZNVYkxEdORSbU4dN9idg0u3Km7yJAaHDfk7z3s768FW6h23CJZ17awgjuUBvPcFJus31zzYvsQR05vbRTzU7N5aTNdc151xpzf/hAWtQxWJGxqCfCuhQOD4rkIw1OSBCMyYa0JcSh+iceQkppcQP4vutJUIukl++IwBDaJiVbWzGuW8sLwExXIpfscVp1VMdbx4+RljpO2axzvyY+fADGqjakjzam8qwQLgZvkhU6FVUnim98PbevGc4zAJOJywQyXq/ZmwdviubAxQA3bneEbIwfhG7jUDXFORqVpN8PZAu10q3BYrHG6zdfJiYlsDhrhdIVzcZh4RqWXXm0LhhnwgRw8ZFY8aiT3SW+6urA= X-Forefront-PRVS: 025796F161 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39410400002)(39830400002)(43544003)(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:cnnbXp1FPc4oopNp9ituqKZcVDCOKdYpRjp0LTpjT?= =?us-ascii?Q?rqeO1E/dNQU+KhStw5XJ5hV+Tv7P+eVVzu8yAHDYTRGjY/S3ZIK7adNO9Yuf?= =?us-ascii?Q?NSrUoVmJxzJnASKqe/oRBlV+QTWo2zQILRgsf3teBKquB0K6dcLxUMc3VQx6?= =?us-ascii?Q?KCDKEeGJYePHulW88cvbatLIlvsSsXhl6QY4BY3WIIQwPTW9WtRBIm6NGjL+?= =?us-ascii?Q?Ehvr4hXYFQlm3/Lil1m5OCVQ04qI06DiPgdaL+jhsv/qmfLZ6p7xXwIRQXUn?= =?us-ascii?Q?1wPtF4Cv4mSjBaIonNJTp3V/pCPDCeMos72dTwyX3qaJm7vveVW4hVKE2w1g?= =?us-ascii?Q?3fFlwkSUDHur8AIx0D1RbglZQQm02F1xe2si9vdXLvXaxW+7r7MKXu4frDPV?= =?us-ascii?Q?P8JWtP/kENG0X1GU9qpW9Wwicido7c+0bIHNdtJU/vURUhU/NfXTUcF8UnHO?= =?us-ascii?Q?xNrC+ZYm2+VlFgTTObnQW5Jd+bZokpZoLnCmepml2j52a7li/ZYlLkWaAv6/?= =?us-ascii?Q?w8B6LlhAhQRWA2HcDWh6MKwSAH6fMQthNLSEcn/ll65Z3LC2ViEmpfvB4PxK?= =?us-ascii?Q?eiIIl8eKeTDLYtLeCBVB+YuPVczFri8eju6ZmfvSTstaFcwFxMi2OkXE8o6E?= =?us-ascii?Q?kvMr2rGS8mW1SkVVGm/3b1ERDrqQF/f7Ld21ButZE9HvwUtZMfcaG0ekEgCj?= =?us-ascii?Q?xS1EMo8JsBx69Wc672Aa0XVYlD5wBd0fN9IGErj05S7HLpsRLzObdrOSdPzK?= =?us-ascii?Q?3JhufI2Ja3Jd9wYu6UNEIK4W/DQ7gUmhQoJ3OUJOB3C0Vo78mGtQlMA0pv3O?= =?us-ascii?Q?wZc61vsnVd0VFv19VcKvUgP8nWyF5iLHrV9M32gU672NolXSSgPzGjzGuXTu?= =?us-ascii?Q?0JenSz0L/wyS408a6eTj6N6OXClfPdaVlqp3NCQLwk1WOnX4K2y9r9IddiSF?= =?us-ascii?Q?HrnkiKFV5iBOZM9ndNgUaSk+0coBR+jEPJY9xT2MI/hVh2Nxdl3BujXCGczy?= =?us-ascii?Q?F6OFqPQemibkWSvk3YdsgD9J7iUnWIU5OTvM/oEBI+WDtWZoyq4uuEp+hoQG?= =?us-ascii?Q?mFILUIWMQHTY2NWzMGWUk0/Wdtp6CkhAglq/cPkWZ+5+moDAQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 6:/L8oVO2armd75ALTZ+kDgaegATxudytT4AgxRC6R0QQ/u6piDhOVJzfezBbxa6lAa69LaD1dxmnSHVrbTFEgrD9xKxZfRuj69puoTsn96Df5NhYgG2JXhoS7wox9/AajqCdseDXHuyDiDJiEXuxw7lwQIny+9/F29LHqMA72AiqCjfnz0zqukfh6i5UbXqOcHpB6W15GYnuT8+wL3UwTdZIPEAV/KK/HmbSObc/hY13vGb/SyNdDHJcFB/lpWdL55HBfdB6Ia9rR1OopVXAR9bcYUon9r9qzMmAxPv7iXBjohoK8Kr3B/nNQQikGkN/hl5vBAZU/gJeJd7k6awSY2a2Z50c5KwxQQmOPSVbPb7N/En4INM3EAw7hzPh3A1D5v/ocP+bQ1hmFamG7pzzTDw==; 5:Xth35qA/l/NlW+5LIYEfmaviv5qvnU7huByG8te2XEVth4gNtKijq+UECMQWQbQWsCuw8WuW3Ezwldgz/o5oVVo1cvZ989V1Wy4/+o9PH9n4qY5wdYPS6eA3QjJjjw0M598cCidxMjxTlhDwRrnktA==; 24:aEdY+1OkLH85dnpb08KUny39aXbhO6CDZXvaXAkGgQZaC2+moBZ8dr3qD8zsFPG9VTh+vX37KTXb3ZIaS8r/U7LwsZxVMhlM94BXrYmfl5k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2280; 7:eOpDM3zw6PqmmEnZLIf/TdBYJK8jfeUI6Sp5tvLeDI34skTa3lFJM9bdNs2Fqnbj/fOkxCi5p6EAfuZO1XnEknvTK7oUBXDQRW+B31Yu/ZlDmm42x6byZaywCoSsNsDR16wxcq45XeV79wpFZVuTObGA1qp/Gnl1gH5TORnK2MsnKaD5/ZhWW6RATjbjqkRPoeB/iJ9MorOymNAu/kVNED8HQDIs9FpH4QNrWRg4zLxNJtjWIixUw7rzi7fluYlpfW7lzep+p2rLP7XqOI3C9VMJ+cdjrgG18l/nonYvVki9ESGt79Bb4e7VJnQkwRBtaEcTATutteLRuGgUoxioUA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2017 06:28:21.0391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2280 Subject: [dpdk-dev] [PATCH v3 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: Sat, 25 Mar 2017 06:28:25 -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