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 6FE28A034F; Mon, 22 Mar 2021 10:38:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E51CE40040; Mon, 22 Mar 2021 10:38:21 +0100 (CET) Received: from dal2relay191.mxroute.com (dal2relay191.mxroute.com [64.40.26.191]) by mails.dpdk.org (Postfix) with ESMTP id 8DBBE4003D for ; Mon, 22 Mar 2021 10:38:20 +0100 (CET) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by dal2relay191.mxroute.com (ZoneMTA) with ESMTPSA id 178594ca3cd000362f.002 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 22 Mar 2021 09:38:18 +0000 X-Zone-Loop: 97b1e7c823c3982c0bb8c48d8d46325af15a77246b08 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=c9e++GSdwW6DQtyrxstTjgkYRVHCGsZ+UhA9xlG/Fj0=; b=XNicxoss3FzS5sf4szGnw0G481 0KnsH7cQrDdM6OEXhNX3Po2VLPzZdAZuK8cOmL4NOO333olxTRnPQ3l9eT/yjWylhCF57Wdd8fDzm Fp4u4jAZLBbDayosGfRBZk9kgOVXYcdO8CQOPkFpDRzuYS9ql8nh9yXyO94UYr56eHTc7EXPf8EUs JkZNlJaVNnjINHg+pvs6QIpwLHvGBIQXNea1iwE2vWd5PW6qT5uIV74bd7Aa87rquCq3vQHB4h5U6 d8/YiMRv/KT6Yoo3lKRhLdk312Wx5Mscjo5A+2ydYZ03JrLZUyQcZdCRKF7F1W+EFAD2a8+yQHmML 9YhCHjSA==; To: Ferruh Yigit , Lijun Ou , thomas@monjalon.net Cc: dev@dpdk.org, linuxarm@openeuler.org, Andrew Rybchenko , David Marchand , Luca Boccassi References: <1616070332-63414-1-git-send-email-oulijun@huawei.com> From: "Kinsella, Ray" Message-ID: <36995c99-0933-415f-1ec4-61f94dfee235@ashroe.eu> Date: Mon, 22 Mar 2021 09:38:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-AuthUser: mdr@ashroe.eu Subject: Re: [dpdk-dev] [PATCH] ethdev: add queue state when retrieve queue information 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 Sender: "dev" On 22/03/2021 09:22, Ferruh Yigit wrote: > On 3/18/2021 12:25 PM, Lijun Ou wrote: >> Currently, upper-layer application could get queue state only >> through pointers such as dev->data->tx_queue_state[queue_id], >> this is not the recommended way to access it. So this patch >> add get queue state when call rte_eth_rx_queue_info_get and >> rte_eth_tx_queue_info_get API. >> >> Note: The hairpin queue is not supported with above >> rte_eth_*x_queue_info_get, so the queue state could be >> RTE_ETH_QUEUE_STATE_STARTED or RTE_ETH_QUEUE_STATE_STOPPED. >> Note: After add queue_state field, the 'struct rte_eth_rxq_info' size >> remains 128B, and the 'struct rte_eth_txq_info' size remains 64B, so >> it could be ABI compatible. >> >> Signed-off-by: Chengwen Feng >> Signed-off-by: Lijun Ou > > <...> > >> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h >> index efda313..3b83c5a 100644 >> --- a/lib/librte_ethdev/rte_ethdev.h >> +++ b/lib/librte_ethdev/rte_ethdev.h >> @@ -1591,6 +1591,8 @@ struct rte_eth_rxq_info { >>       uint8_t scattered_rx;       /**< scattered packets RX supported. */ >>       uint16_t nb_desc;           /**< configured number of RXDs. */ >>       uint16_t rx_buf_size;       /**< hardware receive buffer size. */ >> +    /**< Queues state: STARTED(1) / STOPPED(0). */ >> +    uint8_t queue_state; >>   } __rte_cache_min_aligned; >>     /** >> @@ -1600,6 +1602,8 @@ struct rte_eth_rxq_info { >>   struct rte_eth_txq_info { >>       struct rte_eth_txconf conf; /**< queue config parameters. */ >>       uint16_t nb_desc;           /**< configured number of TXDs. */ >> +    /**< Queues state: STARTED(1) / STOPPED(0). */ >> +    uint8_t queue_state; >>   } __rte_cache_min_aligned; >>     /* Generic Burst mode flag definition, values can be ORed. */ >> > > This is causing an ABI warning [1], but I guess it is safe since the size of the struct is not changing (cache align). Adding a few more people to comment. Agreed, needs an amendment to libabigail.ignore to condone. > > [1] > https://travis-ci.com/github/ovsrobot/dpdk/builds/220497651