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 3D0E3A0A02; Tue, 6 Apr 2021 03:55:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE882406A2; Tue, 6 Apr 2021 03:55:21 +0200 (CEST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id 369764068B for ; Tue, 6 Apr 2021 03:55:20 +0200 (CEST) Received: by mail-pj1-f50.google.com with SMTP id t24so2976056pjw.4 for ; Mon, 05 Apr 2021 18:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8APfexPyGIbCA7VAKPmZRvV8/6SCY6sSie6RGv1f9zA=; b=vs2LRZv8ps9V/BD7O6c1VaUErGt26uzreHFhL9oynAOSSJq7PbyBf4ZNMT9yfDRJ8T 8ED5M34opblG/tbQYtjaP7qObmTIdsO8TBKYWSosqUYvemogGeWNwnzapAAqT2s4d912 LGNIIEpOPDqaKHewZXXSwYam1obkVktyyW0G4SUTsvZtub+LjkbGMvlttvbQ6T1Jy8Wd ng27qZjR7VwSNGy0OhMo6FMgk05EMM/qFk70my0RGXU9eJ6RN+5knzaWvyiw34ZCHPA9 hyjCEA3F+qI+GmaAQGDbEM/bLtyatDb0VeEdpmP7IyODyUgmABnzkYEBsxcmM6RItYdK JO9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8APfexPyGIbCA7VAKPmZRvV8/6SCY6sSie6RGv1f9zA=; b=bmYFTtg+otOn3kmYnfHBr9bytDQCdiOg2ikCeWZcfoumxaOQJlKLtpk/u5Y4YNQBVn Rp9bJ11i2jZvb4kRdr0k3GflvaHKuODF3ggPcDfeBniRo+eAOtwvnFTApY5kPFhKMaz9 EhHeww2deAs3b6bPc3g6fJ2palYfLnz8hx+o18BlVbZGPoaG1n/7sCpCb4LaE2Yx5H7I aXft989hCIGL7pBfpsr7PdXCjlCoDbFsJ2myKIh9FEOKSDMxZ5ghdBizA4RQZLLWb18o uSbwNObaPs4D3VUEMy9a99ITPbbAcXzqGx75l1/Pkgrvi9hwVILcA4aoM50X63shze7G 9TbA== X-Gm-Message-State: AOAM5324E1UjSTTAmQrRRnSN4CeHPpRHOeFwHDkyJuYK3+lhzly0MmRo BbCqHF8YP8n39gS5yTxKgSGBGg== X-Google-Smtp-Source: ABdhPJxPoUajY3+eF1hFJZ7xxWaX6y2Z2RNw7f1Um1fyfn6IuZl3IoTDEet/+yKo9pyhs3DxQvDuJw== X-Received: by 2002:a17:902:9a88:b029:e6:faf5:7ac2 with SMTP id w8-20020a1709029a88b02900e6faf57ac2mr26747274plp.19.1617674119171; Mon, 05 Apr 2021 18:55:19 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id d17sm16328857pfn.60.2021.04.05.18.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Apr 2021 18:55:18 -0700 (PDT) Date: Mon, 5 Apr 2021 18:55:10 -0700 From: Stephen Hemminger To: oulijun Cc: , Thomas Monjalon , Ferruh Yigit Message-ID: <20210405185510.02ee53fb@hermes.local> In-Reply-To: <3dfa2e6b-91b2-da43-a20a-84b8de362fad@huawei.com> References: <1616070332-63414-1-git-send-email-oulijun@huawei.com> <1616670560-62333-1-git-send-email-oulijun@huawei.com> <3dfa2e6b-91b2-da43-a20a-84b8de362fad@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH V2] 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 Tue, 6 Apr 2021 08:49:04 +0800 oulijun wrote: > > /** > > + * RX/TX queue states > > + */ > > +#define RTE_ETH_QUEUE_STATE_STOPPED 0 > > +#define RTE_ETH_QUEUE_STATE_STARTED 1 > > +#define RTE_ETH_QUEUE_STATE_HAIRPIN 2 These could be an enum? > > +/** > > * Ethernet device RX queue information structure. > > * Used to retrieve information about configured queue. > > */ > > @@ -1591,6 +1598,8 @@ struct rte_eth_rxq_info { > > uint8_t scattered_rx; /**< scattered packets RX supported. */ There is a one byte hole here waiting to be used. Why not use that? > > 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;