DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics
@ 2015-11-06  1:04 Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation Stephen Hemminger
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

Several fields in ether statistics were tagged with comment that they
were going to be deprecated, but comments don't cause compile warnings.
Instead use Gcc attributes to force the issue.

Of course to do that, all the drivers and tests which are using
those fields have to be fixed first.

The input multicast statistic was listed as deprecated, but I find
it useful, and therefore the first patch is to revive it.

Stephen Hemminger (7):
  ether: don't mark input multicast for deprecation
  bond: don't sum deprecated statistics
  cxgbe: don't report deprecated statistics
  i40e: don't report deprecated statistics
  e1000: don't report deprecated statistics
  test-pmd: remove references to deprecated statistics
  rte_ether: mark deprecated statistics with attribute

 app/test-pmd/config.c                      | 22 ++--------------------
 app/test-pmd/testpmd.c                     | 26 ++------------------------
 app/test/test_pmd_perf.c                   |  7 ++-----
 drivers/net/bonding/rte_eth_bond_pmd.c     |  7 +------
 drivers/net/cxgbe/cxgbe_ethdev.c           | 10 +++-------
 drivers/net/e1000/em_ethdev.c              | 12 ++----------
 drivers/net/e1000/igb_ethdev.c             | 12 ++----------
 drivers/net/i40e/i40e_ethdev.c             |  9 ++++-----
 drivers/net/ixgbe/ixgbe_ethdev.c           |  1 -
 lib/librte_eal/common/include/rte_common.h |  3 +++
 lib/librte_ether/rte_ethdev.h              | 19 +++++++++----------
 11 files changed, 30 insertions(+), 98 deletions(-)

-- 
2.1.4

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

* [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
@ 2015-11-06  1:04 ` Stephen Hemminger
  2015-11-12 16:52   ` Thomas Monjalon
  2015-11-12 22:10   ` Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 2/7] bond: don't sum deprecated statistics Stephen Hemminger
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

The number of received multicast frames is useful and already
available in many/most drivers. Therefore don't mark it as
deprecated.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 1 -
 lib/librte_ether/rte_ethdev.h    | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0b0bbcf..3b71c0c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2715,7 +2715,6 @@ ixgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	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
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 48a540d..f653e37 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -204,8 +204,7 @@ struct rte_eth_stats {
 	/**< 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;
-	/**< Deprecated; Total number of multicast received packets. */
+	uint64_t imcasts;   /**< Total number of multicast received packets. */
 	uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
 	uint64_t fdirmatch;
 	/**< Deprecated; Total number of RX packets matching a filter. */
-- 
2.1.4

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

* [dpdk-dev] [PATCH 2/7] bond: don't sum deprecated statistics
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation Stephen Hemminger
@ 2015-11-06  1:04 ` Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 3/7] cxgbe: don't report " Stephen Hemminger
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

These statistics are marked deprecated, leave them alone.
Also keep track of imissed across all ports.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index bbff664..a9cd9fa 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1814,16 +1814,11 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->opackets += slave_stats.opackets;
 		stats->ibytes += slave_stats.ibytes;
 		stats->obytes += slave_stats.obytes;
