DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev
@ 2015-10-17  0:14 Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 1/9] vmxnet3: drop deprecated statistics Stephen Hemminger
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

Complete the work that was started by Maryam Tahhan 
to deprecate driver specific fields in Ethernet statistics.
This fixes all the drivers, then tests,
and finally actually marks them as deprecated.

Stephen Hemminger (9):
  vmxnet3: drop deprecated statistics
  ixgbe: drop statistics marked for deprecation
  bond: don't sum deprecated statistics
  cxgbe: don't report deprecated statistics
  i40e: don't report deprecated statistics
  enic: don't fill in deprecated statistics
  e1000: don't report deprecated statistics
  test-pmd: don't check deprecated ethernet statistics
  rte_ether: mark deprecated statistics with attribute

 app/test-pmd/config.c                      | 30 +++---------------
 app/test-pmd/testpmd.c                     | 50 ++++++------------------------
 app/test/test_pmd_perf.c                   | 12 +++----
 drivers/net/bonding/rte_eth_bond_pmd.c     |  7 -----
 drivers/net/cxgbe/cxgbe_ethdev.c           | 16 +++-------
 drivers/net/e1000/em_ethdev.c              | 15 ++-------
 drivers/net/e1000/igb_ethdev.c             | 15 ++-------
 drivers/net/enic/enic_main.c               |  1 -
 drivers/net/i40e/i40e_ethdev.c             | 11 +++----
 drivers/net/ixgbe/ixgbe_ethdev.c           |  2 --
 drivers/net/vmxnet3/vmxnet3_ethdev.c       |  1 -
 lib/librte_eal/common/include/rte_common.h |  3 ++
 lib/librte_ether/rte_ethdev.h              | 22 ++++++-------
 13 files changed, 46 insertions(+), 139 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 1/9] vmxnet3: drop deprecated statistics
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 2/9] ixgbe: drop statistics marked for deprecation Stephen Hemminger
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

Don't report statistic values marked for deprecation

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index a70be5c..44b4d32 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -660,7 +660,6 @@ vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
 		stats->q_errors[i] = rxStats->pktsRxError;
 		stats->ierrors += rxStats->pktsRxError;
-		stats->imcasts += rxStats->mcastPktsRxOK;
 		stats->rx_nombuf += rxStats->pktsRxOutOfBuf;
 	}
 }
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 2/9] ixgbe: drop statistics marked for deprecation
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 1/9] vmxnet3: drop deprecated statistics Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 3/9] bond: don't sum deprecated statistics Stephen Hemminger
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

The statistics fields that are marked deprecated should not
be reported.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ec2918c..56d56e0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2313,8 +2313,6 @@ ixgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ibytes = hw_stats->vfgorc;
 	stats->opackets = hw_stats->vfgptc;
 	stats->obytes = hw_stats->vfgotc;
-	stats->imcasts = hw_stats->vfmprc;
-	/* stats->imcasts should be removed as imcasts is deprecated */
 }
 
 static void
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 3/9] bond: don't sum deprecated statistics
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 1/9] vmxnet3: drop deprecated statistics Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 2/9] ixgbe: drop statistics marked for deprecation Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 4/9] cxgbe: don't report " Stephen Hemminger
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

These statistics are marked deprecated, leave them alone.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 5cc6372..2e1b8a0 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1768,14 +1768,7 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->obytes += slave_stats.obytes;
 		stats->ierrors += slave_stats.ierrors;
 		stats->oerrors += slave_stats.oerrors;
-		stats->imcasts += slave_stats.imcasts;
 		stats->rx_nombuf += slave_stats.rx_nombuf;
