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 6321AA034E; Wed, 6 May 2020 21:27:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 796011D9FD; Wed, 6 May 2020 21:27:50 +0200 (CEST) Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by dpdk.org (Postfix) with ESMTP id 50E8B1D9F0 for ; Wed, 6 May 2020 21:27:48 +0200 (CEST) Received: by mail-pj1-f67.google.com with SMTP id t9so1424400pjw.0 for ; Wed, 06 May 2020 12:27:48 -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=EGzjZdZC5F4TNmyBK5aH1h2QVpcgQMd1zR1e/0s7q18=; b=ExzbKRE2yeA1LhpRRFNA9NAxF7ytMsgK7unaB7r0x7cM3Eafj929bjYU4R39NN+i+R icJX4bswD6BKr6YjNBgsKxJnQndZXuy8JlTEtEAKI6k8dic+QqsTUwjgnielHk/H5dwy V708lPm2ZEmi6daMZiOKOc7GERJPzzFdiPhacXoUDPgr0Zvd/PcboJH+Pbj1DdYRnGge THe2cTxiTQ2j0NEd9T70rjrmvdjF7F+8H1LwmN1CxnDbrshBZzSoVJcWQ6Pg/YrR0bWL j5Uy0XcG0vRrUWyNSqQaIgyDGboVBQvz3pjfV4A9bmH1FddrF/xehbevh7q4L/p+V8IE +FAA== 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=EGzjZdZC5F4TNmyBK5aH1h2QVpcgQMd1zR1e/0s7q18=; b=U0KNAHYD6P40EKkML642U8yeVrwE0+8/ceRkpL//cuqCur17Ofjk4oCrJHv/dDeQNY hlekgEkmHxkbjsPMdiOpJz06PuFX5gaK7JM68DhoYHqc3ti+YZmeVYbZMgNU5q0JH7+H e4ebxxD0QycOi/CrjbpJq6+NuI7mw/Z5BgIv2qQ3XPeTKjGZnTCnog+5TxVJSSr3/K7L 9OIbNC723MPtJIMPK6wd7zDekCzQS3nU0rWlqcRjlTH4b7Pps5qrgv56HwiFcGAy+eB1 O4irItfBeI6Lud8OqsNFkzDt9y2owx5st/yt4Gnszb//TyhYIb97CoLNA7NOFAtbTMsL voLQ== X-Gm-Message-State: AGi0PuZBgIf1r3LrUnixsa17hT2bLqZ9i3YqUqiLaWSYZEt0fpu7AA3Y vev1JH2sNt39bsQyRXVlcMnuB5/HB9ymPw== X-Google-Smtp-Source: APiQypJTffrwptCIKPR6bih5uW5mVa2smo420fQZaWseMIkf9mJRpE6RmBG0/QomDOqXkUbIf/vniA== X-Received: by 2002:a17:90a:3266:: with SMTP id k93mr11731539pjb.118.1588793267039; Wed, 06 May 2020 12:27:47 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i15sm2105511pgj.30.2020.05.06.12.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 12:27:45 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 6 May 2020 12:27:27 -0700 Message-Id: <20200506192730.21613-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200506192730.21613-1-stephen@networkplumber.org> References: <20200506192730.21613-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 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 the standard values for number of descriptors and offloads flags. 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