+		stats->imissed += slave_stats.imissed;
 		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;
 
 		for (j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS; j++) {
 			stats->q_ipackets[j] += slave_stats.q_ipackets[j];
-- 
2.1.4

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

* [dpdk-dev] [PATCH 3/7] cxgbe: don't report deprecated statistics
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 2/7] bond: don't sum deprecated statistics Stephen Hemminger
@ 2015-11-06  1:04 ` Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 4/7] i40e: " Stephen Hemminger
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/cxgbe/cxgbe_ethdev.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 3ef787d..de46a09 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -660,18 +660,14 @@ static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
 			      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;
+	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 + eth_stats->imissed;
 
 	/* 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] 12+ messages in thread

* [dpdk-dev] [PATCH 4/7] i40e: don't report deprecated statistics
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
                   ` (2 preceding siblings ...)
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 3/7] cxgbe: don't report " Stephen Hemminger
@ 2015-11-06  1:04 ` Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 5/7] e1000: " Stephen Hemminger
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/i40e/i40e_ethdev.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ddf3d38..c6ee6f9 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2043,15 +2043,14 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->oerrors  = ns->eth.tx_errors +
 			pf->main_vsi->eth_stats.tx_errors;
 	stats->imcasts  = pf->main_vsi->eth_stats.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 +
 			pf->main_vsi->eth_stats.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 +
+			stats->imissed;
 
 	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] 12+ messages in thread

* [dpdk-dev] [PATCH 5/7] e1000: don't report deprecated statistics
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
                   ` (3 preceding siblings ...)
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 4/7] i40e: " Stephen Hemminger
@ 2015-11-06  1:04 ` Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 6/7] test-pmd: remove references to " Stephen Hemminger
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

These fields are marked deprecated don't use them.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/e1000/em_ethdev.c  | 12 ++----------
 drivers/net/e1000/igb_ethdev.c | 12 ++----------
 2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 500985d..3e81109 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -911,11 +911,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->ierrors = stats->crcerrs +
+	                     stats->rlec + stats->ruc + stats->roc +
 	                     rte_stats->imissed +
 	                     stats->rxerrc + stats->algnerrc + stats->cexterr;
 
@@ -926,12 +924,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 2cb115c..6638247 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1589,23 +1589,15 @@ 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->ierrors = stats->crcerrs +
+			     stats->rlec + stats->ruc + stats->roc +
 	                     rte_stats->imissed +
 	                     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;
-- 
2.1.4

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

* [dpdk-dev] [PATCH 6/7] test-pmd: remove references to deprecated statistics
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
                   ` (4 preceding siblings ...)
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 5/7] e1000: " Stephen Hemminger
@ 2015-11-06  1:04 ` Stephen Hemminger
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 7/7] rte_ether: mark deprecated statistics with attribute Stephen Hemminger
  2015-11-12 22:07 ` [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Thomas Monjalon
  7 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

Some of the statistics are deprecated, so don't test them.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-pmd/config.c    | 22 ++--------------------
 app/test-pmd/testpmd.c   | 26 ++------------------------
 app/test/test_pmd_perf.c |  7 ++-----
 3 files changed, 6 insertions(+), 49 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 938b456..f21801a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -154,9 +154,7 @@ nic_stats_display(portid_t port_id)
 		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-errors: %-"PRIu64"\n", stats.ierrors);
 		printf("  RX-nombuf:  %-10"PRIu64"\n",
 		       stats.rx_nombuf);
 		printf("  TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes:  "
@@ -167,9 +165,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
@@ -177,12 +173,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++) {
@@ -201,14 +191,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 2e302bb..68e0943 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -751,9 +751,7 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 			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-error: %-"PRIu64"\n",  stats->ierrors);
 			printf("  RX-nombufs: %-14"PRIu64"\n", stats->rx_nombuf);
 		}
 
@@ -772,9 +770,7 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 			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-error:%"PRIu64"\n", stats->ierrors);
 			printf("  RX-nombufs:             %14"PRIu64"\n",
 			       stats->rx_nombuf);
 		}
@@ -785,15 +781,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",
@@ -802,11 +789,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");
@@ -1150,10 +1132,6 @@ stop_packet_forwarding(void)
 		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;
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 1fd6843..cd18613 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -343,11 +343,8 @@ stats_display(uint8_t port_id)
 	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-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);
-- 
2.1.4

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