-		stats->fdirmatch += slave_stats.fdirmatch;
-		stats->fdirmiss += slave_stats.fdirmiss;
-		stats->tx_pause_xon += slave_stats.tx_pause_xon;
-		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;
 	}
 }
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 4/9] cxgbe: don't report deprecated statistics
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
                   ` (2 preceding siblings ...)
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 3/9] bond: don't sum deprecated statistics Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 5/9] i40e: " Stephen Hemminger
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

Some of the ethernet device statistics are marked deprecated
and should not be reported.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 drivers/net/cxgbe/cxgbe_ethdev.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 478051a..5d2bac3 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -578,23 +578,17 @@ static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
 	/* RX Stats */
 	eth_stats->ipackets = ps.rx_frames;
 	eth_stats->ibytes   = ps.rx_octets;
-	eth_stats->imcasts  = ps.rx_mcast_frames;
-	eth_stats->imissed  = ps.rx_ovflow0 + ps.rx_ovflow1 +
+	eth_stats->ierrors  = ps.rx_symbol_err + ps.rx_fcs_err +
+			      ps.rx_jabber + ps.rx_too_long + ps.rx_runt +
+			      ps.rx_len_err +  ps.rx_ovflow0 + ps.rx_ovflow1 +
 			      ps.rx_ovflow2 + ps.rx_ovflow3 +
-			      ps.rx_trunc0 + ps.rx_trunc1 +
-			      ps.rx_trunc2 + ps.rx_trunc3;
-	eth_stats->ibadcrc  = ps.rx_fcs_err;
-	eth_stats->ibadlen  = ps.rx_jabber + ps.rx_too_long + ps.rx_runt;
-	eth_stats->ierrors  = ps.rx_symbol_err + eth_stats->ibadcrc +
-			      eth_stats->ibadlen + ps.rx_len_err +
-			      eth_stats->imissed;
-	eth_stats->rx_pause_xon  = ps.rx_pause;
+                              ps.rx_trunc0 + ps.rx_trunc1 +
+                              ps.rx_trunc2 + ps.rx_trunc3;
 
 	/* TX Stats */
 	eth_stats->opackets = ps.tx_frames;
 	eth_stats->obytes   = ps.tx_octets;
 	eth_stats->oerrors  = ps.tx_error_frames;
-	eth_stats->tx_pause_xon  = ps.tx_pause;
 
 	for (i = 0; i < pi->n_rx_qsets; i++) {
 		struct sge_eth_rxq *rxq =
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 5/9] i40e: don't report deprecated statistics
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
                   ` (3 preceding siblings ...)
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 4/9] cxgbe: don't report " Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 6/9] enic: don't fill in " Stephen Hemminger
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

The fields in ethernet statistics that are marked deprecated
should not be filled in.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 drivers/net/i40e/i40e_ethdev.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2dd9fdc..9d3341d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1518,15 +1518,12 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ibytes   = ns->eth.rx_bytes;
 	stats->obytes   = ns->eth.tx_bytes;
 	stats->oerrors  = ns->eth.tx_errors;
-	stats->imcasts  = ns->eth.rx_multicast;
-	stats->fdirmatch = ns->fd_sb_match;
 
 	/* Rx Errors */
-	stats->ibadcrc  = ns->crc_errors;
-	stats->ibadlen  = ns->rx_length_errors + ns->rx_undersize +
-			ns->rx_oversize + ns->rx_fragments + ns->rx_jabber;
-	stats->imissed  = ns->eth.rx_discards;
-	stats->ierrors  = stats->ibadcrc + stats->ibadlen + stats->imissed;
+	stats->ierrors  = ns->crc_errors +
+			  ns->rx_length_errors + ns->rx_undersize +
+			  ns->rx_oversize + ns->rx_fragments + ns->rx_jabber +
+			  ns->eth.rx_discards;
 
 	PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************");
 	PMD_DRV_LOG(DEBUG, "rx_bytes:            %"PRIu64"", ns->eth.rx_bytes);
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 6/9] enic: don't fill in deprecated statistics
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
                   ` (4 preceding siblings ...)
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 5/9] i40e: " Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 7/9] e1000: don't report " Stephen Hemminger
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

Some fields in rte_ethdev statistics are marked deprecated
and should not be reported by drivers.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 drivers/net/enic/enic_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 398ada2..b2c47e7 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -224,7 +224,6 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)
 	r_stats->ierrors = stats->rx.rx_errors;
 	r_stats->oerrors = stats->tx.tx_errors;
 
-	r_stats->imcasts = stats->rx.rx_multicast_frames_ok;
 	r_stats->rx_nombuf = stats->rx.rx_no_bufs;
 }
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 7/9] e1000: don't report deprecated statistics
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
                   ` (5 preceding siblings ...)
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 6/9] enic: don't fill in " Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 8/9] test-pmd: don't check deprecated ethernet statistics Stephen Hemminger
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

