From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id 3F4588E7C for ; Tue, 20 Oct 2015 00:07:00 +0200 (CEST) Received: by wicfx6 with SMTP id fx6so19364974wic.1 for ; Mon, 19 Oct 2015 15:07:00 -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=EFaquuGGqv78nPUB/isVEQzq7lDz8kgdFhk3WfB4zHU=; b=iHFxyuqHh1ZpZoJuIdMrdRFC26trVoQ9/GfZPcgWrCPDr1pWH67Exd2Tcevc1L8O9V KA5NnCCbIUq2TRf380xUEafPa7NoM1kcdzMi4D6/MTitHEG5cgjRvdT4UdxSTf6x5Zf4 zrfMSCDAXw/W2ko0y9MQKa2WHsXE1g13BOY35nRXlHp0PRQaIH+StFVflMHzTuiketgh taQ6LJQTrBVmFxlGEXvTwJlWQgkJb6iQSbSaea2RaeviQksBCfj5U6bufCW3bczGwAES Mr0uYElV3Nhl7f2XFbrOvkCSHoeN/NJMvmtqe2E7d2lzy0FPVgNLekO/nwPpP47mAY56 nytg== X-Gm-Message-State: ALoCoQmZLGUjVgKWzamqoQGStWSfQ9W8KOjuZjE6MPLfQDlzVQqoUNetCPT2iLMk5c87Okou1NqN X-Received: by 10.180.87.71 with SMTP id v7mr15000635wiz.77.1445292420139; Mon, 19 Oct 2015 15:07:00 -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.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 15:06:59 -0700 (PDT) From: Amine Kherbouche To: dev@dpdk.org Date: Tue, 20 Oct 2015 00:06:24 +0200 Message-Id: <1445292384-19815-7-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 6/6] ixgbe: 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:07:00 -0000 According to new adds on struct rte_eth_rxq_info, some adds are done to this function to retreive information about used and free queue descriptors. Signed-off-by: Amine Kherbouche --- drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index ba08588..318d50f 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -4641,6 +4641,8 @@ ixgbe_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)ixgbe_dev_rx_queue_count(dev, 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; @@ -4656,6 +4658,8 @@ ixgbe_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->nb_tx_used; + qinfo->free_desc = txq->nb_tx_free + 1; qinfo->conf.tx_thresh.pthresh = txq->pthresh; qinfo->conf.tx_thresh.hthresh = txq->hthresh; -- 1.7.10.4