From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB685A0560; Tue, 18 Oct 2022 21:45:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEEE1410EE; Tue, 18 Oct 2022 21:45:32 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 80B19410EE for ; Tue, 18 Oct 2022 21:45:31 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I9GWeE6OPNqMUO4R2tvVTlhuHkst/QdkRogXuqWm9qjEKX+wTdaVwNZHrDnIPeglKPhJFh82hE1n+EPsr+9AXoxjpj3FmdFS50kU3z9EmOZH23WM++SQIoFm6E7z0DOXaIOP+gTkVR1CdM53JLUi4JyiJohvAT+KPOAKdo0eQCNhYqZRQR1tY7l6Wws15ySS9dxea4Bf2Sajq3aPsLvKCKpQ5UyIj6ZtmM8sJ45OSFubjXqPat+g/48J45bX4ltXK+8ZH+AgJnnAjnBHXz+8LIt1RjiX6H2Paes3N7xsnOxLE7/BjPRPIoMGqe1CU9GSc1Ps9F/fOKZ4tH28Dwta3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/blywBohpRAVyMYcXh0XcsCxdC1aLdu1CP9P54GtcU0=; b=BfCLsl1WDNRCu6NWYxupAN7jXC5MUQldDEDSCB0cpDuJ2hifRg7gsRksgVK7HsLlHUySD6f5I6IodIN3+m+kJUyHMm05kkQ+I54V7uzfaE1VklCGryED+sC6bMiRFqBgr+vxucfCnOytMQ3fbArJkK5ricD/rqvvRV/gOAo1kBkVPsV5rUfChArbEXbTv04YgcXyR80sg4ssLNaipHoypa+Si8UezvEjiV6wlRvBchzLzvrG8AAYaWDAetg+0WcNDXQkwRyYQ7De3242VEVobOGuV4zHHHobgkqO8EWTyXrMezKFSbVaZ0eqAw0IGXRkluwNknE40L+mW/tWP3Okuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/blywBohpRAVyMYcXh0XcsCxdC1aLdu1CP9P54GtcU0=; b=hSNSpeztSpsf+t4s1I/i5s098YZ+AdOyxtYCr9IPaBQlIqLXOHSg/22bVVJ1dpKiWnAGLl3YhSNCWoL0qKDcrn4Pgr9yYbpNfN3OSjYJ/P6Jsak4crNHqosjKjK+v5Gw9j3Fzb2gBRf0+py5ynJwTRqSgTkFO/ocvy0dBHl4PVE= Received: from DS7PR03CA0041.namprd03.prod.outlook.com (2603:10b6:5:3b5::16) by SA3PR12MB7950.namprd12.prod.outlook.com (2603:10b6:806:31c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Tue, 18 Oct 2022 19:45:30 +0000 Received: from DM6NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b5:cafe::37) by DS7PR03CA0041.outlook.office365.com (2603:10b6:5:3b5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.31 via Frontend Transport; Tue, 18 Oct 2022 19:45:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT034.mail.protection.outlook.com (10.13.173.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.16 via Frontend Transport; Tue, 18 Oct 2022 19:45:29 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 14:45:07 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v2 16/36] net/ionic: free all buffers during Rx queue stop Date: Tue, 18 Oct 2022 12:41:11 -0700 Message-ID: <20221018194131.23006-17-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221011005032.47584-1-andrew.boyer@amd.com> References: <20221011005032.47584-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT034:EE_|SA3PR12MB7950:EE_ X-MS-Office365-Filtering-Correlation-Id: af8154d1-0f5f-4457-0d75-08dab1415003 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jeZ9bjNud8kcZhpYzaQbaFzE93MvK1OaV/NaCVI/wM0sNlLymjvdQEuge0pxTicK2CprDBt3n/Drl9tNh0aX8AIN2PxBCGZUgd28N3Un9CP2W8QoO05e7q5ngVJzR1+XiFe8KZZQc4bFLnFjylTl1NkwEQ2RSEKSiIGf2pBOyI6YDKRuNBOJvfcxVRK5yuKqBk2N16O2Gz1/i92ijtfHagTX8WXRMlZAgW5mgtqd+MuCFMov4hAvYNUS3O4VeAvqssjHeTwTFAT0LmyiOjppWbawlFuMZRb8unaKToRECrfxNZoZsAmsVimrNzi/j79MNxr+7BWZKu3JvmB46cF3fnzfAoHLywCJbjl1xQ3WGHWtPgriAtU7r3PHH18gjIEU4Qva88QC6UerYnXrjsO0FybksdYoXc+F3c/DsbZZdEL4E6eTAX/vYfGDoiOp+BSydpLW+CsJitrWHsUGRAjeHPy5NyMzCzWoIvXIXigND5QoeNzrgjn/1v9/8k6LxCYFBf39HSrvymIgnsqJfw2/5Dizn2CX7OcykMk7Q/bZBD5Co1bkuLvhWycG4xdwDQHCubgtuM39+C4j2VDsb8COxOKcGp5vSfkWUaqU0F9olAjsTnYZoxKfVV+fZm0rkJrM6dV+rWWLPnfa1nY45HhylIj2lxlFAeWWdos5Ct7N38GMcGfihix6N25PVW7thVo2viz3qwdZI61YZgqgGQO9yZknmKEe3YPygAStqlyQmFetNzT8eiQWQMEAJVlWEz/wEE7U92iK9jWlwuF1Ky06vLTD08u2Ug377Wnd0sz5zfBJ0ImX4xDOK2y/+EqxBO9d X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(396003)(39860400002)(346002)(451199015)(46966006)(40470700004)(36840700001)(186003)(426003)(47076005)(336012)(36860700001)(16526019)(1076003)(2906002)(82310400005)(5660300002)(316002)(6916009)(2616005)(86362001)(82740400003)(41300700001)(26005)(6666004)(8676002)(70206006)(70586007)(30864003)(83380400001)(40480700001)(81166007)(4326008)(356005)(8936002)(40460700003)(44832011)(478600001)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2022 19:45:29.8933 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af8154d1-0f5f-4457-0d75-08dab1415003 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7950 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Free all of the mbufs in the receive queue when the queue is stopped. This will allow them to be resized when the MTU is changed. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_dev.c | 16 +++++ drivers/net/ionic/ionic_dev.h | 2 + drivers/net/ionic/ionic_lif.c | 32 ++++----- drivers/net/ionic/ionic_lif.h | 4 -- drivers/net/ionic/ionic_rxtx.c | 116 +++++++++++++++------------------ 5 files changed, 81 insertions(+), 89 deletions(-) diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c index 1082a007d3..70c14882ed 100644 --- a/drivers/net/ionic/ionic_dev.c +++ b/drivers/net/ionic/ionic_dev.c @@ -317,6 +317,15 @@ ionic_cq_init(struct ionic_cq *cq, uint16_t num_descs) return 0; } +void +ionic_cq_reset(struct ionic_cq *cq) +{ + cq->tail_idx = 0; + cq->done_color = 1; + + memset(cq->base, 0, sizeof(struct ionic_nop_comp) * cq->num_descs); +} + void ionic_cq_map(struct ionic_cq *cq, void *base, rte_iova_t base_pa) { @@ -379,3 +388,10 @@ ionic_q_sg_map(struct ionic_queue *q, void *base, rte_iova_t base_pa) q->sg_base = base; q->sg_base_pa = base_pa; } + +void +ionic_q_reset(struct ionic_queue *q) +{ + q->head_idx = 0; + q->tail_idx = 0; +} diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h index 6dab7e5bbd..b77de30de1 100644 --- a/drivers/net/ionic/ionic_dev.h +++ b/drivers/net/ionic/ionic_dev.h @@ -225,6 +225,7 @@ struct ionic_doorbell __iomem *ionic_db_map(struct ionic_lif *lif, struct ionic_queue *q); int ionic_cq_init(struct ionic_cq *cq, uint16_t num_descs); +void ionic_cq_reset(struct ionic_cq *cq); void ionic_cq_map(struct ionic_cq *cq, void *base, rte_iova_t base_pa); typedef bool (*ionic_cq_cb)(struct ionic_cq *cq, uint16_t cq_desc_index, void *cb_arg); @@ -232,6 +233,7 @@ uint32_t ionic_cq_service(struct ionic_cq *cq, uint32_t work_to_do, ionic_cq_cb cb, void *cb_arg); int ionic_q_init(struct ionic_queue *q, uint32_t index, uint16_t num_descs); +void ionic_q_reset(struct ionic_queue *q); void ionic_q_map(struct ionic_queue *q, void *base, rte_iova_t base_pa); void ionic_q_sg_map(struct ionic_queue *q, void *base, rte_iova_t base_pa); diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index ccd7ea68bb..e7cb9e2ea3 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -30,25 +30,7 @@ static const uint8_t ionic_qtype_vers[IONIC_QTYPE_MAX] = { static int ionic_lif_addr_add(struct ionic_lif *lif, const uint8_t *addr); static int ionic_lif_addr_del(struct ionic_lif *lif, const uint8_t *addr); -int -ionic_qcq_enable(struct ionic_qcq *qcq) -{ - struct ionic_queue *q = &qcq->q; - struct ionic_lif *lif = qcq->lif; - struct ionic_admin_ctx ctx = { - .pending_work = true, - .cmd.q_control = { - .opcode = IONIC_CMD_Q_CONTROL, - .type = q->type, - .index = rte_cpu_to_le_32(q->index), - .oper = IONIC_Q_ENABLE, - }, - }; - - return ionic_adminq_post_wait(lif, &ctx); -} - -int +static int ionic_qcq_disable(struct ionic_qcq *qcq) { struct ionic_queue *q = &qcq->q; @@ -133,7 +115,6 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats for (i = 0; i < lif->nrxqcqs; i++) { struct ionic_rx_stats *rx_stats = &lif->rxqcqs[i]->stats; stats->ierrors += - rx_stats->no_cb_arg + rx_stats->bad_cq_status + rx_stats->no_room + rx_stats->bad_len; @@ -154,7 +135,6 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats stats->q_ipackets[i] = rx_stats->packets; stats->q_ibytes[i] = rx_stats->bytes; stats->q_errors[i] = - rx_stats->no_cb_arg + rx_stats->bad_cq_status + rx_stats->no_room + rx_stats->bad_len; @@ -1146,12 +1126,16 @@ ionic_lif_rss_teardown(struct ionic_lif *lif) void ionic_lif_txq_deinit(struct ionic_tx_qcq *txq) { + ionic_qcq_disable(&txq->qcq); + txq->flags &= ~IONIC_QCQ_F_INITED; } void ionic_lif_rxq_deinit(struct ionic_rx_qcq *rxq) { + ionic_qcq_disable(&rxq->qcq); + rxq->flags &= ~IONIC_QCQ_F_INITED; } @@ -1488,6 +1472,9 @@ ionic_lif_txq_init(struct ionic_tx_qcq *txq) ctx.cmd.q_init.ring_size); IONIC_PRINT(DEBUG, "txq_init.ver %u", ctx.cmd.q_init.ver); + ionic_q_reset(q); + ionic_cq_reset(cq); + err = ionic_adminq_post_wait(lif, &ctx); if (err) return err; @@ -1536,6 +1523,9 @@ ionic_lif_rxq_init(struct ionic_rx_qcq *rxq) ctx.cmd.q_init.ring_size); IONIC_PRINT(DEBUG, "rxq_init.ver %u", ctx.cmd.q_init.ver); + ionic_q_reset(q); + ionic_cq_reset(cq); + err = ionic_adminq_post_wait(lif, &ctx); if (err) return err; diff --git a/drivers/net/ionic/ionic_lif.h b/drivers/net/ionic/ionic_lif.h index c87f981803..a8f7458327 100644 --- a/drivers/net/ionic/ionic_lif.h +++ b/drivers/net/ionic/ionic_lif.h @@ -39,7 +39,6 @@ struct ionic_tx_stats { struct ionic_rx_stats { uint64_t packets; uint64_t bytes; - uint64_t no_cb_arg; uint64_t bad_cq_status; uint64_t no_room; uint64_t bad_len; @@ -207,9 +206,6 @@ int ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, struct ionic_tx_qcq **qcq_out); void ionic_qcq_free(struct ionic_qcq *qcq); -int ionic_qcq_enable(struct ionic_qcq *qcq); -int ionic_qcq_disable(struct ionic_qcq *qcq); - int ionic_lif_rxq_init(struct ionic_rx_qcq *rxq); void ionic_lif_rxq_deinit(struct ionic_rx_qcq *rxq); diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index c90d3d62f3..b2c3639e51 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -47,6 +47,34 @@ #include "ionic_lif.h" #include "ionic_rxtx.h" +static void +ionic_empty_array(void **array, uint32_t cnt, uint16_t idx) +{ + uint32_t i; + + for (i = idx; i < cnt; i++) + if (array[i]) + rte_pktmbuf_free_seg(array[i]); + + memset(array, 0, sizeof(void *) * cnt); +} + +static void __rte_cold +ionic_tx_empty(struct ionic_tx_qcq *txq) +{ + struct ionic_queue *q = &txq->qcq.q; + + ionic_empty_array(q->info, q->num_descs, 0); +} + +static void __rte_cold +ionic_rx_empty(struct ionic_rx_qcq *rxq) +{ + struct ionic_queue *q = &rxq->qcq.q; + + ionic_empty_array(q->info, q->num_descs, 0); +} + /********************************************************************* * * TX functions @@ -121,21 +149,16 @@ void __rte_cold ionic_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid) { struct ionic_tx_qcq *txq = dev->data->tx_queues[qid]; - struct ionic_tx_stats *stats = &txq->stats; IONIC_PRINT_CALL(); - IONIC_PRINT(DEBUG, "TX queue %u pkts %ju tso %ju", - txq->qcq.q.index, stats->packets, stats->tso); - - ionic_lif_txq_deinit(txq); - ionic_qcq_free(&txq->qcq); } int __rte_cold ionic_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id) { + struct ionic_tx_stats *stats; struct ionic_tx_qcq *txq; IONIC_PRINT(DEBUG, "Stopping TX queue %u", tx_queue_id); @@ -150,9 +173,14 @@ ionic_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id) * before disabling Tx queue */ - ionic_qcq_disable(&txq->qcq); + ionic_lif_txq_deinit(txq); - ionic_tx_flush(txq); + /* Free all buffers from descriptor ring */ + ionic_tx_empty(txq); + + stats = &txq->stats; + IONIC_PRINT(DEBUG, "TX queue %u pkts %ju tso %ju", + txq->qcq.q.index, stats->packets, stats->tso); return 0; } @@ -236,13 +264,9 @@ ionic_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id) IONIC_PRINT(DEBUG, "Starting TX queue %u, %u descs", tx_queue_id, txq->qcq.q.num_descs); - if (!(txq->flags & IONIC_QCQ_F_INITED)) { - err = ionic_lif_txq_init(txq); - if (err) - return err; - } else { - ionic_qcq_enable(&txq->qcq); - } + err = ionic_lif_txq_init(txq); + if (err) + return err; tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED; @@ -648,42 +672,16 @@ ionic_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads; } -static void __rte_cold -ionic_rx_empty(struct ionic_rx_qcq *rxq) -{ - struct ionic_queue *q = &rxq->qcq.q; - struct rte_mbuf *mbuf; - void **info; - - while (q->tail_idx != q->head_idx) { - info = IONIC_INFO_PTR(q, q->tail_idx); - mbuf = info[0]; - rte_mempool_put(rxq->mb_pool, mbuf); - - q->tail_idx = Q_NEXT_TO_SRVC(q, 1); - } -} - void __rte_cold ionic_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid) { struct ionic_rx_qcq *rxq = dev->data->rx_queues[qid]; - struct ionic_rx_stats *stats; if (!rxq) return; IONIC_PRINT_CALL(); - stats = &rxq->stats; - - IONIC_PRINT(DEBUG, "RX queue %u pkts %ju mtod %ju", - rxq->qcq.q.index, stats->packets, stats->mtods); - - ionic_rx_empty(rxq); - - ionic_lif_rxq_deinit(rxq); - ionic_qcq_free(&rxq->qcq); } @@ -787,17 +785,6 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq, rxm = info[0]; - if (!rx_svc) { - stats->no_cb_arg++; - /* Flush */ - rte_pktmbuf_free(rxm); - /* - * Note: rte_mempool_put is faster with no segs - * rte_mempool_put(rxq->mb_pool, rxm); - */ - return; - } - if (cq_desc->status) { stats->bad_cq_status++; ionic_rx_recycle(q, q_desc_index, rxm); @@ -1028,13 +1015,9 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id) IONIC_PRINT(DEBUG, "Starting RX queue %u, %u descs, size %u", rx_queue_id, rxq->qcq.q.num_descs, rxq->frame_size); - if (!(rxq->flags & IONIC_QCQ_F_INITED)) { - err = ionic_lif_rxq_init(rxq); - if (err) - return err; - } else { - ionic_qcq_enable(&rxq->qcq); - } + err = ionic_lif_rxq_init(rxq); + if (err) + return err; /* Allocate buffers for descriptor rings */ if (ionic_rx_fill(rxq) != 0) { @@ -1103,19 +1086,24 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do, int __rte_cold ionic_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id) { + uint8_t *rx_queue_state = eth_dev->data->rx_queue_state; + struct ionic_rx_stats *stats; struct ionic_rx_qcq *rxq; IONIC_PRINT(DEBUG, "Stopping RX queue %u", rx_queue_id); rxq = eth_dev->data->rx_queues[rx_queue_id]; - eth_dev->data->rx_queue_state[rx_queue_id] = - RTE_ETH_QUEUE_STATE_STOPPED; + rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; + + ionic_lif_rxq_deinit(rxq); - ionic_qcq_disable(&rxq->qcq); + /* Free all buffers from descriptor ring */ + ionic_rx_empty(rxq); - /* Flush */ - ionic_rxq_service(rxq, -1, NULL); + stats = &rxq->stats; + IONIC_PRINT(DEBUG, "RX queue %u pkts %ju mtod %ju", + rxq->qcq.q.index, stats->packets, stats->mtods); return 0; } -- 2.17.1