These fields are marked deprecated don't use them.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 drivers/net/e1000/em_ethdev.c  | 15 +++------------
 drivers/net/e1000/igb_ethdev.c | 15 ++-------------
 2 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 912f5dd..9e1f105 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -846,12 +846,9 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 		return;
 
 	/* Rx Errors */
-	rte_stats->ibadcrc = stats->crcerrs;
-	rte_stats->ibadlen = stats->rlec + stats->ruc + stats->roc;
-	rte_stats->imissed = stats->mpc;
-	rte_stats->ierrors = rte_stats->ibadcrc +
-	                     rte_stats->ibadlen +
-	                     rte_stats->imissed +
+	rte_stats->ierrors = stats->crcerrs +
+	                     stats->rlec + stats->ruc + stats->roc +
+	                     stats->mpc +
 	                     stats->rxerrc + stats->algnerrc + stats->cexterr;
 
 	/* Tx Errors */
@@ -861,12 +858,6 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 	rte_stats->opackets = stats->gptc;
 	rte_stats->ibytes   = stats->gorc;
 	rte_stats->obytes   = stats->gotc;
-
-	/* XON/XOFF pause frames stats registers */
-	rte_stats->tx_pause_xon  = stats->xontxc;
-	rte_stats->rx_pause_xon  = stats->xonrxc;
-	rte_stats->tx_pause_xoff = stats->xofftxc;
-	rte_stats->rx_pause_xoff = stats->xoffrxc;
 }
 
 static void
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 848ef6e..749a41c 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1370,23 +1370,13 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 		return;
 
 	/* Rx Errors */
-	rte_stats->ibadcrc = stats->crcerrs;
-	rte_stats->ibadlen = stats->rlec + stats->ruc + stats->roc;
-	rte_stats->imissed = stats->mpc;
-	rte_stats->ierrors = rte_stats->ibadcrc +
-	                     rte_stats->ibadlen +
-	                     rte_stats->imissed +
+	rte_stats->ierrors = stats->crcerrs + stats->rlec +
+			     stats->ruc + stats->roc + stats->mpc +
 	                     stats->rxerrc + stats->algnerrc + stats->cexterr;
 
 	/* Tx Errors */
 	rte_stats->oerrors = stats->ecol + stats->latecol;
 
-	/* XON/XOFF pause frames */
-	rte_stats->tx_pause_xon  = stats->xontxc;
-	rte_stats->rx_pause_xon  = stats->xonrxc;
-	rte_stats->tx_pause_xoff = stats->xofftxc;
-	rte_stats->rx_pause_xoff = stats->xoffrxc;
-
 	rte_stats->ipackets = stats->gprc;
 	rte_stats->opackets = stats->gptc;
 	rte_stats->ibytes   = stats->gorc;
@@ -1456,7 +1446,6 @@ eth_igbvf_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 	rte_stats->ibytes = hw_stats->gorc;
 	rte_stats->opackets = hw_stats->gptc;
 	rte_stats->obytes = hw_stats->gotc;