* [dpdk-dev] [PATCH 7/7] rte_ether: mark deprecated statistics with attribute
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
                   ` (5 preceding siblings ...)
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 6/7] test-pmd: remove references to " Stephen Hemminger
@ 2015-11-06  1:04 ` Stephen Hemminger
  2015-11-12 22:03   ` Thomas Monjalon
  2015-11-12 22:07 ` [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Thomas Monjalon
  7 siblings, 1 reply; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-06  1:04 UTC (permalink / raw)
  To: dev

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 <stephen@networkplumber.org>
---
 lib/librte_eal/common/include/rte_common.h |  3 +++
 lib/librte_ether/rte_ethdev.h              | 16 ++++++++--------
 2 files changed, 11 insertions(+), 8 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 f653e37..49a6889 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -198,25 +198,25 @@ struct rte_eth_stats {
 	/**< Total of RX packets dropped by the HW,
 	 * because there are no available mbufs (i.e. RX queues are full).
 	 */
-	uint64_t ibadcrc;
+	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;   /**< 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] 12+ messages in thread

* Re: [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation Stephen Hemminger
@ 2015-11-12 16:52   ` Thomas Monjalon
  2015-11-12 22:10   ` Stephen Hemminger
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2015-11-12 16:52 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

2015-11-05 17:04, Stephen Hemminger:
> The number of received multicast frames is useful and already
> available in many/most drivers. Therefore don't mark it as
> deprecated.

There are other useful stats in xstats.
The idea of this basic stats structure is to provide only
the really mandatory and basic counters.
A multicast counter is not so basic and won't be implemented everywhere.

This patch won't be applied.
We'll need a consensus to definitively remove the deprecated stats.

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

* Re: [dpdk-dev] [PATCH 7/7] rte_ether: mark deprecated statistics with attribute
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 7/7] rte_ether: mark deprecated statistics with attribute Stephen Hemminger
@ 2015-11-12 22:03   ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2015-11-12 22:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

2015-11-05 17:04, Stephen Hemminger:
> Use deprecated attribute to highlight any use of fields that
> are marked as going away in the rte_ether device statistics.

The example app ip_pipeline does not compile.
I will add a patch to fix it.

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

* Re: [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics
  2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
                   ` (6 preceding siblings ...)
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 7/7] rte_ether: mark deprecated statistics with attribute Stephen Hemminger
@ 2015-11-12 22:07 ` Thomas Monjalon
  7 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2015-11-12 22:07 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

2015-11-05 17:04, Stephen Hemminger:
> Several fields in ether statistics were tagged with comment that they
> were going to be deprecated, but comments don't cause compile warnings.
> Instead use Gcc attributes to force the issue.
> 
> Of course to do that, all the drivers and tests which are using
> those fields have to be fixed first.
> 
> The input multicast statistic was listed as deprecated, but I find
> it useful, and therefore the first patch is to revive it.
> 
> Stephen Hemminger (7):
>   ether: don't mark input multicast for deprecation

not applied

>   bond: don't sum deprecated statistics
>   cxgbe: don't report deprecated statistics
>   i40e: don't report deprecated statistics
>   e1000: don't report deprecated statistics
>   test-pmd: remove references to deprecated statistics
>   rte_ether: mark deprecated statistics with attribute

The rest is applied with an extra patch for ip_pipeline example.
Thanks

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

* Re: [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation
  2015-11-06  1:04 ` [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation Stephen Hemminger
  2015-11-12 16:52   ` Thomas Monjalon
@ 2015-11-12 22:10   ` Stephen Hemminger
  1 sibling, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2015-11-12 22:10 UTC (permalink / raw)
  To: dev

On Thu,  5 Nov 2015 17:04:33 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> The number of received multicast frames is useful and already
> available in many/most drivers. Therefore don't mark it as
> deprecated.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 1 -
>  lib/librte_ether/rte_ethdev.h    | 3 +--
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 0b0bbcf..3b71c0c 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -2715,7 +2715,6 @@ ixgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
>  	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
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index 48a540d..f653e37 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -204,8 +204,7 @@ struct rte_eth_stats {
>  	/**< 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;
> -	/**< Deprecated; Total number of multicast received packets. */
> +	uint64_t imcasts;   /**< Total number of multicast received packets. */
>  	uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
>  	uint64_t fdirmatch;
>  	/**< Deprecated; Total number of RX packets matching a filter. */

I am okay with removing imcasts if all the drivers that support provide
the same information in xstats.

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

end of thread, other threads:[~2015-11-12 22:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-06  1:04 [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics Stephen Hemminger
2015-11-06  1:04 ` [dpdk-dev] [PATCH 1/7] ether: don't mark input multicast for deprecation Stephen Hemminger
2015-11-12 16:52   ` Thomas Monjalon
2015-11-12 22:10   ` Stephen Hemminger
2015-11-06  1:04 ` [dpdk-dev] [PATCH 2/7] bond: don't sum deprecated statistics Stephen Hemminger
2015-11-06  1:04 ` [dpdk-dev] [PATCH 3/7] cxgbe: don't report " Stephen Hemminger
2015-11-06  1:04 ` [dpdk-dev] [PATCH 4/7] i40e: " Stephen Hemminger
2015-11-06  1:04 ` [dpdk-dev] [PATCH 5/7] e1000: " Stephen Hemminger
2015-11-06  1:04 ` [dpdk-dev] [PATCH 6/7] test-pmd: remove references to " Stephen Hemminger
2015-11-06  1:04 ` [dpdk-dev] [PATCH 7/7] rte_ether: mark deprecated statistics with attribute Stephen Hemminger
2015-11-12 22:03   ` Thomas Monjalon
2015-11-12 22:07 ` [dpdk-dev] [PATCH v2 0/7] ethdev: force deprecation of statistics 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).