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 A595F4265D; Thu, 28 Sep 2023 09:46:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7158240A72; Thu, 28 Sep 2023 09:46:24 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 0E61440273 for ; Thu, 28 Sep 2023 09:46:16 +0200 (CEST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Rx58F2tdFz15NRl; Thu, 28 Sep 2023 15:43:57 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 28 Sep 2023 15:46:13 +0800 From: Jie Hai To: , Gagandeep Singh , Sachin Saxena CC: , Subject: [PATCH v2 3/8] net/enetc: save deferred start configuratin for queues Date: Thu, 28 Sep 2023 15:43:00 +0800 Message-ID: <20230928074305.2991100-4-haijie1@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230928074305.2991100-1-haijie1@huawei.com> References: <20230908112901.1169869-1-haijie1@huawei.com> <20230928074305.2991100-1-haijie1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500020.china.huawei.com (7.221.188.8) X-CFilter-Loop: Reflected 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 This patch adds new fields to 'struct enetc_bdr' to save the configuratin of Rx and Tx deferred start. Signed-off-by: Jie Hai --- drivers/net/enetc/enetc.h | 2 ++ drivers/net/enetc/enetc_ethdev.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/enetc/enetc.h b/drivers/net/enetc/enetc.h index 7163633bcedf..170854cd1649 100644 --- a/drivers/net/enetc/enetc.h +++ b/drivers/net/enetc/enetc.h @@ -74,6 +74,8 @@ struct enetc_bdr { }; struct rte_mempool *mb_pool; /* mbuf pool to populate RX ring. */ struct rte_eth_dev *ndev; + bool rx_deferred_start; + bool tx_deferred_start; }; /* diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 1b4337bc488c..444792b7f77e 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -326,9 +326,11 @@ enetc_tx_queue_setup(struct rte_eth_dev *dev, ENETC_TBMR, ENETC_TBMR_EN); dev->data->tx_queue_state[tx_ring->index] = RTE_ETH_QUEUE_STATE_STARTED; + tx_ring->tx_deferred_start = false; } else { dev->data->tx_queue_state[tx_ring->index] = RTE_ETH_QUEUE_STATE_STOPPED; + tx_ring->tx_deferred_start = true; } return 0; @@ -473,9 +475,11 @@ enetc_rx_queue_setup(struct rte_eth_dev *dev, ENETC_RBMR_EN); dev->data->rx_queue_state[rx_ring->index] = RTE_ETH_QUEUE_STATE_STARTED; + rx_ring->rx_deferred_start = false; } else { dev->data->rx_queue_state[rx_ring->index] = RTE_ETH_QUEUE_STATE_STOPPED; + rx_ring->rx_deferred_start = true; } rx_ring->crc_len = (uint8_t)((rx_offloads & RTE_ETH_RX_OFFLOAD_KEEP_CRC) ? -- 2.30.0