-	rte_stats->imcasts = hw_stats->mprc;
 	rte_stats->ilbpackets = hw_stats->gprlbc;
 	rte_stats->ilbbytes = hw_stats->gorlbc;
 	rte_stats->olbpackets = hw_stats->gptlbc;
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 8/9] test-pmd: don't check deprecated ethernet statistics
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
                   ` (6 preceding siblings ...)
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 7/9] e1000: don't report " Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 9/9] rte_ether: mark deprecated statistics with attribute Stephen Hemminger
  2015-11-03  0:02 ` [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Thomas Monjalon
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

Several fields in ether stats are marked deprecated, just
ignore them.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 app/test-pmd/config.c    | 30 +++++------------------------
 app/test-pmd/testpmd.c   | 50 +++++++++---------------------------------------
 app/test/test_pmd_perf.c | 12 ++++--------
 3 files changed, 18 insertions(+), 74 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cf2aa6e..b3d974c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -127,14 +127,10 @@ nic_stats_display(portid_t port_id)
 	       nic_stats_border, port_id, nic_stats_border);
 
 	if ((!port->rx_queue_stats_mapping_enabled) && (!port->tx_queue_stats_mapping_enabled)) {
-		printf("  RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes:  "
-		       "%-"PRIu64"\n",
-		       stats.ipackets, stats.imissed, stats.ibytes);
-		printf("  RX-badcrc:  %-10"PRIu64" RX-badlen: %-10"PRIu64" RX-errors: "
-		       "%-"PRIu64"\n",
-		       stats.ibadcrc, stats.ibadlen, stats.ierrors);
-		printf("  RX-nombuf:  %-10"PRIu64"\n",
-		       stats.rx_nombuf);
+		printf("  RX-packets: %-10"PRIu64" RX-bytes:  %-"PRIu64"\n",
+		       stats.ipackets, stats.ibytes);
+		printf(" RX-errors: %-10"PRIu64" RX-nombuf:  %-10"PRIu64"\n",
+		       stats.ierrors, stats.rx_nombuf);
 		printf("  TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes:  "
 		       "%-"PRIu64"\n",
 		       stats.opackets, stats.oerrors, stats.obytes);
@@ -143,9 +139,7 @@ nic_stats_display(portid_t port_id)
 		printf("  RX-packets:              %10"PRIu64"    RX-errors: %10"PRIu64
 		       "    RX-bytes: %10"PRIu64"\n",
 		       stats.ipackets, stats.ierrors, stats.ibytes);
-		printf("  RX-badcrc:               %10"PRIu64"    RX-badlen: %10"PRIu64
-		       "  RX-errors:  %10"PRIu64"\n",
-		       stats.ibadcrc, stats.ibadlen, stats.ierrors);
+		printf("  RX-errors:  %10"PRIu64"\n", stats.ierrors);
 		printf("  RX-nombuf:               %10"PRIu64"\n",
 		       stats.rx_nombuf);
 		printf("  TX-packets:              %10"PRIu64"    TX-errors: %10"PRIu64
@@ -153,12 +147,6 @@ nic_stats_display(portid_t port_id)
 		       stats.opackets, stats.oerrors, stats.obytes);
 	}
 
-	/* stats fdir */
-	if (fdir_conf.mode != RTE_FDIR_MODE_NONE)
-		printf("  Fdirmiss:   %-10"PRIu64" Fdirmatch: %-10"PRIu64"\n",
-		       stats.fdirmiss,
-		       stats.fdirmatch);
-
 	if (port->rx_queue_stats_mapping_enabled) {
 		printf("\n");
 		for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
@@ -177,14 +165,6 @@ nic_stats_display(portid_t port_id)
 		}
 	}
 
