DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v7 7/9] bonding: per queue stats
Date: 30 Oct 2015 06:56:44 -0700	[thread overview]
Message-ID: <f90827$o22rt8@orsmga001.jf.intel.com> (raw)

Date: Fri, 30 Oct 2015 14:56:02 +0100
Message-Id: <1446213364-11856-8-git-send-email-tomaszx.kulasek@intel.com>
X-Mailer: git-send-email 2.1.4
In-Reply-To: <1446213364-11856-1-git-send-email-tomaszx.kulasek@intel.com>
References: <1444989651-6236-1-git-send-email-tomaszx.kulasek@intel.com>
 <1446213364-11856-1-git-send-email-tomaszx.kulasek@intel.com>

This patch adds fills bonding port's stats with a sum of corresponding

values taken from bonded slaves, when stats are requested for bonding port.



v5 changes:

 - removed queue_stats_mapping_set from eth_dev_ops of bonding device



Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>

Acked-by: Declan Doherty <declan.doherty@intel.com>

---

 drivers/net/bonding/rte_eth_bond_pmd.c |   11 ++++++++++-

 1 file changed, 10 insertions(+), 1 deletion(-)



diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c

index 2880f5c..eecb381 100644

--- a/drivers/net/bonding/rte_eth_bond_pmd.c

+++ b/drivers/net/bonding/rte_eth_bond_pmd.c

@@ -1801,7 +1801,7 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

 {

 	struct bond_dev_private *internals = dev->data->dev_private;

 	struct rte_eth_stats slave_stats;

-	int i;

+	int i, j;

 

 	for (i = 0; i < internals->slave_count; i++) {

 		rte_eth_stats_get(internals->slaves[i].port_id, &slave_stats);

@@ -1820,6 +1820,15 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

 		stats->rx_pause_xon += slave_stats.rx_pause_xon;

 		stats->tx_pause_xoff += slave_stats.tx_pause_xoff;

 		stats->rx_pause_xoff += slave_stats.rx_pause_xoff;

+

+		for (j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS; j++) {

+			stats->q_ipackets[j] += slave_stats.q_ipackets[j];

+			stats->q_opackets[j] += slave_stats.q_opackets[j];

+			stats->q_ibytes[j] += slave_stats.q_ibytes[j];

+			stats->q_obytes[j] += slave_stats.q_obytes[j];

+			stats->q_errors[j] += slave_stats.q_errors[j];

+		}

+

 	}

 }

 

-- 

1.7.9.5

             reply	other threads:[~2015-10-30 13:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 13:56 Tomasz Kulasek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-10-16 10:00 [dpdk-dev] [PATCH v6 0/9] Dynamic RSS Configuration for Bonding Tomasz Kulasek
2015-10-30 14:25 ` [dpdk-dev] [PATCH v7 " Tomasz Kulasek
2015-10-30 14:25   ` [dpdk-dev] [PATCH v7 7/9] bonding: per queue stats Tomasz Kulasek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='f90827$o22rt8@orsmga001.jf.intel.com' \
    --to=tomaszx.kulasek@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).