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 64B24A0093; Tue, 19 May 2020 18:52:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0205A1D62E; Tue, 19 May 2020 18:52:56 +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 571BE1D604 for ; Tue, 19 May 2020 18:52:51 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id d10so114838pgn.4 for ; Tue, 19 May 2020 09:52:51 -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=E4K1MzKPCEk2qicqTjqJ04O3g6ZOFzGLnvgIKGmuCjs=; b=Z5dcYW3+3WsErAes2OVr/82/rztG+C2KuV+7DHKiu6sO3FXbzs0orC7EWWUcGmKQPF zWeSw06WnkL89fFpw2UdmJVERL7dyo2ZB90dVaQariOquzi450NNwtGxojOp/EbkrG7x mKtdj5X1O8Od/P7KcKI6bIrEEIHRefx4B+64PsT0quIId1wAiweSsaQzEg3HeP4ev/Ny K6p3QE98kQUuGKhW64l/+gWypLiVnuOPYUgyMh3ihM4+iAKNi41WNyte+msNc0G8IRzz C20dlNo2vqM9loFDHS5oNa7aMFlKx89d5EuZRqqpOzLcm/PkvmZZtdO1Kyg7MSO5ZeLh TxYw== 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=E4K1MzKPCEk2qicqTjqJ04O3g6ZOFzGLnvgIKGmuCjs=; b=Cpj/4EVJtW6R4ORy6c9LmaItyHoNWjBv5aHt5IMnC91o1/6jyOBpW2I6YSWxHU2axw 8HCkWtRISqeVvLJlFROmbGPOmd0Blr36pZku6F9pW70H3g03tDebh3w6jzbjSYFiktXj q6m3Z6TPPOLL1IAsyZwGFyGOAANaCzFdu8Fbd7VzzZny7q9f2/n+sp737kYASjf5zrcu 2AtAqn559twFfdpTWaYXVTEfmY1jFxl7okLrtv3w7XP/qF/kfnEzyq0Hk0FKHH92xX9Z PkqTFy07OMycXPwpUh482Qgq74y2m3+r6Vj1Hf2N9JOc+QaEab32zpnL6tKvaYUc0Gvd OuFw== X-Gm-Message-State: AOAM533rXzbIe5410PHAxO4DNKw7L0ikLYNV6a1c0eNAY/EjUdGI6ftx SXw4mHw7TSgIkQub13JMX0CZWIbvlKTzKw== X-Google-Smtp-Source: ABdhPJx/NEx1X5LJJbsZiMrq7r5Cs5jE4ZZVKyisLNoRgpGg1GULHsgd8RJyxkQ6GcULs/rYyc0W4Q== X-Received: by 2002:a62:1cc9:: with SMTP id c192mr12004pfc.197.1589907170052; Tue, 19 May 2020 09:52:50 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c12sm107394pjm.46.2020.05.19.09.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 09:52:48 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 19 May 2020 09:52:24 -0700 Message-Id: <20200519165230.23306-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200519165230.23306-1-stephen@networkplumber.org> References: <20200506192730.21613-1-stephen@networkplumber.org> <20200519165230.23306-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/7] 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.26.2