-	/* Display statistics of XON/XOFF pause frames, if any. */
-	if ((stats.tx_pause_xon  | stats.rx_pause_xon |
-	     stats.tx_pause_xoff | stats.rx_pause_xoff) > 0) {
-		printf("  RX-XOFF:    %-10"PRIu64" RX-XON:    %-10"PRIu64"\n",
-		       stats.rx_pause_xoff, stats.rx_pause_xon);
-		printf("  TX-XOFF:    %-10"PRIu64" TX-XON:    %-10"PRIu64"\n",
-		       stats.tx_pause_xoff, stats.tx_pause_xon);
-	}
 	printf("  %s############################%s\n",
 	       nic_stats_border, nic_stats_border);
 }
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 386bf84..26f9352 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -733,19 +733,14 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 	       fwd_stats_border, port_id, fwd_stats_border);
 
 	if ((!port->rx_queue_stats_mapping_enabled) && (!port->tx_queue_stats_mapping_enabled)) {
-		printf("  RX-packets: %-14"PRIu64" RX-dropped: %-14"PRIu64"RX-total: "
-		       "%-"PRIu64"\n",
-		       stats->ipackets, stats->imissed,
-		       (uint64_t) (stats->ipackets + stats->imissed));
+		printf("  RX-packets: %-14"PRIu64"\n", stats->ipackets);
 
 		if (cur_fwd_eng == &csum_fwd_engine)
 			printf("  Bad-ipcsum: %-14"PRIu64" Bad-l4csum: %-14"PRIu64" \n",
 			       port->rx_bad_ip_csum, port->rx_bad_l4_csum);
-		if (((stats->ierrors - stats->imissed) + stats->rx_nombuf) > 0) {
-			printf("  RX-badcrc:  %-14"PRIu64" RX-badlen:  %-14"PRIu64
-			       "RX-error: %-"PRIu64"\n",
-			       stats->ibadcrc, stats->ibadlen, stats->ierrors);
-			printf("  RX-nombufs: %-14"PRIu64"\n", stats->rx_nombuf);
+		if (stats->ierrors + stats->rx_nombuf > 0) {
+			printf("  RX-error: %-"PRIu64"  RX-nombufs: %-14"PRIu64"\n",
+			       stats->ierrors, stats->rx_nombuf);
 		}
 
 		printf("  TX-packets: %-14"PRIu64" TX-dropped: %-14"PRIu64"TX-total: "
@@ -754,20 +749,15 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 		       (uint64_t) (stats->opackets + port->tx_dropped));
 	}
 	else {
-		printf("  RX-packets:             %14"PRIu64"    RX-dropped:%14"PRIu64"    RX-total:"
-		       "%14"PRIu64"\n",
-		       stats->ipackets, stats->imissed,
-		       (uint64_t) (stats->ipackets + stats->imissed));
+		printf("  RX-packets:             %14"PRIu64"\n",
+		       stats->ipackets);
 
 		if (cur_fwd_eng == &csum_fwd_engine)
 			printf("  Bad-ipcsum:%14"PRIu64"    Bad-l4csum:%14"PRIu64"\n",
 			       port->rx_bad_ip_csum, port->rx_bad_l4_csum);
-		if (((stats->ierrors - stats->imissed) + stats->rx_nombuf) > 0) {
-			printf("  RX-badcrc:              %14"PRIu64"    RX-badlen: %14"PRIu64
-			       "    RX-error:%"PRIu64"\n",
-			       stats->ibadcrc, stats->ibadlen, stats->ierrors);
-			printf("  RX-nombufs:             %14"PRIu64"\n",
-			       stats->rx_nombuf);
+		if (stats->ierrors + stats->rx_nombuf > 0) {
+			printf("  RX-error:%"PRIu64"  RX-nombufs:             %14"PRIu64"\n",
+			       stats->ierrors, stats->rx_nombuf);
 		}
 
 		printf("  TX-packets:             %14"PRIu64"    TX-dropped:%14"PRIu64"    TX-total:"
@@ -776,15 +766,6 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 		       (uint64_t) (stats->opackets + port->tx_dropped));
 	}
 
-	/* Display statistics of XON/XOFF pause frames, if any. */
-	if ((stats->tx_pause_xon  | stats->rx_pause_xon |
-	     stats->tx_pause_xoff | stats->rx_pause_xoff) > 0) {
-		printf("  RX-XOFF:    %-14"PRIu64" RX-XON:     %-14"PRIu64"\n",
-		       stats->rx_pause_xoff, stats->rx_pause_xon);
-		printf("  TX-XOFF:    %-14"PRIu64" TX-XON:     %-14"PRIu64"\n",
-		       stats->tx_pause_xoff, stats->tx_pause_xon);
-	}
-
 #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
 	if (port->rx_stream)
 		pkt_burst_stats_display("RX",
@@ -793,12 +774,6 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 		pkt_burst_stats_display("TX",
 			&port->tx_stream->tx_burst_stats);
 #endif
-	/* stats fdir */
-	if (fdir_conf.mode != RTE_FDIR_MODE_NONE)
-		printf("  Fdirmiss:%14"PRIu64"	  Fdirmatch:%14"PRIu64"\n",
-		       stats->fdirmiss,
-		       stats->fdirmatch);
-
 	if (port->rx_queue_stats_mapping_enabled) {
 		printf("\n");
 		for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
@@ -1135,20 +1110,13 @@ stop_packet_forwarding(void)
 		port->stats.ibytes = 0;
 		stats.obytes   -= port->stats.obytes;
 		port->stats.obytes = 0;
-		stats.imissed  -= port->stats.imissed;
-		port->stats.imissed = 0;
 		stats.oerrors  -= port->stats.oerrors;
 		port->stats.oerrors = 0;
 		stats.rx_nombuf -= port->stats.rx_nombuf;
 		port->stats.rx_nombuf = 0;
-		stats.fdirmatch -= port->stats.fdirmatch;
-		port->stats.rx_nombuf = 0;
-		stats.fdirmiss -= port->stats.fdirmiss;
-		port->stats.rx_nombuf = 0;
 
 		total_recv += stats.ipackets;
 		total_xmit += stats.opackets;
-		total_rx_dropped += stats.imissed;
 		total_tx_dropped += port->tx_dropped;
 		total_rx_nombuf  += stats.rx_nombuf;
 
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 1fd6843..9a085bd 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -340,14 +340,10 @@ stats_display(uint8_t port_id)
 	struct rte_eth_stats stats;
 	rte_eth_stats_get(port_id, &stats);
 
-	printf("  RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes:  "
-	       "%-"PRIu64"\n",
-	       stats.ipackets, stats.imissed, stats.ibytes);
-	printf("  RX-badcrc:  %-10"PRIu64" RX-badlen: %-10"PRIu64" RX-errors: "
-	       "%-"PRIu64"\n",
-	       stats.ibadcrc, stats.ibadlen, stats.ierrors);
-	printf("  RX-nombuf:  %-10"PRIu64"\n",
-	       stats.rx_nombuf);
+	printf("  RX-packets: %-10"PRIu64" RX-bytes:  %-"PRIu64
+	       " RX-errors: %-10"PRIu64"  RX-nombuf:  %-10"PRIu64"\n",
+	       stats.ipackets, stats.ibytes,
+	       stats.ierrors, stats.rx_nombuf);
 	printf("  TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes:  "
 	       "%-"PRIu64"\n",
 	       stats.opackets, stats.oerrors, stats.obytes);
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 9/9] rte_ether: mark deprecated statistics with attribute
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
                   ` (7 preceding siblings ...)
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 8/9] test-pmd: don't check deprecated ethernet statistics Stephen Hemminger
@ 2015-10-17  0:14 ` Stephen Hemminger
  2015-11-03  0:02 ` [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Thomas Monjalon
  9 siblings, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2015-10-17  0:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

From: Stephen Hemminger <shemming@brocade.com>

Use deprecated attribute to highlight any use of fields that
are marked as going away in the rte_ether device statistics.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
---
 lib/librte_eal/common/include/rte_common.h |  3 +++
 lib/librte_ether/rte_ethdev.h              | 22 +++++++++++-----------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index 3121314..f8ca6f3 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -69,6 +69,9 @@ typedef uint32_t unaligned_uint32_t;
 typedef uint16_t unaligned_uint16_t;
 #endif
 
+/******* Macro to mark functions and fields scheduled for removal *****/
+#define __rte_deprecated	__attribute__((__deprecated__))
+
 /*********** Macros to eliminate unused variable warnings ********/
 
 /**
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 8a8c82b..4919963 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -194,28 +194,28 @@ struct rte_eth_stats {
 	uint64_t opackets;  /**< Total number of successfully transmitted packets.*/
 	uint64_t ibytes;    /**< Total number of successfully received bytes. */
 	uint64_t obytes;    /**< Total number of successfully transmitted bytes. */
-	uint64_t imissed;
-	/**< Deprecated; Total of RX missed packets (e.g full FIFO). */
-	uint64_t ibadcrc;
+	uint64_t imissed __rte_deprecated;
+	/**< Deprecated: Total of RX missed packets (e.g full FIFO). */
+	uint64_t ibadcrc __rte_deprecated;
 	/**< Deprecated; Total of RX packets with CRC error. */
-	uint64_t ibadlen;
+	uint64_t ibadlen __rte_deprecated;
 	/**< Deprecated; Total of RX packets with bad length. */
 	uint64_t ierrors;   /**< Total number of erroneous received packets. */
 	uint64_t oerrors;   /**< Total number of failed transmitted packets. */
-	uint64_t imcasts;
+	uint64_t imcasts __rte_deprecated;
 	/**< Deprecated; Total number of multicast received packets. */
 	uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
-	uint64_t fdirmatch;
+	uint64_t fdirmatch __rte_deprecated;
 	/**< Deprecated; Total number of RX packets matching a filter. */
-	uint64_t fdirmiss;
+	uint64_t fdirmiss __rte_deprecated;
 	/**< Deprecated; Total number of RX packets not matching any filter. */
-	uint64_t tx_pause_xon;
+	uint64_t tx_pause_xon __rte_deprecated;
 	 /**< Deprecated; Total nb. of XON pause frame sent. */
-	uint64_t rx_pause_xon;
+	uint64_t rx_pause_xon  __rte_deprecated;
 	/**< Deprecated; Total nb. of XON pause frame received. */
-	uint64_t tx_pause_xoff;
+	uint64_t tx_pause_xoff __rte_deprecated;
 	/**< Deprecated; Total nb. of XOFF pause frame sent. */
-	uint64_t rx_pause_xoff;
+	uint64_t rx_pause_xoff __rte_deprecated;
 	/**< Deprecated; Total nb. of XOFF pause frame received. */
 	uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
 	/**< Total number of queue RX packets. */
-- 
2.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev
  2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
                   ` (8 preceding siblings ...)
  2015-10-17  0:14 ` [dpdk-dev] [PATCH 9/9] rte_ether: mark deprecated statistics with attribute Stephen Hemminger
@ 2015-11-03  0:02 ` Thomas Monjalon
  9 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2015-11-03  0:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

2015-10-16 17:14, Stephen Hemminger:
> From: Stephen Hemminger <shemming@brocade.com>
> 
> Complete the work that was started by Maryam Tahhan 
> to deprecate driver specific fields in Ethernet statistics.
> This fixes all the drivers, then tests,
> and finally actually marks them as deprecated.

The imissed counter is not deprecated anymore.
Please would you like to update this series accordingly?
Thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-11-03  0:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-17  0:14 [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 1/9] vmxnet3: drop deprecated statistics Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 2/9] ixgbe: drop statistics marked for deprecation Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 3/9] bond: don't sum deprecated statistics Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 4/9] cxgbe: don't report " Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 5/9] i40e: " Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 6/9] enic: don't fill in " Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 7/9] e1000: don't report " Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 8/9] test-pmd: don't check deprecated ethernet statistics Stephen Hemminger
2015-10-17  0:14 ` [dpdk-dev] [PATCH 9/9] rte_ether: mark deprecated statistics with attribute Stephen Hemminger
2015-11-03  0:02 ` [dpdk-dev] [PATCH 0/9] deprecate fields in rte_ethdev Thomas Monjalon

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).