From a61dc000d55dca9e0947fa067b7dc503f42af28a Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 15 Apr 2016 11:01:51 +0200 Subject: [PATCH] ethdev: remove deprecated statistics Some statistics were deprecated since release 2.1 (49f386542af4). The last deprecated counter to be used was imcasts. The VF loopback statistics are also removed as they are used only in igb and duplicated in extended statistics. The new counters should be added to extended statistics. Signed-off-by: Thomas Monjalon Acked-by: Remy Horton --- doc/guides/rel_notes/deprecation.rst | 4 ---- doc/guides/rel_notes/release_16_07.rst | 6 +++++- drivers/net/bonding/rte_eth_bond_pmd.c | 1 - drivers/net/cxgbe/cxgbe_ethdev.c | 1 - drivers/net/e1000/igb_ethdev.c | 5 ----- drivers/net/ena/ena_ethdev.c | 2 -- drivers/net/ena/ena_ethdev.h | 1 - drivers/net/enic/enic_main.c | 1 - drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/ixgbe/ixgbe_ethdev.c | 4 ---- drivers/net/nfp/nfp_net.c | 18 ------------------ drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 - examples/ethtool/ethtool-app/ethapp.c | 1 - lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_ethdev.h | 26 -------------------------- 15 files changed, 6 insertions(+), 68 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index c78cde761f..fffe9c740b 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -26,10 +26,6 @@ Deprecation Notices rte_pci_device. The release 16.04 does not contain these ABI changes, but release 16.07 will. -* The following fields have been deprecated in rte_eth_stats: - ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, - tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff - * The xstats API and rte_eth_xstats struct will be changed to allow retrieval of values without any string copies or parsing. No backwards compatibility is planned, as it would require code duplication diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst index 001888facf..83c841ba67 100644 --- a/doc/guides/rel_notes/release_16_07.rst +++ b/doc/guides/rel_notes/release_16_07.rst @@ -86,6 +86,10 @@ This section should contain API changes. Sample format: * Add a short 1-2 sentence description of the API change. Use fixed width quotes for ``rte_function_names`` or ``rte_struct_names``. Use the past tense. +* The following counters are removed from ``rte_eth_stats`` structure: + ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, + tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff. + ABI Changes ----------- @@ -107,7 +111,7 @@ The libraries prepended with a plus sign were incremented in this version. .. code-block:: diff - libethdev.so.3 + + libethdev.so.4 librte_acl.so.2 librte_cfgfile.so.2 librte_cmdline.so.2 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 54788cf8fc..c897146cb0 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1836,7 +1836,6 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) 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; for (j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS; j++) { diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index bb134e504f..04eddaf756 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -656,7 +656,6 @@ 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 + ps.rx_ovflow2 + ps.rx_ovflow3 + ps.rx_trunc0 + ps.rx_trunc1 + diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index e0053fec08..f0921eee9a 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1805,11 +1805,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; - rte_stats->olbbytes = hw_stats->gotlbc; } static void diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 02af67a24b..e157587b1d 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -605,7 +605,6 @@ static void ena_stats_restart(struct rte_eth_dev *dev) rte_atomic64_init(&adapter->drv_stats->ierrors); rte_atomic64_init(&adapter->drv_stats->oerrors); - rte_atomic64_init(&adapter->drv_stats->imcasts); rte_atomic64_init(&adapter->drv_stats->rx_nombuf); } @@ -643,7 +642,6 @@ static void ena_stats_get(struct rte_eth_dev *dev, /* Driver related stats */ stats->ierrors = rte_atomic64_read(&adapter->drv_stats->ierrors); stats->oerrors = rte_atomic64_read(&adapter->drv_stats->oerrors); - stats->imcasts = rte_atomic64_read(&adapter->drv_stats->imcasts); stats->rx_nombuf = rte_atomic64_read(&adapter->drv_stats->rx_nombuf); } diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h index ba6f01e666..aca853c17e 100644 --- a/drivers/net/ena/ena_ethdev.h +++ b/drivers/net/ena/ena_ethdev.h @@ -121,7 +121,6 @@ enum ena_adapter_state { struct ena_driver_stats { rte_atomic64_t ierrors; rte_atomic64_t oerrors; - rte_atomic64_t imcasts; rte_atomic64_t rx_nombuf; }; diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index e3da51dbb8..60fe765d5c 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -248,7 +248,6 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats) r_stats->imissed = stats->rx.rx_drop; - r_stats->imcasts = stats->rx.rx_multicast_frames_ok; r_stats->rx_nombuf = stats->rx.rx_no_bufs; } diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index bc28d3c355..d8b6bd784a 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2099,7 +2099,6 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->obytes = ns->eth.tx_bytes; stats->oerrors = ns->eth.tx_errors + pf->main_vsi->eth_stats.tx_errors; - stats->imcasts = pf->main_vsi->eth_stats.rx_multicast; /* Rx Errors */ stats->imissed = ns->eth.rx_discards + diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3f1ebc157e..eec607cc6a 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2852,8 +2852,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 @@ -2870,8 +2868,6 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev) hw_stats->vfgorc = 0; hw_stats->vfgptc = 0; hw_stats->vfgotc = 0; - hw_stats->vfmprc = 0; - } static void diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index bcf5fa9989..bc0a3d83b9 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -902,11 +902,6 @@ nfp_net_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) nfp_dev_stats.obytes -= hw->eth_stats_base.obytes; - nfp_dev_stats.imcasts = - nn_cfg_readq(hw, NFP_NET_CFG_STATS_RX_MC_FRAMES); - - nfp_dev_stats.imcasts -= hw->eth_stats_base.imcasts; - /* reading general device stats */ nfp_dev_stats.ierrors = nn_cfg_readq(hw, NFP_NET_CFG_STATS_RX_ERRORS); @@ -918,12 +913,6 @@ nfp_net_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) nfp_dev_stats.oerrors -= hw->eth_stats_base.oerrors; - /* Multicast frames received */ - nfp_dev_stats.imcasts = - nn_cfg_readq(hw, NFP_NET_CFG_STATS_RX_MC_FRAMES); - - nfp_dev_stats.imcasts -= hw->eth_stats_base.imcasts; - /* RX ring mbuf allocation failures */ nfp_dev_stats.rx_nombuf = dev->data->rx_mbuf_alloc_failed; @@ -985,9 +974,6 @@ nfp_net_stats_reset(struct rte_eth_dev *dev) hw->eth_stats_base.obytes = nn_cfg_readq(hw, NFP_NET_CFG_STATS_TX_OCTETS); - hw->eth_stats_base.imcasts = - nn_cfg_readq(hw, NFP_NET_CFG_STATS_RX_MC_FRAMES); - /* reading general device stats */ hw->eth_stats_base.ierrors = nn_cfg_readq(hw, NFP_NET_CFG_STATS_RX_ERRORS); @@ -995,10 +981,6 @@ nfp_net_stats_reset(struct rte_eth_dev *dev) hw->eth_stats_base.oerrors = nn_cfg_readq(hw, NFP_NET_CFG_STATS_TX_ERRORS); - /* Multicast frames received */ - hw->eth_stats_base.imcasts = - nn_cfg_readq(hw, NFP_NET_CFG_STATS_RX_MC_FRAMES); - /* RX ring mbuf allocation failures */ dev->data->rx_mbuf_alloc_failed = 0; diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index bd7a2bb7ed..29b469cc9c 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -694,7 +694,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; } } diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c index 2ed4796dd7..38e466c049 100644 --- a/examples/ethtool/ethtool-app/ethapp.c +++ b/examples/ethtool/ethtool-app/ethapp.c @@ -535,7 +535,6 @@ static void pcmd_portstats_callback(__rte_unused void *ptr_params, } stat = rte_ethtool_net_get_stats64(params->port, &stat_info); if (stat == 0) { - /* Most of rte_eth_stats is deprecated.. */ printf("Port %i stats\n", params->port); printf(" In: %" PRIu64 " (%" PRIu64 " bytes)\n" " Out: %"PRIu64" (%"PRIu64 " bytes)\n" diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile index e810284696..0bb5dc900b 100644 --- a/lib/librte_ether/Makefile +++ b/lib/librte_ether/Makefile @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS) EXPORT_MAP := rte_ether_version.map -LIBABIVER := 3 +LIBABIVER := 4 SRCS-y += rte_ethdev.c diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 022733ec0a..2757510ae8 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -200,27 +200,9 @@ 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 __rte_deprecated; - /**< Deprecated; Total of RX packets with CRC error. */ - 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; - /**< Deprecated; Total number of multicast received packets. */ uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */ - uint64_t fdirmatch __rte_deprecated; - /**< Deprecated; Total number of RX packets matching a filter. */ - uint64_t fdirmiss __rte_deprecated; - /**< Deprecated; Total number of RX packets not matching any filter. */ - uint64_t tx_pause_xon __rte_deprecated; - /**< Deprecated; Total nb. of XON pause frame sent. */ - uint64_t rx_pause_xon __rte_deprecated; - /**< Deprecated; Total nb. of XON pause frame received. */ - uint64_t tx_pause_xoff __rte_deprecated; - /**< Deprecated; Total nb. of XOFF pause frame sent. */ - 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. */ uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS]; @@ -231,14 +213,6 @@ struct rte_eth_stats { /**< Total number of successfully transmitted queue bytes. */ uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS]; /**< Total number of queue packets received that are dropped. */ - uint64_t ilbpackets; - /**< Total number of good packets received from loopback,VF Only */ - uint64_t olbpackets; - /**< Total number of good packets transmitted to loopback,VF Only */ - uint64_t ilbbytes; - /**< Total number of good bytes received from loopback,VF Only */ - uint64_t olbbytes; - /**< Total number of good bytes transmitted to loopback,VF Only */ }; /** -- 2.20.1