From patchwork Mon Oct 19 22:06:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aminek Kherbouche X-Patchwork-Id: 7753 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 276F28E96; Tue, 20 Oct 2015 00:07:08 +0200 (CEST) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by dpdk.org (Postfix) with ESMTP id 108778E7C for ; Tue, 20 Oct 2015 00:06:59 +0200 (CEST) Received: by wicfx6 with SMTP id fx6so19364471wic.1 for ; Mon, 19 Oct 2015 15:06:59 -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=MHZLaIi/1nA+FrY9DwvLQqd3hSxhxr+eiX4SVzdXvpM=; b=i0kYG1tklhH9NlNpVUHCTuzIicUn/Y82RgnSbzzigrjjJ5rkPqw8Y/wV/adEtwmzxS d6frCzL0HAYND4gvaoxuXkScc+WVXhhvgkIFeJlkaEe24N8bJUztXDMIQQ/9e5GhHEcJ G5mYgek2bfeV1WW8twwZDr64x+8jkLjuH+7vKPWxEi3MbN7sglCqRSSs2xE3O+KspvdV dtx3W3LIwmdRTQ/E7ELhM9zoq/r0sYuqOMYPzAuHmlGiuZDE4cexS1CaZU1WEAMOYUOh oTJQEUkPK/ZeDrIICRf79gUDpy0TV2zbgHl0hKIVH+yFGmmTTtsC9AIo/uTGk3ZB+Xg1 HaFA== X-Gm-Message-State: ALoCoQl0UNbJYTJVW909Jt5EL/h8zElzG9s+WeUpUvlzIgfs9thI/1Ce1IARZGr+yiqrrB3Oh65y X-Received: by 10.180.102.226 with SMTP id fr2mr24640183wib.3.1445292418938; Mon, 19 Oct 2015 15:06:58 -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.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 15:06:58 -0700 (PDT) From: Amine Kherbouche To: dev@dpdk.org Date: Tue, 20 Oct 2015 00:06:23 +0200 Message-Id: <1445292384-19815-6-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 5/6] i40e: 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" According to new fields in struct rte_eth_rxq_info, those are filled to add additional information about queue descriptors. Signed-off-by: Amine Kherbouche --- drivers/net/i40e/i40e_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index fa1451e..e958d56 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -3075,6 +3075,8 @@ i40e_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->mp = rxq->mp; qinfo->scattered_rx = dev->data->scattered_rx; qinfo->nb_desc = rxq->nb_rx_desc; + qinfo->used_desc = (uint16_t)i40e_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; @@ -3090,6 +3092,8 @@ i40e_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;