[dpdk-dev,v6,4/9] ethdev: remove HW specific stats in stats structs
Commit Message
Remove non generic stats in rte_stats_strings and mark the relevant
fields in struct rte_eth_stats as deprecated.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
---
doc/guides/rel_notes/abi.rst | 12 ++++++++++++
lib/librte_ether/rte_ethdev.c | 9 ---------
lib/librte_ether/rte_ethdev.h | 30 ++++++++++++++++++++----------
3 files changed, 32 insertions(+), 19 deletions(-)
Comments
2015-07-15 14:11, Maryam Tahhan:
> Remove non generic stats in rte_stats_strings and mark the relevant
> fields in struct rte_eth_stats as deprecated.
>
> Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
> - uint64_t imissed; /**< Total of RX missed packets (e.g full FIFO). */
> - uint64_t ibadcrc; /**< Total of RX packets with CRC error. */
> - uint64_t ibadlen; /**< Total of RX packets with bad length. */
> + /**< Deprecated; Total of RX missed packets (e.g full FIFO). */
> + uint64_t imissed;
> + /**< Deprecated; Total of RX packets with CRC error. */
> + uint64_t ibadcrc;
> + /**< Deprecated; Total of RX packets with bad length. */
> + uint64_t ibadlen;
The /**< style comments must be put *after* the field.
Hi Maryam,
On 07/15/2015 03:11 PM, Maryam Tahhan wrote:
> Remove non generic stats in rte_stats_strings and mark the relevant
> fields in struct rte_eth_stats as deprecated.
>
> Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
> ---
> doc/guides/rel_notes/abi.rst | 12 ++++++++++++
> lib/librte_ether/rte_ethdev.c | 9 ---------
> lib/librte_ether/rte_ethdev.h | 30 ++++++++++++++++++++----------
> 3 files changed, 32 insertions(+), 19 deletions(-)
>
> diff --git a/doc/guides/rel_notes/abi.rst b/doc/guides/rel_notes/abi.rst
> index 931e785..d5bf625 100644
> --- a/doc/guides/rel_notes/abi.rst
> +++ b/doc/guides/rel_notes/abi.rst
> @@ -24,3 +24,15 @@ Deprecation Notices
>
> * The Macros RTE_HASH_BUCKET_ENTRIES_MAX and RTE_HASH_KEY_LENGTH_MAX are
> deprecated and will be removed with version 2.2.
> +
> +* The following fields have been deprecated in rte_eth_stats:
> + * uint64_t imissed
> + * uint64_t ibadcrc
> + * uint64_t ibadlen
> + * uint64_t imcasts
> + * uint64_t fdirmatch
> + * uint64_t fdirmiss
> + * uint64_t tx_pause_xon
> + * uint64_t rx_pause_xon
> + * uint64_t tx_pause_xoff
> + * uint64_t rx_pause_xoff
Looking again at this patch, I'm wondering if "imissed" should
be kept instead of beeing deprecated. I think it could be useful to
differentiate ierrors from imissed, and it's not a hw-specific
statistic. What do you think?
One more comment: it seems these fields are marked as deprecated but
they are still used on other drivers (e1000, i40e, ...).
Regards,
Olivier
> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index 7689328..c8f0e9a 100755
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -142,17 +142,8 @@ static const struct rte_eth_xstats_name_off rte_stats_strings[] = {
> {"rx_bytes", offsetof(struct rte_eth_stats, ibytes)},
> {"tx_bytes", offsetof(struct rte_eth_stats, obytes)},
> {"tx_errors", offsetof(struct rte_eth_stats, oerrors)},
> - {"rx_missed_errors", offsetof(struct rte_eth_stats, imissed)},
> - {"rx_crc_errors", offsetof(struct rte_eth_stats, ibadcrc)},
> - {"rx_bad_length_errors", offsetof(struct rte_eth_stats, ibadlen)},
> {"rx_errors", offsetof(struct rte_eth_stats, ierrors)},
> {"alloc_rx_buff_failed", offsetof(struct rte_eth_stats, rx_nombuf)},
> - {"fdir_match", offsetof(struct rte_eth_stats, fdirmatch)},
> - {"fdir_miss", offsetof(struct rte_eth_stats, fdirmiss)},
> - {"tx_flow_control_xon", offsetof(struct rte_eth_stats, tx_pause_xon)},
> - {"rx_flow_control_xon", offsetof(struct rte_eth_stats, rx_pause_xon)},
> - {"tx_flow_control_xoff", offsetof(struct rte_eth_stats, tx_pause_xoff)},
> - {"rx_flow_control_xoff", offsetof(struct rte_eth_stats, rx_pause_xoff)},
> };
> #define RTE_NB_STATS (sizeof(rte_stats_strings) / sizeof(rte_stats_strings[0]))
>
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index d76bbb3..a862027 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -193,19 +193,29 @@ 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; /**< Total of RX missed packets (e.g full FIFO). */
> - uint64_t ibadcrc; /**< Total of RX packets with CRC error. */
> - uint64_t ibadlen; /**< Total of RX packets with bad length. */
> + /**< Deprecated; Total of RX missed packets (e.g full FIFO). */
> + uint64_t imissed;
> + /**< Deprecated; Total of RX packets with CRC error. */
> + uint64_t ibadcrc;
> + /**< Deprecated; Total of RX packets with bad length. */
> + uint64_t ibadlen;
> 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 imcasts;
> + /**< Deprecated; Total number of multicast received packets. */
> uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
> - uint64_t fdirmatch; /**< Total number of RX packets matching a filter. */
> - uint64_t fdirmiss; /**< Total number of RX packets not matching any filter. */
> - uint64_t tx_pause_xon; /**< Total nb. of XON pause frame sent. */
> - uint64_t rx_pause_xon; /**< Total nb. of XON pause frame received. */
> - uint64_t tx_pause_xoff; /**< Total nb. of XOFF pause frame sent. */
> - uint64_t rx_pause_xoff; /**< Total nb. of XOFF pause frame received. */
> + uint64_t fdirmatch;
> + /**< Deprecated; Total number of RX packets matching a filter. */
> + uint64_t fdirmiss;
> + /**< Deprecated; Total number of RX packets not matching any filter. */
> + uint64_t tx_pause_xon;
> + /**< Deprecated; Total nb. of XON pause frame sent. */
> + uint64_t rx_pause_xon;
> + /**< Deprecated; Total nb. of XON pause frame received. */
> + uint64_t tx_pause_xoff;
> + /**< Deprecated; Total nb. of XOFF pause frame sent. */
> + uint64_t rx_pause_xoff;
> + /**< 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];
>
> From: Olivier MATZ [mailto:olivier.matz@6wind.com]
> Sent: Monday, August 17, 2015 3:54 PM
> To: Tahhan, Maryam; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6 4/9] ethdev: remove HW specific stats in
> stats structs
>
> Hi Maryam,
>
> On 07/15/2015 03:11 PM, Maryam Tahhan wrote:
> > Remove non generic stats in rte_stats_strings and mark the relevant
> > fields in struct rte_eth_stats as deprecated.
> >
> > Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
> > ---
> > doc/guides/rel_notes/abi.rst | 12 ++++++++++++
> > lib/librte_ether/rte_ethdev.c | 9 ---------
> > lib/librte_ether/rte_ethdev.h | 30 ++++++++++++++++++++----------
> > 3 files changed, 32 insertions(+), 19 deletions(-)
> >
> > diff --git a/doc/guides/rel_notes/abi.rst
> > b/doc/guides/rel_notes/abi.rst index 931e785..d5bf625 100644
> > --- a/doc/guides/rel_notes/abi.rst
> > +++ b/doc/guides/rel_notes/abi.rst
> > @@ -24,3 +24,15 @@ Deprecation Notices
> >
> > * The Macros RTE_HASH_BUCKET_ENTRIES_MAX and
> RTE_HASH_KEY_LENGTH_MAX are
> > deprecated and will be removed with version 2.2.
> > +
> > +* The following fields have been deprecated in rte_eth_stats:
> > + * uint64_t imissed
> > + * uint64_t ibadcrc
> > + * uint64_t ibadlen
> > + * uint64_t imcasts
> > + * uint64_t fdirmatch
> > + * uint64_t fdirmiss
> > + * uint64_t tx_pause_xon
> > + * uint64_t rx_pause_xon
> > + * uint64_t tx_pause_xoff
> > + * uint64_t rx_pause_xoff
>
> Looking again at this patch, I'm wondering if "imissed" should be kept instead
> of beeing deprecated. I think it could be useful to differentiate ierrors from
> imissed, and it's not a hw-specific statistic. What do you think?
>
> One more comment: it seems these fields are marked as deprecated but they
> are still used on other drivers (e1000, i40e, ...).
>
> Regards,
> Olivier
>
Hi Olivier
I can remove the deprecated status for imissed to leave the differentiation between errors and missed packets.
igb and i40e will be updated soon to reflect this. I marked them as deprecated to deter their use in the future. Older instances/use will need to be resolved.
Regards
Maryam
<snip>
Hi Maryam,
On 08/19/2015 02:53 PM, Tahhan, Maryam wrote:
>> From: Olivier MATZ [mailto:olivier.matz@6wind.com]
>> Sent: Monday, August 17, 2015 3:54 PM
>> To: Tahhan, Maryam; dev@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH v6 4/9] ethdev: remove HW specific stats in
>> stats structs
>>
>> Hi Maryam,
>>
>> On 07/15/2015 03:11 PM, Maryam Tahhan wrote:
>>> Remove non generic stats in rte_stats_strings and mark the relevant
>>> fields in struct rte_eth_stats as deprecated.
>>>
>>
>> Looking again at this patch, I'm wondering if "imissed" should be kept instead
>> of beeing deprecated. I think it could be useful to differentiate ierrors from
>> imissed, and it's not a hw-specific statistic. What do you think?
>>
>> One more comment: it seems these fields are marked as deprecated but they
>> are still used on other drivers (e1000, i40e, ...).
>>
>> Regards,
>> Olivier
>>
>
>
> Hi Olivier
> I can remove the deprecated status for imissed to leave the differentiation between errors and missed packets.
> igb and i40e will be updated soon to reflect this. I marked them as deprecated to deter their use in the future. Older instances/use will need to be resolved.
From my point of view, yes, I think it's better to keep different stats
for imissed and ierrors as it can be useful to determinine the cause of
packet losses. If nobody disagrees, I think we could remove the
deprecation notice for imissed.
Regards,
Olivier
@@ -24,3 +24,15 @@ Deprecation Notices
* The Macros RTE_HASH_BUCKET_ENTRIES_MAX and RTE_HASH_KEY_LENGTH_MAX are
deprecated and will be removed with version 2.2.
+
+* The following fields have been deprecated in rte_eth_stats:
+ * uint64_t imissed
+ * uint64_t ibadcrc
+ * uint64_t ibadlen
+ * uint64_t imcasts
+ * uint64_t fdirmatch
+ * uint64_t fdirmiss
+ * uint64_t tx_pause_xon
+ * uint64_t rx_pause_xon
+ * uint64_t tx_pause_xoff
+ * uint64_t rx_pause_xoff
@@ -142,17 +142,8 @@ static const struct rte_eth_xstats_name_off rte_stats_strings[] = {
{"rx_bytes", offsetof(struct rte_eth_stats, ibytes)},
{"tx_bytes", offsetof(struct rte_eth_stats, obytes)},
{"tx_errors", offsetof(struct rte_eth_stats, oerrors)},
- {"rx_missed_errors", offsetof(struct rte_eth_stats, imissed)},
- {"rx_crc_errors", offsetof(struct rte_eth_stats, ibadcrc)},
- {"rx_bad_length_errors", offsetof(struct rte_eth_stats, ibadlen)},
{"rx_errors", offsetof(struct rte_eth_stats, ierrors)},
{"alloc_rx_buff_failed", offsetof(struct rte_eth_stats, rx_nombuf)},
- {"fdir_match", offsetof(struct rte_eth_stats, fdirmatch)},
- {"fdir_miss", offsetof(struct rte_eth_stats, fdirmiss)},
- {"tx_flow_control_xon", offsetof(struct rte_eth_stats, tx_pause_xon)},
- {"rx_flow_control_xon", offsetof(struct rte_eth_stats, rx_pause_xon)},
- {"tx_flow_control_xoff", offsetof(struct rte_eth_stats, tx_pause_xoff)},
- {"rx_flow_control_xoff", offsetof(struct rte_eth_stats, rx_pause_xoff)},
};
#define RTE_NB_STATS (sizeof(rte_stats_strings) / sizeof(rte_stats_strings[0]))
@@ -193,19 +193,29 @@ 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; /**< Total of RX missed packets (e.g full FIFO). */
- uint64_t ibadcrc; /**< Total of RX packets with CRC error. */
- uint64_t ibadlen; /**< Total of RX packets with bad length. */
+ /**< Deprecated; Total of RX missed packets (e.g full FIFO). */
+ uint64_t imissed;
+ /**< Deprecated; Total of RX packets with CRC error. */
+ uint64_t ibadcrc;
+ /**< Deprecated; Total of RX packets with bad length. */
+ uint64_t ibadlen;
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 imcasts;
+ /**< Deprecated; Total number of multicast received packets. */
uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
- uint64_t fdirmatch; /**< Total number of RX packets matching a filter. */
- uint64_t fdirmiss; /**< Total number of RX packets not matching any filter. */
- uint64_t tx_pause_xon; /**< Total nb. of XON pause frame sent. */
- uint64_t rx_pause_xon; /**< Total nb. of XON pause frame received. */
- uint64_t tx_pause_xoff; /**< Total nb. of XOFF pause frame sent. */
- uint64_t rx_pause_xoff; /**< Total nb. of XOFF pause frame received. */
+ uint64_t fdirmatch;
+ /**< Deprecated; Total number of RX packets matching a filter. */
+ uint64_t fdirmiss;
+ /**< Deprecated; Total number of RX packets not matching any filter. */
+ uint64_t tx_pause_xon;
+ /**< Deprecated; Total nb. of XON pause frame sent. */
+ uint64_t rx_pause_xon;
+ /**< Deprecated; Total nb. of XON pause frame received. */
+ uint64_t tx_pause_xoff;
+ /**< Deprecated; Total nb. of XOFF pause frame sent. */
+ uint64_t rx_pause_xoff;
+ /**< 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];