From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id E248B8E7A for ; Tue, 20 Oct 2015 00:06:57 +0200 (CEST) Received: by wicfv8 with SMTP id fv8so2266548wic.0 for ; Mon, 19 Oct 2015 15:06:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mFxLM46rvHuAB93I0FhXctlUREuPFwrUTMAZYlVyZ7M=; b=PfdTGZeE6t3n+iHPjrAkBd3Vx3Fsra4zsCplmMQy+SM98oFFTyXP2ageaYtYFkb+su FQ4jIhS92HIRTYjeUyY9g33SDnj9jnAe/m2Y3IpET4pdQSnTUAYoXreCg4TFj8Yr5Ox4 BZEOM6+mBa1yKpoCP5MWYoT8o3K85N/CfY+dbYKNCCwRi+zhhukhkl5TypbxPFb3xdvi 9zghTQUGVBZ4yGTQcWN2GBpevwZE5mjcv71qk7KqTRUpeNa+OXb1jeHhaPVMlryvbc4O CsLrxU0RKVkG/XkXsvKp/LgkpIenr/S489yrQjraBH71cMWl99XGKfMnfgJigNTd36s/ 05IQ== X-Gm-Message-State: ALoCoQmKZ6gLoaRQXMG9ri5dlYajwKq0JElnc/kI6WqEbfr+2VYfOzloC63C/XMx+XpZJYLcCJkG X-Received: by 10.180.188.47 with SMTP id fx15mr22631623wic.41.1445292417806; Mon, 19 Oct 2015 15:06:57 -0700 (PDT) Received: from griffon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id jd7sm42620096wjb.19.2015.10.19.15.06.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 15:06:57 -0700 (PDT) From: Amine Kherbouche To: dev@dpdk.org Date: Tue, 20 Oct 2015 00:06:22 +0200 Message-Id: <1445292384-19815-5-git-send-email-amine.kherbouche@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1445292384-19815-1-git-send-email-amine.kherbouche@6wind.com> References: <1443729293-20753-2-git-send-email-konstantin.ananyev@intel.com> <1445292384-19815-1-git-send-email-amine.kherbouche@6wind.com> Cc: amine.kherbouche@6wind.com Subject: [dpdk-dev] [dpdk-dev, PATCHv6 4/6] e1000: enhance eth_(rxq|txq)_info_get to retrieve more queue information X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2015 22:06:58 -0000 Enhance both functions of e1000 and igb to retrieve more informations about queue descriptors according to new adds on rte_eth_(tx|rx)q_info struct Signed-off-by: Amine Kherbouche --- drivers/net/e1000/em_rxtx.c | 4 ++++ drivers/net/e1000/igb_rxtx.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 03e1bc2..1ff750b 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -1873,6 +1873,8 @@ em_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->mp = rxq->mb_pool; qinfo->scattered_rx = dev->data->scattered_rx; qinfo->nb_desc = rxq->nb_rx_desc; + qinfo->used_desc = (uint16_t)eth_em_rx_queue_count(dev, queue_id); + qinfo->free_desc = qinfo->nb_desc - qinfo->used_desc; qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; } @@ -1885,6 +1887,8 @@ em_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, txq = dev->data->tx_queues[queue_id]; qinfo->nb_desc = txq->nb_tx_desc; + qinfo->free_desc = txq->nb_tx_free; + qinfo->used_desc = qinfo->nb_desc - qinfo->free_desc; qinfo->conf.tx_thresh.pthresh = txq->pthresh; qinfo->conf.tx_thresh.hthresh = txq->hthresh; diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index cca3300..4956075 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -2483,6 +2483,8 @@ igb_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->mp = rxq->mb_pool; qinfo->scattered_rx = dev->data->scattered_rx; qinfo->nb_desc = rxq->nb_rx_desc; + qinfo->used_desc = eth_igb_rx_queue_count(dev, rxq->queue_id); + qinfo->free_desc = qinfo->nb_desc - qinfo->used_desc; qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; qinfo->conf.rx_drop_en = rxq->drop_en; @@ -2497,6 +2499,8 @@ igb_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, txq = dev->data->tx_queues[queue_id]; qinfo->nb_desc = txq->nb_tx_desc; + qinfo->used_desc = txq->tx_tail - txq->tx_head % txq->nb_tx_desc; + qinfo->free_desc = qinfo->nb_desc - qinfo->used_desc; qinfo->conf.tx_thresh.pthresh = txq->pthresh; qinfo->conf.tx_thresh.hthresh = txq->hthresh; -- 1.7.10.4