From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 54599A034E; Wed, 6 May 2020 21:52:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC7431DADC; Wed, 6 May 2020 21:52:33 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 160631DABE for ; Wed, 6 May 2020 21:52:32 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id t11so1621377pgg.2 for ; Wed, 06 May 2020 12:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vc4xuG/PZ4zRCNQVj6ULrtMt+HpfQZytQ0xROP/ptPk=; b=TlhWdhC8/5RKko9NPUyvaTGaVF5HmyfeqibdZYUJxmxXgsLyFoChBh0j3Tb3cvEGn3 FCUBr8phfZCpTkh0xbGJXat83oxgTogHGzsZHAz50BaACQM+eT5lfnSUpsaadcsBmkI5 k5BejtlEb+M+Zmb7Yr0mW0QrbggMAa9xhYZSDFia8fwQAu/29o/NMhME9jbDtLvhO2Qa aTnQsxH2TwV7Nibg1dHArwGc8NEgNRN6N/JwNfGk2BRW/z1PucGe6xj7vGhvH9dMKZPE wPIBPf2BniseQtxfQsV+cUjceBvwCfqRrp73C0Fynb/Ka5GTTcLh2HEs+0CYI7rEVw4x ADvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vc4xuG/PZ4zRCNQVj6ULrtMt+HpfQZytQ0xROP/ptPk=; b=SDrq0nRjoKXrySkGNDEPWBBD4iU0VpSrmu1qk2NsObGvQoMnvSp4+h498HEdvKc/a1 7s/blklNXzlttxHyJUgA0KHzsx2nfCpQBLwjG0t2q90tMRSOwrxUgZngmqixWnE5bNll eC+GSmNX3LAw3kDFPmsdCU4ZjY+MZ5Psn1j9YJmNCoHB5GNQTePjopeF46xMRd1GPvnb SeH7jFlewI5rvvD3t4B6JlZJW8qP4HGtwjN7Qd152rjYgPA183yUXOoGal7rEoS3IEiw y6WQ5LQnb9BaemxH6GoWoova4Ry3vOwMsPty9oyVISalvKsvv/eU14I9Ipp/b74exGFb W/Wg== X-Gm-Message-State: AGi0PubLpkyU8U+R4ClkdmlL75DQdPT38ojbbqbHyxAUouDkFKsN+PzV HcWzFXnuNu3wcgbCTUN7QWQU2b6SZCrajA== X-Google-Smtp-Source: APiQypIHQ8Uj1z6YZV8Wveg/ctvXElqvdQ2MwB4hNkQZDCV3DCJ1VyVsBVWCS5h7vEk8gOYNBZ1uSw== X-Received: by 2002:a62:6443:: with SMTP id y64mr9836349pfb.13.1588794750800; Wed, 06 May 2020 12:52:30 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w69sm2655604pff.168.2020.05.06.12.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 12:52:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 6 May 2020 12:52:18 -0700 Message-Id: <20200506195221.26306-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200506195221.26306-1-stephen@networkplumber.org> References: <20200506192730.21613-1-stephen@networkplumber.org> <20200506195221.26306-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/4] net/netvsc: support per-queue info requests 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is not a lot of info here from this driver. But worth supporting these additional info queries. Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_ethdev.c | 2 ++ drivers/net/netvsc/hn_rxtx.c | 20 ++++++++++++++++++++ drivers/net/netvsc/hn_var.h | 2 ++ 3 files changed, 24 insertions(+) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 55b8a63804a9..b890fa3befa8 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -860,6 +860,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = { .dev_stop = hn_dev_stop, .dev_close = hn_dev_close, .dev_infos_get = hn_dev_info_get, + .txq_info_get = hn_dev_tx_queue_info, + .rxq_info_get = hn_dev_rx_queue_info, .dev_supported_ptypes_get = hn_vf_supported_ptypes, .promiscuous_enable = hn_dev_promiscuous_enable, .promiscuous_disable = hn_dev_promiscuous_disable, diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 31fae5597598..668f48fcbf15 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -319,6 +319,15 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev, return err; } +void +hn_dev_tx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_txq_info *qinfo) +{ + struct hn_tx_queue *txq = dev->data->tx_queues[queue_id]; + + qinfo->nb_desc = txq->txdesc_pool->size; + qinfo->conf.offloads = dev->data->dev_conf.txmode.offloads; +} static struct hn_txdesc *hn_txd_get(struct hn_tx_queue *txq) { @@ -859,6 +868,17 @@ struct hn_rx_queue *hn_rx_queue_alloc(struct hn_data *hv, return rxq; } +void +hn_dev_rx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo) +{ + struct hn_rx_queue *rxq = dev->data->rx_queues[queue_id]; + + qinfo->mp = rxq->mb_pool; + qinfo->nb_desc = rxq->rx_ring->size; + qinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads; +} + int hn_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc, diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h index d1d38b459601..93168d2e0102 100644 --- a/drivers/net/netvsc/hn_var.h +++ b/drivers/net/netvsc/hn_var.h @@ -178,6 +178,8 @@ int hn_dev_rx_queue_setup(struct rte_eth_dev *dev, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp); +void hn_dev_rx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo); void hn_dev_rx_queue_release(void *arg); void hn_dev_free_queues(struct rte_eth_dev *dev); -- 2.20.1