* [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
@ 2020-10-12 16:46 Ferruh Yigit
2020-10-12 16:46 ` [dpdk-dev] [RFC 2/2] doc: announce queue stats moving " Ferruh Yigit
` (2 more replies)
0 siblings, 3 replies; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-12 16:46 UTC (permalink / raw)
To: Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko; +Cc: dev, techboard, Min Hu
Queue stats are stored in 'struct rte_eth_stats' as array and array size
is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
As a result of technical board discussion, decided to remove the queue
statistics from 'struct rte_eth_stats' in the long term.
Instead PMDs should represent the queue statistics via xstats, this
gives more flexibility on the number of the queues supported.
Currently queue stats in the xstats are filled by ethdev layer, using
the basic stats, when queue stats removed from basic stats the
responsibility to fill the relevant xstats will be pushed to the PMDs.
During the switch period, a temporary
'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' device flag is created. The PMDs
providing the queue stats in the xstats should set this flag to bypass
the relevant part in ethdev layer.
When all PMDs switch to the xstats for the queue stats, queue stats
related fields from 'struct rte_eth_stats' will be removed, as well as
'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' flag.
Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
removed.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev.c | 19 +++++++++++++++----
lib/librte_ethdev/rte_ethdev.h | 2 ++
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 892c246a53..66665ad4ee 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2446,8 +2446,10 @@ get_xstats_basic_count(struct rte_eth_dev *dev)
nb_txqs = RTE_MIN(dev->data->nb_tx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
count = RTE_NB_STATS;
- count += nb_rxqs * RTE_NB_RXQ_STATS;
- count += nb_txqs * RTE_NB_TXQ_STATS;
+ if ((dev->data->dev_flags & RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS) == 0) {
+ count += nb_rxqs * RTE_NB_RXQ_STATS;
+ count += nb_txqs * RTE_NB_TXQ_STATS;
+ }
return count;
}
@@ -2538,6 +2540,10 @@ rte_eth_basic_stats_get_names(struct rte_eth_dev *dev,
sizeof(xstats_names[0].name));
cnt_used_entries++;
}
+
+ if (dev->data->dev_flags & RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS)
+ return cnt_used_entries;
+
num_q = RTE_MIN(dev->data->nb_rx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
for (id_queue = 0; id_queue < num_q; id_queue++) {
for (idx = 0; idx < RTE_NB_RXQ_STATS; idx++) {
@@ -2736,6 +2742,9 @@ rte_eth_basic_stats_get(uint16_t port_id, struct rte_eth_xstat *xstats)
xstats[count++].value = val;
}
+ if (dev->data->dev_flags & RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS)
+ return count;
+
/* per-rxq stats */
for (q = 0; q < nb_rxqs; q++) {
for (i = 0; i < RTE_NB_RXQ_STATS; i++) {
@@ -2871,8 +2880,10 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
nb_txqs = RTE_MIN(dev->data->nb_tx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
/* Return generic statistics */
- count = RTE_NB_STATS + (nb_rxqs * RTE_NB_RXQ_STATS) +
- (nb_txqs * RTE_NB_TXQ_STATS);
+ count = RTE_NB_STATS;
+ if ((dev->data->dev_flags & RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS) == 0)
+ count += (nb_rxqs * RTE_NB_RXQ_STATS) +
+ (nb_txqs * RTE_NB_TXQ_STATS);
/* implemented by the driver */
if (dev->dev_ops->xstats_get != NULL) {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 5bcfbb8b04..42c83303e1 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1694,6 +1694,8 @@ struct rte_eth_dev_owner {
#define RTE_ETH_DEV_REPRESENTOR 0x0010
/** Device does not support MAC change after started */
#define RTE_ETH_DEV_NOLIVE_MAC_ADDR 0x0020
+/** Device provides queue stats in xstats */
+#define RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS 0x0040
/**
* Iterates over valid ethdev ports owned by a specific owner.
--
2.26.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [RFC 2/2] doc: announce queue stats moving to xstats
2020-10-12 16:46 [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats Ferruh Yigit
@ 2020-10-12 16:46 ` Ferruh Yigit
2020-10-12 16:55 ` [dpdk-dev] [dpdk-techboard] " Stephen Hemminger
2020-10-12 21:53 ` [dpdk-dev] [RFC 1/2] ethdev: move queue stats " Thomas Monjalon
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
2 siblings, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-12 16:46 UTC (permalink / raw)
To: Ferruh Yigit, Bruce Richardson, Ray Kinsella, Neil Horman,
Thomas Monjalon, Andrew Rybchenko
Cc: dev, techboard, Min Hu
Queue stats will be removed from basic stats to xstats.
It will be PMDs responsibility to fill queue stats based on number of
queues they have.
Until all PMDs implement the xstats, a temporary
'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' device flag created. PMDs switched
to the xstats should set this flag to bypass ethdev layer for queue
stats.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
config/rte_config.h | 2 +-
doc/guides/rel_notes/deprecation.rst | 7 +++++++
lib/librte_ethdev/rte_ethdev.h | 3 +++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/config/rte_config.h b/config/rte_config.h
index 03d90d78bc..9ef3b75940 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -55,7 +55,7 @@
/* ether defines */
#define RTE_MAX_QUEUES_PER_PORT 1024
-#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16
+#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 /* max 256 */
#define RTE_ETHDEV_RXTX_CALLBACKS 1
/* cryptodev defines */
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 584e720879..9143cfc529 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -164,6 +164,13 @@ Deprecation Notices
following the IPv6 header, as proposed in RFC
https://mails.dpdk.org/archives/dev/2020-August/177257.html.
+* ethdev: Queue specific stats fields will be removed from ``struct rte_eth_stats``.
+ Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``, ``q_obytes``,
+ ``q_errors``.
+ Instead queue stats will be received via xstats API. Current method support
+ will be limited to maximum 256 queues.
+ Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be removed.
+
* security: The API ``rte_security_session_create`` takes only single mempool
for session and session private data. So the application need to create
mempool for twice the number of sessions needed and will also lead to
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 42c83303e1..160481c747 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -253,6 +253,7 @@ struct rte_eth_stats {
uint64_t ierrors; /**< Total number of erroneous received packets. */
uint64_t oerrors; /**< Total number of failed transmitted packets. */
uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
+ /* Queue stats are limited to max 256 queues */
uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
/**< Total number of queue RX packets. */
uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
@@ -2701,6 +2702,7 @@ int rte_eth_xstats_reset(uint16_t port_id);
* The per-queue packet statistics functionality number that the transmit
* queue is to be assigned.
* The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
+ * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
* @return
* Zero if successful. Non-zero otherwise.
*/
@@ -2721,6 +2723,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
* The per-queue packet statistics functionality number that the receive
* queue is to be assigned.
* The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
+ * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
* @return
* Zero if successful. Non-zero otherwise.
*/
--
2.26.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [dpdk-techboard] [RFC 2/2] doc: announce queue stats moving to xstats
2020-10-12 16:46 ` [dpdk-dev] [RFC 2/2] doc: announce queue stats moving " Ferruh Yigit
@ 2020-10-12 16:55 ` Stephen Hemminger
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Hemminger @ 2020-10-12 16:55 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Bruce Richardson, Ray Kinsella, Neil Horman, Thomas Monjalon,
Andrew Rybchenko, dev, techboard, Min Hu
On Mon, 12 Oct 2020 17:46:01 +0100
Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> Queue stats will be removed from basic stats to xstats.
>
> It will be PMDs responsibility to fill queue stats based on number of
> queues they have.
>
> Until all PMDs implement the xstats, a temporary
> 'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' device flag created. PMDs switched
> to the xstats should set this flag to bypass ethdev layer for queue
> stats.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Maybe we need to have better API's to query per queue?
For example, there is no way to query if queue is started or not.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
2020-10-12 16:46 [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats Ferruh Yigit
2020-10-12 16:46 ` [dpdk-dev] [RFC 2/2] doc: announce queue stats moving " Ferruh Yigit
@ 2020-10-12 21:53 ` Thomas Monjalon
2020-10-13 8:31 ` Andrew Rybchenko
2020-10-13 22:53 ` Ferruh Yigit
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
2 siblings, 2 replies; 31+ messages in thread
From: Thomas Monjalon @ 2020-10-12 21:53 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Andrew Rybchenko, dev, techboard, Min Hu
12/10/2020 18:46, Ferruh Yigit:
> Queue stats are stored in 'struct rte_eth_stats' as array and array size
> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>
> As a result of technical board discussion, decided to remove the queue
> statistics from 'struct rte_eth_stats' in the long term.
>
> Instead PMDs should represent the queue statistics via xstats, this
> gives more flexibility on the number of the queues supported.
Yes
> Currently queue stats in the xstats are filled by ethdev layer, using
"some basic" queue stats
> the basic stats, when queue stats removed from basic stats the
> responsibility to fill the relevant xstats will be pushed to the PMDs.
>
> During the switch period, a temporary
> 'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' device flag is created. The PMDs
> providing the queue stats in the xstats should set this flag to bypass
> the relevant part in ethdev layer.
>
> When all PMDs switch to the xstats for the queue stats, queue stats
> related fields from 'struct rte_eth_stats' will be removed, as well as
> 'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' flag.
> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
> removed.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> +/** Device provides queue stats in xstats */
> +#define RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS 0x0040
Not exact wording here and in the title.
We should try to convey the idea that the basic queue stats
are not automatically converted from the array to some xstats.
Something like RTE_ETH_DEV_NO_AUTOFILL_QUEUE_XSTATS
Or we can define the opposite flag and set it by default
in all drivers which fill the basic queue stats.
I suggest RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
2020-10-12 21:53 ` [dpdk-dev] [RFC 1/2] ethdev: move queue stats " Thomas Monjalon
@ 2020-10-13 8:31 ` Andrew Rybchenko
2020-10-13 9:05 ` Thomas Monjalon
2020-10-13 22:53 ` Ferruh Yigit
1 sibling, 1 reply; 31+ messages in thread
From: Andrew Rybchenko @ 2020-10-13 8:31 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev, techboard, Min Hu, Stephen Hemminger
On 10/13/20 12:53 AM, Thomas Monjalon wrote:
> 12/10/2020 18:46, Ferruh Yigit:
>> Queue stats are stored in 'struct rte_eth_stats' as array and array size
>> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>>
>> As a result of technical board discussion, decided to remove the queue
>> statistics from 'struct rte_eth_stats' in the long term.
>>
>> Instead PMDs should represent the queue statistics via xstats, this
>> gives more flexibility on the number of the queues supported.
>
> Yes
I like Stephen's idea to have dedicated API to get stats per
queue. Of course it is doable via getting xstats by IDs,
but IMHO it is over-complicated. From the other hand
it sounds like a duplication to have it in xstats and
dedicated API (basically the same as we have for basic
stats and xstats).
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
2020-10-13 8:31 ` Andrew Rybchenko
@ 2020-10-13 9:05 ` Thomas Monjalon
2020-10-13 9:16 ` Andrew Rybchenko
2020-10-13 15:04 ` Stephen Hemminger
0 siblings, 2 replies; 31+ messages in thread
From: Thomas Monjalon @ 2020-10-13 9:05 UTC (permalink / raw)
To: Ferruh Yigit, Andrew Rybchenko, Stephen Hemminger; +Cc: dev, techboard, Min Hu
13/10/2020 10:31, Andrew Rybchenko:
> On 10/13/20 12:53 AM, Thomas Monjalon wrote:
> > 12/10/2020 18:46, Ferruh Yigit:
> >> Queue stats are stored in 'struct rte_eth_stats' as array and array size
> >> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
> >>
> >> As a result of technical board discussion, decided to remove the queue
> >> statistics from 'struct rte_eth_stats' in the long term.
> >>
> >> Instead PMDs should represent the queue statistics via xstats, this
> >> gives more flexibility on the number of the queues supported.
> >
> > Yes
>
> I like Stephen's idea to have dedicated API to get stats per
> queue. Of course it is doable via getting xstats by IDs,
> but IMHO it is over-complicated. From the other hand
> it sounds like a duplication to have it in xstats and
> dedicated API (basically the same as we have for basic
> stats and xstats).
Please read my proposal to have fixed ids for common stats
and fixed id ranges for stats per queue:
https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
(slide 11)
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
2020-10-13 9:05 ` Thomas Monjalon
@ 2020-10-13 9:16 ` Andrew Rybchenko
2020-10-13 22:41 ` Ferruh Yigit
2020-10-13 15:04 ` Stephen Hemminger
1 sibling, 1 reply; 31+ messages in thread
From: Andrew Rybchenko @ 2020-10-13 9:16 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit, Stephen Hemminger; +Cc: dev, techboard, Min Hu
On 10/13/20 12:05 PM, Thomas Monjalon wrote:
> 13/10/2020 10:31, Andrew Rybchenko:
>> On 10/13/20 12:53 AM, Thomas Monjalon wrote:
>>> 12/10/2020 18:46, Ferruh Yigit:
>>>> Queue stats are stored in 'struct rte_eth_stats' as array and array size
>>>> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>>>>
>>>> As a result of technical board discussion, decided to remove the queue
>>>> statistics from 'struct rte_eth_stats' in the long term.
>>>>
>>>> Instead PMDs should represent the queue statistics via xstats, this
>>>> gives more flexibility on the number of the queues supported.
>>>
>>> Yes
>>
>> I like Stephen's idea to have dedicated API to get stats per
>> queue. Of course it is doable via getting xstats by IDs,
>> but IMHO it is over-complicated. From the other hand
>> it sounds like a duplication to have it in xstats and
>> dedicated API (basically the same as we have for basic
>> stats and xstats).
>
> Please read my proposal to have fixed ids for common stats
> and fixed id ranges for stats per queue:
> https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
> (slide 11)
>
Ah, yes, I forgot that point. Makes sense and LGTM.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
2020-10-13 9:05 ` Thomas Monjalon
2020-10-13 9:16 ` Andrew Rybchenko
@ 2020-10-13 15:04 ` Stephen Hemminger
1 sibling, 0 replies; 31+ messages in thread
From: Stephen Hemminger @ 2020-10-13 15:04 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Ferruh Yigit, Andrew Rybchenko, dev, techboard, Min Hu
On Tue, 13 Oct 2020 11:05:07 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> 13/10/2020 10:31, Andrew Rybchenko:
> > On 10/13/20 12:53 AM, Thomas Monjalon wrote:
> > > 12/10/2020 18:46, Ferruh Yigit:
> > >> Queue stats are stored in 'struct rte_eth_stats' as array and array size
> > >> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
> > >>
> > >> As a result of technical board discussion, decided to remove the queue
> > >> statistics from 'struct rte_eth_stats' in the long term.
> > >>
> > >> Instead PMDs should represent the queue statistics via xstats, this
> > >> gives more flexibility on the number of the queues supported.
> > >
> > > Yes
> >
> > I like Stephen's idea to have dedicated API to get stats per
> > queue. Of course it is doable via getting xstats by IDs,
> > but IMHO it is over-complicated. From the other hand
> > it sounds like a duplication to have it in xstats and
> > dedicated API (basically the same as we have for basic
> > stats and xstats).
>
> Please read my proposal to have fixed ids for common stats
> and fixed id ranges for stats per queue:
> https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
> (slide 11)
>
>
Looks good. if id's are known than should be possible to go from port/queue to xstats id.
FYI - the inclusion of CRC in counters goes back to a Cisco vs Juniper fight.
Cisco has more people wasting time on standards committees so they always get
their way into the standards bodies.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
2020-10-13 9:16 ` Andrew Rybchenko
@ 2020-10-13 22:41 ` Ferruh Yigit
0 siblings, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-13 22:41 UTC (permalink / raw)
To: Andrew Rybchenko, Thomas Monjalon, Stephen Hemminger
Cc: dev, techboard, Min Hu
On 10/13/2020 10:16 AM, Andrew Rybchenko wrote:
> On 10/13/20 12:05 PM, Thomas Monjalon wrote:
>> 13/10/2020 10:31, Andrew Rybchenko:
>>> On 10/13/20 12:53 AM, Thomas Monjalon wrote:
>>>> 12/10/2020 18:46, Ferruh Yigit:
>>>>> Queue stats are stored in 'struct rte_eth_stats' as array and array size
>>>>> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>>>>>
>>>>> As a result of technical board discussion, decided to remove the queue
>>>>> statistics from 'struct rte_eth_stats' in the long term.
>>>>>
>>>>> Instead PMDs should represent the queue statistics via xstats, this
>>>>> gives more flexibility on the number of the queues supported.
>>>>
>>>> Yes
>>>
>>> I like Stephen's idea to have dedicated API to get stats per
>>> queue. Of course it is doable via getting xstats by IDs,
>>> but IMHO it is over-complicated. From the other hand
>>> it sounds like a duplication to have it in xstats and
>>> dedicated API (basically the same as we have for basic
>>> stats and xstats).
>>
>> Please read my proposal to have fixed ids for common stats
>> and fixed id ranges for stats per queue:
>> https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
>> (slide 11)
>>
>
> Ah, yes, I forgot that point. Makes sense and LGTM.
>
But we don't have (and not planned for) the fixed id ranges in the xstats yes,
and agree it will be complicated to parse the queue stats from xstats without it.
Should we wait for the fixed id ranges change before we continue with this patch?
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats
2020-10-12 21:53 ` [dpdk-dev] [RFC 1/2] ethdev: move queue stats " Thomas Monjalon
2020-10-13 8:31 ` Andrew Rybchenko
@ 2020-10-13 22:53 ` Ferruh Yigit
1 sibling, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-13 22:53 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Andrew Rybchenko, dev, techboard, Min Hu
On 10/12/2020 10:53 PM, Thomas Monjalon wrote:
> 12/10/2020 18:46, Ferruh Yigit:
>> Queue stats are stored in 'struct rte_eth_stats' as array and array size
>> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>>
>> As a result of technical board discussion, decided to remove the queue
>> statistics from 'struct rte_eth_stats' in the long term.
>>
>> Instead PMDs should represent the queue statistics via xstats, this
>> gives more flexibility on the number of the queues supported.
>
> Yes
>
>> Currently queue stats in the xstats are filled by ethdev layer, using
>
> "some basic" queue stats
>
>> the basic stats, when queue stats removed from basic stats the
>> responsibility to fill the relevant xstats will be pushed to the PMDs.
>>
>> During the switch period, a temporary
>> 'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' device flag is created. The PMDs
>> providing the queue stats in the xstats should set this flag to bypass
>> the relevant part in ethdev layer.
>>
>> When all PMDs switch to the xstats for the queue stats, queue stats
>> related fields from 'struct rte_eth_stats' will be removed, as well as
>> 'RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS' flag.
>> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
>> removed.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> --- a/lib/librte_ethdev/rte_ethdev.h
>> +++ b/lib/librte_ethdev/rte_ethdev.h
>> +/** Device provides queue stats in xstats */
>> +#define RTE_ETH_DEV_QUEUE_STATS_IN_XSTATS 0x0040
>
> Not exact wording here and in the title.
> We should try to convey the idea that the basic queue stats
> are not automatically converted from the array to some xstats.
> Something like RTE_ETH_DEV_NO_AUTOFILL_QUEUE_XSTATS
>
> Or we can define the opposite flag and set it by default
> in all drivers which fill the basic queue stats.
> I suggest RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS
>
Agree that opposite flag makes it easier to traces the PMDs missing
implementation, will send another RFC with it.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-12 16:46 [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats Ferruh Yigit
2020-10-12 16:46 ` [dpdk-dev] [RFC 2/2] doc: announce queue stats moving " Ferruh Yigit
2020-10-12 21:53 ` [dpdk-dev] [RFC 1/2] ethdev: move queue stats " Thomas Monjalon
@ 2020-10-14 2:26 ` Ferruh Yigit
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats Ferruh Yigit
` (4 more replies)
2 siblings, 5 replies; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-14 2:26 UTC (permalink / raw)
To: Ferruh Yigit, John W. Linville, Ciara Loftus, Qi Zhang,
Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh,
Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath,
Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur,
Chas Williams, Min Hu (Connor),
Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Jeff Guo,
Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik,
Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley,
Hyong Youb Kim, Gaetan Rivet, Xiao Wang, Ziyang Xuan,
Xiaoyun Wang, Guoyang Zhou, Wei Hu (Xavier),
Yisen Zhuang, Beilei Xing, Jingjing Wu, Qiming Yang,
Alfredo Cardigliano, Rosen Xu, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad,
Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi,
Stephen Hemminger, K. Y. Srinivasan, Haiyang Zhang, Long Li,
Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra,
Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal,
Bruce Richardson, Andrew Rybchenko, Keith Wiles, Maciej Czekaj,
Maxime Coquelin, Chenbo Xia, Zhihong Wang, Yong Wang,
Thomas Monjalon
Cc: dev
Queue stats are stored in 'struct rte_eth_stats' as array and array size
is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
As a result of technical board discussion, decided to remove the queue
statistics from 'struct rte_eth_stats' in the long term.
Instead PMDs should represent the queue statistics via xstats, this
gives more flexibility on the number of the queues supported.
Currently queue stats in the xstats are filled by ethdev layer, using
some basic stats, when queue stats removed from basic stats the
responsibility to fill the relevant xstats will be pushed to the PMDs.
During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
device flag is created. Initially all PMDs using xstats set this flag.
The PMDs implemented queue stats in the xstats should clear the flag.
When all PMDs switch to the xstats for the queue stats, queue stats
related fields from 'struct rte_eth_stats' will be removed, as well as
'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
removed.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/af_packet/rte_eth_af_packet.c | 1 +
drivers/net/af_xdp/rte_eth_af_xdp.c | 1 +
drivers/net/ark/ark_ethdev.c | 2 ++
drivers/net/atlantic/atl_ethdev.c | 2 ++
drivers/net/avp/avp_ethdev.c | 1 +
drivers/net/axgbe/axgbe_ethdev.c | 2 ++
drivers/net/bnx2x/bnx2x_ethdev.c | 1 +
drivers/net/bnxt/bnxt_ethdev.c | 1 +
drivers/net/bnxt/bnxt_reps.c | 3 ++-
drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
drivers/net/cxgbe/cxgbe_ethdev.c | 2 ++
drivers/net/dpaa/dpaa_ethdev.c | 2 ++
drivers/net/dpaa2/dpaa2_ethdev.c | 2 ++
drivers/net/e1000/em_ethdev.c | 1 +
drivers/net/e1000/igb_ethdev.c | 2 ++
drivers/net/ena/ena_ethdev.c | 2 ++
drivers/net/enetc/enetc_ethdev.c | 2 ++
drivers/net/enic/enic_ethdev.c | 1 +
drivers/net/enic/enic_vf_representor.c | 3 ++-
drivers/net/failsafe/failsafe.c | 3 ++-
drivers/net/fm10k/fm10k_ethdev.c | 1 +
drivers/net/hinic/hinic_pmd_ethdev.c | 2 ++
drivers/net/hns3/hns3_ethdev.c | 2 ++
drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
drivers/net/i40e/i40e_ethdev.c | 1 +
drivers/net/i40e/i40e_ethdev_vf.c | 1 +
drivers/net/i40e/i40e_vf_representor.c | 3 ++-
drivers/net/iavf/iavf_ethdev.c | 1 +
drivers/net/ice/ice_dcf_ethdev.c | 2 ++
drivers/net/ice/ice_ethdev.c | 2 ++
drivers/net/igc/igc_ethdev.c | 1 +
drivers/net/ionic/ionic_ethdev.c | 1 +
drivers/net/ipn3ke/ipn3ke_representor.c | 3 ++-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
drivers/net/kni/rte_eth_kni.c | 1 +
drivers/net/liquidio/lio_ethdev.c | 1 +
drivers/net/memif/rte_eth_memif.c | 1 +
drivers/net/mlx4/mlx4.c | 1 +
drivers/net/mlx5/linux/mlx5_os.c | 1 +
drivers/net/mvneta/mvneta_ethdev.c | 1 +
drivers/net/mvpp2/mrvl_ethdev.c | 1 +
drivers/net/netvsc/hn_ethdev.c | 2 ++
drivers/net/nfb/nfb_ethdev.c | 2 ++
drivers/net/nfp/nfp_net.c | 2 ++
drivers/net/null/rte_eth_null.c | 1 +
drivers/net/octeontx/octeontx_ethdev.c | 1 +
drivers/net/octeontx2/otx2_ethdev.c | 1 +
drivers/net/pcap/rte_eth_pcap.c | 1 +
drivers/net/pfe/pfe_ethdev.c | 2 ++
drivers/net/qede/qede_ethdev.c | 1 +
drivers/net/ring/rte_eth_ring.c | 1 +
drivers/net/sfc/sfc_ethdev.c | 1 +
drivers/net/szedata2/rte_eth_szedata2.c | 2 ++
drivers/net/tap/rte_eth_tap.c | 3 ++-
drivers/net/thunderx/nicvf_ethdev.c | 1 +
drivers/net/vhost/rte_eth_vhost.c | 3 ++-
drivers/net/virtio/virtio_ethdev.c | 2 ++
drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 +
lib/librte_ethdev/rte_ethdev.c | 18 ++++++++++++++----
lib/librte_ethdev/rte_ethdev.h | 5 +++++
60 files changed, 106 insertions(+), 12 deletions(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 25876224f8..64d904a365 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -859,6 +859,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
data->nb_tx_queues = (uint16_t)nb_queues;
data->dev_link = pmd_link;
data->mac_addrs = &(*internals)->eth_addr;
+ data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
(*eth_dev)->dev_ops = &ops;
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 0562e58696..cf5bead59d 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1561,6 +1561,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
eth_dev->data->dev_private = internals;
eth_dev->data->dev_link = pmd_link;
eth_dev->data->mac_addrs = &internals->eth_addr;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
eth_dev->dev_ops = &ops;
eth_dev->rx_pkt_burst = eth_af_xdp_rx;
eth_dev->tx_pkt_burst = eth_af_xdp_tx;
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index e3b1347769..3074957d44 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -256,6 +256,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
return ret;
pci_dev = RTE_ETH_DEV_TO_PCI(dev);
rte_eth_copy_pci_info(dev, pci_dev);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Use dummy function until setup */
dev->rx_pkt_burst = ð_ark_recv_pkts_noop;
@@ -383,6 +384,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
eth_dev->rx_pkt_burst = ark->eth_dev->rx_pkt_burst;
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
eth_dev->data->mac_addrs = rte_zmalloc(name,
RTE_ETHER_ADDR_LEN, 0);
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 2217511ca0..1c918fd9af 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -380,6 +380,8 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
/* Vendor and Device ID need to be set before init of shared code */
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 95fdb57451..b4032e0c7b 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -974,6 +974,7 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
}
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Check current migration status */
if (avp_dev_migration_pending(eth_dev)) {
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index cf085487cc..33512be133 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -1970,6 +1970,8 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
pdata = eth_dev->data->dev_private;
/* initial state */
rte_bit_relaxed_set32(AXGBE_DOWN, &pdata->dev_state);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 40225b2f44..0c8bf3a4e2 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -644,6 +644,7 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
}
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
sc->pcie_bus = pci_dev->addr.bus;
sc->pcie_device = pci_dev->addr.devid;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b4654ec6af..2ba228b68b 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6003,6 +6003,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
return 0;
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
bp = eth_dev->data->dev_private;
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 74a76fce57..468eb63025 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -184,7 +184,8 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
vf_rep_bp->rep_fc_r2f = rep_params->rep_fc_r2f;
vf_rep_bp->rep_fc_f2r = rep_params->rep_fc_f2r;
- eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
eth_dev->data->representor_id = rep_params->vf_id;
rte_eth_random_addr(vf_rep_bp->dflt_mac_addr);
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 1c404b2edd..ceea93b6e9 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3223,7 +3223,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
}
eth_dev->dev_ops = &default_dev_ops;
- eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC;
+ eth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
rte_spinlock_init(&internals->lock);
rte_spinlock_init(&internals->lsc_lock);
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 16beb2d435..9e71d8dc13 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -1260,6 +1260,8 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
snprintf(name, sizeof(name), "cxgbeadapter%d", eth_dev->data->port_id);
adapter = rte_zmalloc(name, sizeof(*adapter), 0);
if (!adapter)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index af47c196ae..04ef5fb618 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2219,6 +2219,8 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
if (dpaa_drv->drv_flags & RTE_DPAA_DRV_INTR_LSC)
eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
/* Invoke PMD device initialization function */
diag = dpaa_dev_init(eth_dev);
if (diag == 0) {
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index d8624514df..b68197de7d 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -2796,6 +2796,8 @@ rte_dpaa2_probe(struct rte_dpaa2_driver *dpaa2_drv,
if (dpaa2_drv->drv_flags & RTE_DPAA2_DRV_INTR_LSC)
eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
/* Invoke PMD device initialization function */
diag = dpaa2_dev_init(eth_dev);
if (diag == 0) {
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index d050eb478a..63c47a8745 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -265,6 +265,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
}
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
hw->device_id = pci_dev->id.device_id;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index cb3d97e2a3..5a7c471a35 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -765,6 +765,7 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
}
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
@@ -959,6 +960,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index d32fa43837..572226f1c6 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1775,6 +1775,8 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
memset(adapter, 0, sizeof(struct ena_adapter));
ena_dev = &adapter->ena_dev;
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index b3dec7e64d..cb1d1924fa 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -881,6 +881,8 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
eth_dev->rx_pkt_burst = &enetc_recv_pkts;
eth_dev->tx_pkt_burst = &enetc_xmit_pkts;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
/* Retrieving and storing the HW base address of device */
hw->hw.reg = (void *)pci_dev->mem_resource[0].addr;
hw->device_id = pci_dev->id.device_id;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 60ee5e01de..e9d006527b 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1298,6 +1298,7 @@ static int eth_enic_dev_init(struct rte_eth_dev *eth_dev,
pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
rte_eth_copy_pci_info(eth_dev, pdev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
enic->pdev = pdev;
addr = &pdev->addr;
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index 169c611a68..b4d6176590 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -670,7 +670,8 @@ int enic_vf_representor_init(struct rte_eth_dev *eth_dev, void *init_params)
eth_dev->device->driver = pf->rte_dev->device->driver;
eth_dev->dev_ops = &enic_vf_representor_dev_ops;
- eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
eth_dev->data->representor_id = vf->vf_id;
eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr_vf",
sizeof(struct rte_ether_addr) *
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index b921e101e6..2e9a9c7d21 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -264,7 +264,8 @@ fs_eth_dev_create(struct rte_vdev_device *vdev)
mac->addr_bytes[0], mac->addr_bytes[1],
mac->addr_bytes[2], mac->addr_bytes[3],
mac->addr_bytes[4], mac->addr_bytes[5]);
- dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
+ dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
PRIV(dev)->intr_handle = (struct rte_intr_handle){
.fd = -1,
.type = RTE_INTR_HANDLE_EXT,
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index c4a6fdf7f0..3d166e6007 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3074,6 +3074,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
}
rte_eth_copy_pci_info(dev, pdev);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
macvlan = FM10K_DEV_PRIVATE_TO_MACVLAN(dev->data->dev_private);
memset(macvlan, 0, sizeof(*macvlan));
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 466c8362b9..3a28cd2710 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -3103,6 +3103,8 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
return 0;
}
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);
memset(nic_dev, 0, sizeof(*nic_dev));
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ce5bae538d..7c2f735053 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6102,6 +6102,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
ret = hns3_mp_init_primary();
if (ret) {
PMD_INIT_LOG(ERR,
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 1a19c0e6e6..7629298d31 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2749,6 +2749,8 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
ret = hns3_mp_init_primary();
if (ret) {
PMD_INIT_LOG(ERR,
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 943cfe71dc..013030c5a8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1465,6 +1465,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
intr_handle = &pci_dev->intr_handle;
rte_eth_copy_pci_info(dev, pci_dev);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
pf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
pf->adapter->eth_dev = dev;
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 4d6510d1ff..29ef9f70f0 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1575,6 +1575,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
}
i40e_set_default_ptype_table(eth_dev);
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->vendor_id = pci_dev->id.vendor_id;
hw->device_id = pci_dev->id.device_id;
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index f09d4d8798..17e00ae362 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -507,7 +507,8 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
return -ENODEV;
}
- ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
+ ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
ethdev->data->representor_id = representor->vf_id;
/* Setting the number queues allocated to the VF */
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index f5e6e852ae..dee0fe5ead 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1431,6 +1431,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->vendor_id = pci_dev->id.vendor_id;
hw->device_id = pci_dev->id.device_id;
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 33dd0c44f2..58d4a0577b 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -908,6 +908,8 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
adapter->real_hw.vc_event_msg_cb = ice_dcf_handle_pf_event_msg;
if (ice_dcf_init_hw(eth_dev, &adapter->real_hw) != 0) {
PMD_INIT_LOG(ERR, "Failed to init DCF hardware");
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 0056da78a5..fea0f102aa 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2137,6 +2137,8 @@ ice_dev_init(struct rte_eth_dev *dev)
return 0;
}
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
ice_set_default_ptype_table(dev);
pci_dev = RTE_DEV_TO_PCI(dev->device);
intr_handle = &pci_dev->intr_handle;
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 7f5066df4b..2991fdf343 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -1240,6 +1240,7 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
return 0;
rte_eth_copy_pci_info(dev, pci_dev);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->back = pci_dev;
hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index ef7d06e526..b6cf3ccd06 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -1001,6 +1001,7 @@ eth_ionic_dev_init(struct rte_eth_dev *eth_dev, void *init_params)
return 0;
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
lif->index = adapter->nlifs;
lif->eth_dev = eth_dev;
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index b9fb4d4e46..a8765b5f4e 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2964,7 +2964,8 @@ ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params)
return -ENODEV;
}
- ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
+ ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
rte_spinlock_lock(&ipn3ke_link_notify_list_lk);
TAILQ_INSERT_TAIL(&ipn3ke_rpst_list, rpst, next);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0b98e210e7..819370a91b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1118,6 +1118,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
rte_atomic32_clear(&ad->link_thread_running);
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Vendor and Device ID need to be set before init of shared code */
hw->device_id = pci_dev->id.device_id;
@@ -1596,6 +1597,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
pci_dev->device.devargs);
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index be747adf86..78b6b768b5 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -389,6 +389,7 @@ eth_kni_create(struct rte_vdev_device *vdev,
data->mac_addrs = &internals->eth_addr;
data->promiscuous = 1;
data->all_multicast = 1;
+ data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
rte_eth_random_addr(internals->eth_addr.addr_bytes);
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 1a41f27198..433f9151e1 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -2090,6 +2090,7 @@ lio_eth_dev_init(struct rte_eth_dev *eth_dev)
return 0;
rte_eth_copy_pci_info(eth_dev, pdev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
if (pdev->mem_resource[0].addr) {
lio_dev->hw_addr = pdev->mem_resource[0].addr;
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index d71d9aae48..b2ec45ce08 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1539,6 +1539,7 @@ memif_create(struct rte_vdev_device *vdev, enum memif_role_t role,
data->dev_link = pmd_link;
data->mac_addrs = ether_addr;
data->promiscuous = 1;
+ data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
eth_dev->dev_ops = &ops;
eth_dev->device = &vdev->device;
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index cfcfb8a8fc..2892a9a852 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1033,6 +1033,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
eth_dev->data->mac_addrs = priv->mac;
eth_dev->device = &pci_dev->device;
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Initialize local interrupt handle for current port. */
memset(&priv->intr_handle, 0, sizeof(struct rte_intr_handle));
priv->intr_handle.fd = -1;
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 487714f847..2056724b1a 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1263,6 +1263,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
priv->dev_data = eth_dev->data;
eth_dev->data->mac_addrs = priv->mac;
eth_dev->device = dpdk_dev;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Configure the first MAC address by default. */
if (mlx5_get_mac(eth_dev, &mac.addr_bytes)) {
DRV_LOG(ERR,
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index 607771149a..caebaa1458 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -836,6 +836,7 @@ mvneta_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
eth_dev->rx_pkt_burst = mvneta_rx_pkt_burst;
mvneta_set_tx_function(eth_dev);
eth_dev->dev_ops = &mvneta_ops;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
rte_eth_dev_probing_finish(eth_dev);
return 0;
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index a230a96840..d51fdc4aef 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -2865,6 +2865,7 @@ mrvl_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
eth_dev->rx_pkt_burst = mrvl_rx_pkt_burst;
mrvl_set_tx_function(eth_dev);
eth_dev->dev_ops = &mrvl_ops;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
rte_eth_dev_probing_finish(eth_dev);
return 0;
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 5ae2d469c8..9cc3c03095 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -947,6 +947,8 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
/* Since Hyper-V only supports one MAC address */
eth_dev->data->mac_addrs = rte_calloc("hv_mac", HN_MAX_MAC_ADDRS,
sizeof(struct rte_ether_addr), 0);
diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c
index a9a8bc878d..f253149fc7 100644
--- a/drivers/net/nfb/nfb_ethdev.c
+++ b/drivers/net/nfb/nfb_ethdev.c
@@ -511,6 +511,8 @@ nfb_eth_dev_init(struct rte_eth_dev *dev)
data->all_multicast = nfb_eth_allmulticast_get(dev);
internals->rx_filter_original = data->promiscuous;
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
RTE_LOG(INFO, PMD, "NFB device ("
PCI_PRI_FMT ") successfully initialized\n",
pci_addr->domain, pci_addr->bus, pci_addr->devid,
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index c1da66e3d6..5c715a223b 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2990,6 +2990,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
if (!(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
eth_dev->data->dev_flags |= RTE_ETH_DEV_NOLIVE_MAC_ADDR;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
PMD_INIT_LOG(INFO, "port %d VendorID=0x%x DeviceID=0x%x "
"mac=%02x:%02x:%02x:%02x:%02x:%02x",
eth_dev->data->port_id, pci_dev->id.vendor_id,
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 7c3c76a897..e9f97d85fc 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -548,6 +548,7 @@ eth_dev_null_create(struct rte_vdev_device *dev, struct pmd_options *args)
data->mac_addrs = &internals->eth_addr;
data->promiscuous = 1;
data->all_multicast = 1;
+ data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
eth_dev->dev_ops = &ops;
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index aa9ef3bb70..61ce39f47a 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1376,6 +1376,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
data->promiscuous = 0;
data->all_multicast = 0;
data->scattered_rx = 0;
+ data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Get maximum number of supported MAC entries */
max_entries = octeontx_bgx_port_mac_entries_get(nic->port_id);
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b69b92bf58..c68e0d6bce 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -2422,6 +2422,7 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Zero out everything after OTX2_DEV to allow proper dev_reset() */
memset(&dev->otx2_eth_dev_data_start, 0, sizeof(*dev) -
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 49764c0ee6..df9cbda79f 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1156,6 +1156,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
data->mac_addrs = &(*internals)->eth_addr;
data->promiscuous = 1;
data->all_multicast = 1;
+ data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/*
* NOTE: we'll replace the data element, of originally allocated
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index f0de1c8a2e..cba9baf973 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -849,6 +849,8 @@ pfe_eth_init(struct rte_vdev_device *vdev, struct pfe *pfe, int id)
eth_dev->data->nb_rx_queues = 1;
eth_dev->data->nb_tx_queues = 1;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
/* For link status, open the PFE CDEV; Error from this function
* is silently ignored; In case of error, the link status will not
* be available.
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 548497f3ae..a683a7c230 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2543,6 +2543,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
}
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* @DPDK */
edev->vendor_id = pci_dev->id.vendor_id;
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 22c0802688..f32a2e64ca 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -358,6 +358,7 @@ do_eth_dev_ring_create(const char *name,
data->mac_addrs = &internals->address;
data->promiscuous = 1;
data->all_multicast = 1;
+ data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
eth_dev->dev_ops = &ops;
data->numa_node = numa_node;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index f41d0f5fe2..a6762975d2 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -2212,6 +2212,7 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
/* Copy PCI device info to the dev->data */
rte_eth_copy_pci_info(dev, pci_dev);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
rc = sfc_kvargs_parse(sa);
if (rc != 0)
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 0eecec1e8c..79f48e4020 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1536,6 +1536,8 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi)
rte_ether_addr_copy(ð_addr, data->mac_addrs);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
PMD_INIT_LOG(INFO, "%s device %s successfully initialized",
RTE_STR(RTE_SZEDATA2_DRIVER_NAME), data->name);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index e592a469b3..26284ee64c 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1921,7 +1921,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
/* Setup some default values */
data = dev->data;
data->dev_private = pmd;
- data->dev_flags = RTE_ETH_DEV_INTR_LSC;
+ data->dev_flags = RTE_ETH_DEV_INTR_LSC |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
data->numa_node = numa_node;
data->dev_link = pmd_link;
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index cc6eb4ba24..5482ad682a 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -2152,6 +2152,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
nic->device_id = pci_dev->id.device_id;
nic->vendor_id = pci_dev->id.vendor_id;
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 66efecb320..2d8c9c8de7 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1444,7 +1444,8 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
internal->flags = flags;
internal->disable_flags = disable_flags;
data->dev_link = pmd_link;
- data->dev_flags = RTE_ETH_DEV_INTR_LSC;
+ data->dev_flags = RTE_ETH_DEV_INTR_LSC |
+ RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
data->promiscuous = 1;
data->all_multicast = 1;
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0236c756dc..0aee189878 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1718,6 +1718,8 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
else
eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
/* Setting up rx_header size for the device */
if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF) ||
vtpci_with_feature(hw, VIRTIO_F_VERSION_1) ||
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index fa950e1ba0..0b17a0bfc6 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -250,6 +250,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
return 0;
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Vendor and Device ID need to be set before init of shared code */
hw->device_id = pci_dev->id.device_id;
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 5b7979a3b8..c8f318ff7d 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2496,8 +2496,10 @@ get_xstats_basic_count(struct rte_eth_dev *dev)
nb_txqs = RTE_MIN(dev->data->nb_tx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
count = RTE_NB_STATS;
- count += nb_rxqs * RTE_NB_RXQ_STATS;
- count += nb_txqs * RTE_NB_TXQ_STATS;
+ if (dev->data->dev_flags & RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS) {
+ count += nb_rxqs * RTE_NB_RXQ_STATS;
+ count += nb_txqs * RTE_NB_TXQ_STATS;
+ }
return count;
}
@@ -2588,6 +2590,10 @@ rte_eth_basic_stats_get_names(struct rte_eth_dev *dev,
sizeof(xstats_names[0].name));
cnt_used_entries++;
}
+
+ if ((dev->data->dev_flags & RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS) == 0)
+ return cnt_used_entries;
+
num_q = RTE_MIN(dev->data->nb_rx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
for (id_queue = 0; id_queue < num_q; id_queue++) {
for (idx = 0; idx < RTE_NB_RXQ_STATS; idx++) {
@@ -2786,6 +2792,9 @@ rte_eth_basic_stats_get(uint16_t port_id, struct rte_eth_xstat *xstats)
xstats[count++].value = val;
}
+ if ((dev->data->dev_flags & RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS) == 0)
+ return count;
+
/* per-rxq stats */
for (q = 0; q < nb_rxqs; q++) {
for (i = 0; i < RTE_NB_RXQ_STATS; i++) {
@@ -2921,8 +2930,9 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
nb_txqs = RTE_MIN(dev->data->nb_tx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
/* Return generic statistics */
- count = RTE_NB_STATS + (nb_rxqs * RTE_NB_RXQ_STATS) +
- (nb_txqs * RTE_NB_TXQ_STATS);
+ count = RTE_NB_STATS;
+ if (dev->data->dev_flags & RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS)
+ count += (nb_rxqs * RTE_NB_RXQ_STATS) + (nb_txqs * RTE_NB_TXQ_STATS);
/* implemented by the driver */
if (dev->dev_ops->xstats_get != NULL) {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index f4cc5917b9..bb7a2b4289 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1694,6 +1694,11 @@ struct rte_eth_dev_owner {
#define RTE_ETH_DEV_REPRESENTOR 0x0010
/** Device does not support MAC change after started */
#define RTE_ETH_DEV_NOLIVE_MAC_ADDR 0x0020
+/**
+ * Queue xstats filled automatically by ethdev layer.
+ * PMDs filling the queue xstats themselves should not set this flag
+ */
+#define RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS 0x0040
/**
* Iterates over valid ethdev ports owned by a specific owner.
--
2.26.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
@ 2020-10-14 2:26 ` Ferruh Yigit
2020-10-14 8:43 ` Kinsella, Ray
2020-10-14 9:35 ` Igor Ryzhov
2020-10-14 8:40 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Wang, Haiyue
` (3 subsequent siblings)
4 siblings, 2 replies; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-14 2:26 UTC (permalink / raw)
To: Ferruh Yigit, Bruce Richardson, Ray Kinsella, Neil Horman,
Thomas Monjalon, Andrew Rybchenko
Cc: dev
Queue stats will be removed from basic stats to xstats.
It will be PMDs responsibility to fill queue stats based on number of
queues they have.
Until all PMDs implement the xstats, a temporary
'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
to the xstats should clear this flag to bypass the ethdev layer autofill
for queue stats.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
config/rte_config.h | 2 +-
doc/guides/rel_notes/deprecation.rst | 7 +++++++
lib/librte_ethdev/rte_ethdev.h | 3 +++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/config/rte_config.h b/config/rte_config.h
index 03d90d78bc..9ef3b75940 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -55,7 +55,7 @@
/* ether defines */
#define RTE_MAX_QUEUES_PER_PORT 1024
-#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16
+#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 /* max 256 */
#define RTE_ETHDEV_RXTX_CALLBACKS 1
/* cryptodev defines */
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 584e720879..9143cfc529 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -164,6 +164,13 @@ Deprecation Notices
following the IPv6 header, as proposed in RFC
https://mails.dpdk.org/archives/dev/2020-August/177257.html.
+* ethdev: Queue specific stats fields will be removed from ``struct rte_eth_stats``.
+ Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``, ``q_obytes``,
+ ``q_errors``.
+ Instead queue stats will be received via xstats API. Current method support
+ will be limited to maximum 256 queues.
+ Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be removed.
+
* security: The API ``rte_security_session_create`` takes only single mempool
for session and session private data. So the application need to create
mempool for twice the number of sessions needed and will also lead to
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index bb7a2b4289..a2e811ca48 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -253,6 +253,7 @@ struct rte_eth_stats {
uint64_t ierrors; /**< Total number of erroneous received packets. */
uint64_t oerrors; /**< Total number of failed transmitted packets. */
uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
+ /* Queue stats are limited to max 256 queues */
uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
/**< Total number of queue RX packets. */
uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
@@ -2704,6 +2705,7 @@ int rte_eth_xstats_reset(uint16_t port_id);
* The per-queue packet statistics functionality number that the transmit
* queue is to be assigned.
* The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
+ * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
* @return
* Zero if successful. Non-zero otherwise.
*/
@@ -2724,6 +2726,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
* The per-queue packet statistics functionality number that the receive
* queue is to be assigned.
* The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
+ * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
* @return
* Zero if successful. Non-zero otherwise.
*/
--
2.26.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats Ferruh Yigit
@ 2020-10-14 8:40 ` Wang, Haiyue
2020-10-14 8:46 ` Wang, Xiao W
` (2 subsequent siblings)
4 siblings, 0 replies; 31+ messages in thread
From: Wang, Haiyue @ 2020-10-14 8:40 UTC (permalink / raw)
To: Yigit, Ferruh, John W. Linville, Loftus, Ciara, Zhang, Qi Z,
Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh,
Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath,
Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur,
Chas Williams, Min Hu (Connor),
Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Guo, Jia,
Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin,
Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim,
Gaetan Rivet, Wang, Xiao W, Ziyang Xuan, Xiaoyun Wang,
Guoyang Zhou, Wei Hu (Xavier),
Yisen Zhuang, Xing, Beilei, Wu, Jingjing, Yang, Qiming,
Alfredo Cardigliano, Xu, Rosen, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad,
Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi,
Stephen Hemminger, K. Y. Srinivasan, Haiyang Zhang, Long Li,
Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra,
Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal,
Richardson, Bruce, Andrew Rybchenko, Wiles, Keith, Maciej Czekaj,
Maxime Coquelin, Xia, Chenbo, Wang, Zhihong, Yong Wang,
Thomas Monjalon
Cc: dev
> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Wednesday, October 14, 2020 10:27
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; John W. Linville <linville@tuxdriver.com>; Loftus, Ciara
> <ciara.loftus@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Shepard Siegel
> <shepard.siegel@atomicrules.com>; Ed Czeck <ed.czeck@atomicrules.com>; John Miller
> <john.miller@atomicrules.com>; Igor Russkikh <igor.russkikh@aquantia.com>; Pavel Belous
> <pavel.belous@aquantia.com>; Steven Webster <steven.webster@windriver.com>; Matt Peters
> <matt.peters@windriver.com>; Somalapuram Amaranath <asomalap@amd.com>; Rasesh Mody <rmody@marvell.com>;
> Shahed Shaikh <shshaikh@marvell.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>; Somnath Kotur
> <somnath.kotur@broadcom.com>; Chas Williams <chas3@att.com>; Min Hu (Connor) <humin29@huawei.com>;
> Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>; Hemant Agrawal <hemant.agrawal@nxp.com>; Sachin
> Saxena <sachin.saxena@oss.nxp.com>; Guo, Jia <jia.guo@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>;
> Marcin Wojtas <mw@semihalf.com>; Michal Krawczyk <mk@semihalf.com>; Guy Tzalik <gtzalik@amazon.com>;
> Evgeny Schemeilin <evgenys@amazon.com>; Igor Chauskin <igorch@amazon.com>; Gagandeep Singh
> <g.singh@nxp.com>; John Daley <johndale@cisco.com>; Hyong Youb Kim <hyonkim@cisco.com>; Gaetan Rivet
> <grive@u256.net>; Wang, Xiao W <xiao.w.wang@intel.com>; Ziyang Xuan <xuanziyang2@huawei.com>; Xiaoyun
> Wang <cloud.wangxiaoyun@huawei.com>; Guoyang Zhou <zhouguoyang@huawei.com>; Wei Hu (Xavier)
> <xavier.huwei@huawei.com>; Yisen Zhuang <yisen.zhuang@huawei.com>; Xing, Beilei
> <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Yang, Qiming <qiming.yang@intel.com>;
> Alfredo Cardigliano <cardigliano@ntop.org>; Xu, Rosen <rosen.xu@intel.com>; Shijith Thotton
> <sthotton@marvell.com>; Srisivasubramanian Srinivasan <srinivasan@marvell.com>; Jakub Grajciar
> <jgrajcia@cisco.com>; Matan Azrad <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>; Viacheslav
> Ovsiienko <viacheslavo@nvidia.com>; Zyta Szpak <zr@semihalf.com>; Liron Himi <lironh@marvell.com>;
> Stephen Hemminger <sthemmin@microsoft.com>; K. Y. Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Long Li <longli@microsoft.com>; Martin Spinler <spinler@cesnet.cz>; Heinrich
> Kuhn <heinrich.kuhn@netronome.com>; Tetsuya Mukawa <mtetsuyah@gmail.com>; Harman Kalra
> <hkalra@marvell.com>; Jerin Jacob <jerinj@marvell.com>; Nithin Dabilpuram <ndabilpuram@marvell.com>;
> Kiran Kumar K <kirankumark@marvell.com>; Akhil Goyal <akhil.goyal@nxp.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Wiles, Keith
> <keith.wiles@intel.com>; Maciej Czekaj <mczekaj@marvell.com>; Maxime Coquelin
> <maxime.coquelin@redhat.com>; Xia, Chenbo <chenbo.xia@intel.com>; Wang, Zhihong
> <zhihong.wang@intel.com>; Yong Wang <yongwang@vmware.com>; Thomas Monjalon <thomas@monjalon.net>
> Cc: dev@dpdk.org
> Subject: [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
>
> Queue stats are stored in 'struct rte_eth_stats' as array and array size
> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>
> As a result of technical board discussion, decided to remove the queue
> statistics from 'struct rte_eth_stats' in the long term.
>
> Instead PMDs should represent the queue statistics via xstats, this
> gives more flexibility on the number of the queues supported.
>
> Currently queue stats in the xstats are filled by ethdev layer, using
> some basic stats, when queue stats removed from basic stats the
> responsibility to fill the relevant xstats will be pushed to the PMDs.
>
> During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
> device flag is created. Initially all PMDs using xstats set this flag.
> The PMDs implemented queue stats in the xstats should clear the flag.
>
> When all PMDs switch to the xstats for the queue stats, queue stats
> related fields from 'struct rte_eth_stats' will be removed, as well as
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
> removed.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> drivers/net/e1000/em_ethdev.c | 1 +
> drivers/net/e1000/igb_ethdev.c | 2 ++
> drivers/net/igc/igc_ethdev.c | 1 +
> drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
For e1000, igc, ixgbe PMDs,
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
> /**
> * Iterates over valid ethdev ports owned by a specific owner.
> --
> 2.26.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats Ferruh Yigit
@ 2020-10-14 8:43 ` Kinsella, Ray
2020-10-16 14:34 ` Thomas Monjalon
2020-10-14 9:35 ` Igor Ryzhov
1 sibling, 1 reply; 31+ messages in thread
From: Kinsella, Ray @ 2020-10-14 8:43 UTC (permalink / raw)
To: Ferruh Yigit, Bruce Richardson, Neil Horman, Thomas Monjalon,
Andrew Rybchenko
Cc: dev
On 14/10/2020 03:26, Ferruh Yigit wrote:
> Queue stats will be removed from basic stats to xstats.
>
> It will be PMDs responsibility to fill queue stats based on number of
> queues they have.
>
> Until all PMDs implement the xstats, a temporary
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
> to the xstats should clear this flag to bypass the ethdev layer autofill
> for queue stats.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> config/rte_config.h | 2 +-
> doc/guides/rel_notes/deprecation.rst | 7 +++++++
> lib/librte_ethdev/rte_ethdev.h | 3 +++
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats Ferruh Yigit
2020-10-14 8:40 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Wang, Haiyue
@ 2020-10-14 8:46 ` Wang, Xiao W
2020-10-16 12:16 ` Ferruh Yigit
2020-10-18 12:09 ` Xu, Rosen
4 siblings, 0 replies; 31+ messages in thread
From: Wang, Xiao W @ 2020-10-14 8:46 UTC (permalink / raw)
To: Yigit, Ferruh, John W. Linville, Loftus, Ciara, Zhang, Qi Z,
Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh,
Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath,
Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur,
Chas Williams, Min Hu (Connor),
Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Guo, Jia, Wang,
Haiyue, Marcin Wojtas, Michal Krawczyk, Guy Tzalik,
Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley,
Hyong Youb Kim, Gaetan Rivet, Ziyang Xuan, Xiaoyun Wang,
Guoyang Zhou, Wei Hu (Xavier),
Yisen Zhuang, Xing, Beilei, Wu, Jingjing, Yang, Qiming,
Alfredo Cardigliano, Xu, Rosen, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad,
Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi,
Stephen Hemminger, K. Y. Srinivasan, Haiyang Zhang, Long Li,
Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra,
Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal,
Richardson, Bruce, Andrew Rybchenko, Wiles, Keith, Maciej Czekaj,
Maxime Coquelin, Xia, Chenbo, Wang, Zhihong, Yong Wang,
Thomas Monjalon
Cc: dev
Hi,
BRs,
Xiao
> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Wednesday, October 14, 2020 10:27 AM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; John W. Linville
> <linville@tuxdriver.com>; Loftus, Ciara <ciara.loftus@intel.com>; Zhang, Qi
> Z <qi.z.zhang@intel.com>; Shepard Siegel
> <shepard.siegel@atomicrules.com>; Ed Czeck <ed.czeck@atomicrules.com>;
> John Miller <john.miller@atomicrules.com>; Igor Russkikh
> <igor.russkikh@aquantia.com>; Pavel Belous <pavel.belous@aquantia.com>;
> Steven Webster <steven.webster@windriver.com>; Matt Peters
> <matt.peters@windriver.com>; Somalapuram Amaranath
> <asomalap@amd.com>; Rasesh Mody <rmody@marvell.com>; Shahed
> Shaikh <shshaikh@marvell.com>; Ajit Khaparde
> <ajit.khaparde@broadcom.com>; Somnath Kotur
> <somnath.kotur@broadcom.com>; Chas Williams <chas3@att.com>; Min
> Hu (Connor) <humin29@huawei.com>; Rahul Lakkireddy
> <rahul.lakkireddy@chelsio.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Sachin Saxena <sachin.saxena@oss.nxp.com>;
> Guo, Jia <jia.guo@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>;
> Marcin Wojtas <mw@semihalf.com>; Michal Krawczyk <mk@semihalf.com>;
> Guy Tzalik <gtzalik@amazon.com>; Evgeny Schemeilin
> <evgenys@amazon.com>; Igor Chauskin <igorch@amazon.com>;
> Gagandeep Singh <g.singh@nxp.com>; John Daley <johndale@cisco.com>;
> Hyong Youb Kim <hyonkim@cisco.com>; Gaetan Rivet <grive@u256.net>;
> Wang, Xiao W <xiao.w.wang@intel.com>; Ziyang Xuan
> <xuanziyang2@huawei.com>; Xiaoyun Wang
> <cloud.wangxiaoyun@huawei.com>; Guoyang Zhou
> <zhouguoyang@huawei.com>; Wei Hu (Xavier)
> <xavier.huwei@huawei.com>; Yisen Zhuang <yisen.zhuang@huawei.com>;
> Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Yang, Qiming <qiming.yang@intel.com>; Alfredo Cardigliano
> <cardigliano@ntop.org>; Xu, Rosen <rosen.xu@intel.com>; Shijith Thotton
> <sthotton@marvell.com>; Srisivasubramanian Srinivasan
> <srinivasan@marvell.com>; Jakub Grajciar <jgrajcia@cisco.com>; Matan
> Azrad <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>;
> Viacheslav Ovsiienko <viacheslavo@nvidia.com>; Zyta Szpak
> <zr@semihalf.com>; Liron Himi <lironh@marvell.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; K. Y. Srinivasan <kys@microsoft.com>;
> Haiyang Zhang <haiyangz@microsoft.com>; Long Li <longli@microsoft.com>;
> Martin Spinler <spinler@cesnet.cz>; Heinrich Kuhn
> <heinrich.kuhn@netronome.com>; Tetsuya Mukawa
> <mtetsuyah@gmail.com>; Harman Kalra <hkalra@marvell.com>; Jerin Jacob
> <jerinj@marvell.com>; Nithin Dabilpuram <ndabilpuram@marvell.com>;
> Kiran Kumar K <kirankumark@marvell.com>; Akhil Goyal
> <akhil.goyal@nxp.com>; Richardson, Bruce <bruce.richardson@intel.com>;
> Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Wiles, Keith
> <keith.wiles@intel.com>; Maciej Czekaj <mczekaj@marvell.com>; Maxime
> Coquelin <maxime.coquelin@redhat.com>; Xia, Chenbo
> <chenbo.xia@intel.com>; Wang, Zhihong <zhihong.wang@intel.com>; Yong
> Wang <yongwang@vmware.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Cc: dev@dpdk.org
> Subject: [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue
> xstats
>
> Queue stats are stored in 'struct rte_eth_stats' as array and array size
> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>
> As a result of technical board discussion, decided to remove the queue
> statistics from 'struct rte_eth_stats' in the long term.
>
> Instead PMDs should represent the queue statistics via xstats, this
> gives more flexibility on the number of the queues supported.
>
> Currently queue stats in the xstats are filled by ethdev layer, using
> some basic stats, when queue stats removed from basic stats the
> responsibility to fill the relevant xstats will be pushed to the PMDs.
>
> During the switch period, temporary
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
> device flag is created. Initially all PMDs using xstats set this flag.
> The PMDs implemented queue stats in the xstats should clear the flag.
>
> When all PMDs switch to the xstats for the queue stats, queue stats
> related fields from 'struct rte_eth_stats' will be removed, as well as
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
> removed.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> drivers/net/af_packet/rte_eth_af_packet.c | 1 +
> drivers/net/af_xdp/rte_eth_af_xdp.c | 1 +
> drivers/net/ark/ark_ethdev.c | 2 ++
> drivers/net/atlantic/atl_ethdev.c | 2 ++
> drivers/net/avp/avp_ethdev.c | 1 +
> drivers/net/axgbe/axgbe_ethdev.c | 2 ++
> drivers/net/bnx2x/bnx2x_ethdev.c | 1 +
> drivers/net/bnxt/bnxt_ethdev.c | 1 +
> drivers/net/bnxt/bnxt_reps.c | 3 ++-
> drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
> drivers/net/cxgbe/cxgbe_ethdev.c | 2 ++
> drivers/net/dpaa/dpaa_ethdev.c | 2 ++
> drivers/net/dpaa2/dpaa2_ethdev.c | 2 ++
> drivers/net/e1000/em_ethdev.c | 1 +
> drivers/net/e1000/igb_ethdev.c | 2 ++
> drivers/net/ena/ena_ethdev.c | 2 ++
> drivers/net/enetc/enetc_ethdev.c | 2 ++
> drivers/net/enic/enic_ethdev.c | 1 +
> drivers/net/enic/enic_vf_representor.c | 3 ++-
> drivers/net/failsafe/failsafe.c | 3 ++-
> drivers/net/fm10k/fm10k_ethdev.c | 1 +
For fm10k,
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
> drivers/net/hinic/hinic_pmd_ethdev.c | 2 ++
> drivers/net/hns3/hns3_ethdev.c | 2 ++
> drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats Ferruh Yigit
2020-10-14 8:43 ` Kinsella, Ray
@ 2020-10-14 9:35 ` Igor Ryzhov
2020-10-14 9:45 ` Thomas Monjalon
1 sibling, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2020-10-14 9:35 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Bruce Richardson, Ray Kinsella, Neil Horman, Thomas Monjalon,
Andrew Rybchenko, dev
Hi Ferruh,
As rte_eth_stats is going to be changed, is it possible to add new counters
there?
For example, in/out multicast/broadcast packets.
Igor
On Wed, Oct 14, 2020 at 5:27 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> Queue stats will be removed from basic stats to xstats.
>
> It will be PMDs responsibility to fill queue stats based on number of
> queues they have.
>
> Until all PMDs implement the xstats, a temporary
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
> to the xstats should clear this flag to bypass the ethdev layer autofill
> for queue stats.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> config/rte_config.h | 2 +-
> doc/guides/rel_notes/deprecation.rst | 7 +++++++
> lib/librte_ethdev/rte_ethdev.h | 3 +++
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/config/rte_config.h b/config/rte_config.h
> index 03d90d78bc..9ef3b75940 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -55,7 +55,7 @@
>
> /* ether defines */
> #define RTE_MAX_QUEUES_PER_PORT 1024
> -#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16
> +#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 /* max 256 */
> #define RTE_ETHDEV_RXTX_CALLBACKS 1
>
> /* cryptodev defines */
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 584e720879..9143cfc529 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -164,6 +164,13 @@ Deprecation Notices
> following the IPv6 header, as proposed in RFC
> https://mails.dpdk.org/archives/dev/2020-August/177257.html.
>
> +* ethdev: Queue specific stats fields will be removed from ``struct
> rte_eth_stats``.
> + Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``,
> ``q_obytes``,
> + ``q_errors``.
> + Instead queue stats will be received via xstats API. Current method
> support
> + will be limited to maximum 256 queues.
> + Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be removed.
> +
> * security: The API ``rte_security_session_create`` takes only single
> mempool
> for session and session private data. So the application need to create
> mempool for twice the number of sessions needed and will also lead to
> diff --git a/lib/librte_ethdev/rte_ethdev.h
> b/lib/librte_ethdev/rte_ethdev.h
> index bb7a2b4289..a2e811ca48 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -253,6 +253,7 @@ struct rte_eth_stats {
> uint64_t ierrors; /**< Total number of erroneous received
> packets. */
> uint64_t oerrors; /**< Total number of failed transmitted
> packets. */
> uint64_t rx_nombuf; /**< Total number of RX mbuf allocation
> failures. */
> + /* Queue stats are limited to max 256 queues */
> uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
> /**< Total number of queue RX packets. */
> uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
> @@ -2704,6 +2705,7 @@ int rte_eth_xstats_reset(uint16_t port_id);
> * The per-queue packet statistics functionality number that the
> transmit
> * queue is to be assigned.
> * The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
> + * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
> * @return
> * Zero if successful. Non-zero otherwise.
> */
> @@ -2724,6 +2726,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t
> port_id,
> * The per-queue packet statistics functionality number that the receive
> * queue is to be assigned.
> * The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
> + * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
> * @return
> * Zero if successful. Non-zero otherwise.
> */
> --
> 2.26.2
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-14 9:35 ` Igor Ryzhov
@ 2020-10-14 9:45 ` Thomas Monjalon
2020-10-15 7:55 ` Igor Ryzhov
0 siblings, 1 reply; 31+ messages in thread
From: Thomas Monjalon @ 2020-10-14 9:45 UTC (permalink / raw)
To: Igor Ryzhov
Cc: Ferruh Yigit, Bruce Richardson, Ray Kinsella, Andrew Rybchenko, dev
14/10/2020 11:35, Igor Ryzhov:
> Hi Ferruh,
>
> As rte_eth_stats is going to be changed, is it possible to add new counters
> there?
> For example, in/out multicast/broadcast packets.
Good question.
In order to avoid redundancy, I prefer focusing on xstats
and plan deprecation of rte_eth_stats.
The basic stats you are asking for should have standardized names
and reserved ids in xstats API.
Please see these slides:
https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-14 9:45 ` Thomas Monjalon
@ 2020-10-15 7:55 ` Igor Ryzhov
2020-10-15 8:03 ` Thomas Monjalon
0 siblings, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2020-10-15 7:55 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Ferruh Yigit, Bruce Richardson, Ray Kinsella, Andrew Rybchenko, dev
Hi Thomas,
Thanks for the slides, I checked the latest code and multicast/broadcast
counters mostly look standardized. But mlx5 adds the "port" word to all
its xstats names. I suppose you may be the right person to ask - is there
any specific reason for this?
On Wed, Oct 14, 2020 at 12:45 PM Thomas Monjalon <thomas@monjalon.net>
wrote:
> 14/10/2020 11:35, Igor Ryzhov:
> > Hi Ferruh,
> >
> > As rte_eth_stats is going to be changed, is it possible to add new
> counters
> > there?
> > For example, in/out multicast/broadcast packets.
>
> Good question.
> In order to avoid redundancy, I prefer focusing on xstats
> and plan deprecation of rte_eth_stats.
>
> The basic stats you are asking for should have standardized names
> and reserved ids in xstats API.
> Please see these slides:
> https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
>
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-15 7:55 ` Igor Ryzhov
@ 2020-10-15 8:03 ` Thomas Monjalon
2020-10-15 17:39 ` Igor Ryzhov
0 siblings, 1 reply; 31+ messages in thread
From: Thomas Monjalon @ 2020-10-15 8:03 UTC (permalink / raw)
To: Igor Ryzhov
Cc: Ferruh Yigit, Bruce Richardson, Ray Kinsella, Andrew Rybchenko, dev
15/10/2020 09:55, Igor Ryzhov:
> Hi Thomas,
>
> Thanks for the slides, I checked the latest code and multicast/broadcast
> counters mostly look standardized. But mlx5 adds the "port" word to all
> its xstats names. I suppose you may be the right person to ask - is there
> any specific reason for this?
No specific reason, I consider it as a bug.
Please could you open a bugzilla ticket?
> On Wed, Oct 14, 2020 at 12:45 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
>
> > 14/10/2020 11:35, Igor Ryzhov:
> > > Hi Ferruh,
> > >
> > > As rte_eth_stats is going to be changed, is it possible to add new
> > counters
> > > there?
> > > For example, in/out multicast/broadcast packets.
> >
> > Good question.
> > In order to avoid redundancy, I prefer focusing on xstats
> > and plan deprecation of rte_eth_stats.
> >
> > The basic stats you are asking for should have standardized names
> > and reserved ids in xstats API.
> > Please see these slides:
> > https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-15 8:03 ` Thomas Monjalon
@ 2020-10-15 17:39 ` Igor Ryzhov
2020-10-15 17:45 ` Thomas Monjalon
0 siblings, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2020-10-15 17:39 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Ferruh Yigit, Bruce Richardson, Ray Kinsella, Andrew Rybchenko, dev
Done.
https://bugs.dpdk.org/show_bug.cgi?id=558
On Thu, Oct 15, 2020 at 11:03 AM Thomas Monjalon <thomas@monjalon.net>
wrote:
> 15/10/2020 09:55, Igor Ryzhov:
> > Hi Thomas,
> >
> > Thanks for the slides, I checked the latest code and multicast/broadcast
> > counters mostly look standardized. But mlx5 adds the "port" word to all
> > its xstats names. I suppose you may be the right person to ask - is there
> > any specific reason for this?
>
> No specific reason, I consider it as a bug.
> Please could you open a bugzilla ticket?
>
>
> > On Wed, Oct 14, 2020 at 12:45 PM Thomas Monjalon <thomas@monjalon.net>
> > wrote:
> >
> > > 14/10/2020 11:35, Igor Ryzhov:
> > > > Hi Ferruh,
> > > >
> > > > As rte_eth_stats is going to be changed, is it possible to add new
> > > counters
> > > > there?
> > > > For example, in/out multicast/broadcast packets.
> > >
> > > Good question.
> > > In order to avoid redundancy, I prefer focusing on xstats
> > > and plan deprecation of rte_eth_stats.
> > >
> > > The basic stats you are asking for should have standardized names
> > > and reserved ids in xstats API.
> > > Please see these slides:
> > >
> https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
>
>
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-15 17:39 ` Igor Ryzhov
@ 2020-10-15 17:45 ` Thomas Monjalon
0 siblings, 0 replies; 31+ messages in thread
From: Thomas Monjalon @ 2020-10-15 17:45 UTC (permalink / raw)
To: Igor Ryzhov
Cc: Ferruh Yigit, Bruce Richardson, Ray Kinsella, Andrew Rybchenko,
dev, asafp
15/10/2020 19:39, Igor Ryzhov:
> Done.
>
> https://bugs.dpdk.org/show_bug.cgi?id=558
Thanks
> On Thu, Oct 15, 2020 at 11:03 AM Thomas Monjalon <thomas@monjalon.net>
> wrote:
>
> > 15/10/2020 09:55, Igor Ryzhov:
> > > Hi Thomas,
> > >
> > > Thanks for the slides, I checked the latest code and multicast/broadcast
> > > counters mostly look standardized. But mlx5 adds the "port" word to all
> > > its xstats names. I suppose you may be the right person to ask - is there
> > > any specific reason for this?
> >
> > No specific reason, I consider it as a bug.
> > Please could you open a bugzilla ticket?
> >
> >
> > > On Wed, Oct 14, 2020 at 12:45 PM Thomas Monjalon <thomas@monjalon.net>
> > > wrote:
> > >
> > > > 14/10/2020 11:35, Igor Ryzhov:
> > > > > Hi Ferruh,
> > > > >
> > > > > As rte_eth_stats is going to be changed, is it possible to add new
> > > > counters
> > > > > there?
> > > > > For example, in/out multicast/broadcast packets.
> > > >
> > > > Good question.
> > > > In order to avoid redundancy, I prefer focusing on xstats
> > > > and plan deprecation of rte_eth_stats.
> > > >
> > > > The basic stats you are asking for should have standardized names
> > > > and reserved ids in xstats API.
> > > > Please see these slides:
> > > >
> > https://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf
> >
> >
> >
> >
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
` (2 preceding siblings ...)
2020-10-14 8:46 ` Wang, Xiao W
@ 2020-10-16 12:16 ` Ferruh Yigit
2020-10-16 14:32 ` Thomas Monjalon
2020-10-19 3:03 ` Min Hu (Connor)
2020-10-18 12:09 ` Xu, Rosen
4 siblings, 2 replies; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-16 12:16 UTC (permalink / raw)
To: Thomas Monjalon, Andrew Rybchenko; +Cc: dev, Min Hu (Connor), Wei Hu (Xavier
On 10/14/2020 3:26 AM, Ferruh Yigit wrote:
> Queue stats are stored in 'struct rte_eth_stats' as array and array size
> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>
> As a result of technical board discussion, decided to remove the queue
> statistics from 'struct rte_eth_stats' in the long term.
>
> Instead PMDs should represent the queue statistics via xstats, this
> gives more flexibility on the number of the queues supported.
>
> Currently queue stats in the xstats are filled by ethdev layer, using
> some basic stats, when queue stats removed from basic stats the
> responsibility to fill the relevant xstats will be pushed to the PMDs.
>
> During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
> device flag is created. Initially all PMDs using xstats set this flag.
> The PMDs implemented queue stats in the xstats should clear the flag.
>
> When all PMDs switch to the xstats for the queue stats, queue stats
> related fields from 'struct rte_eth_stats' will be removed, as well as
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
> removed.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Hi Thomas, Andrew,
What do you think having the patch for this release?
Connor, Xavier,
Are you OK to superseded your existing patch [1] with this approach?
[1] https://patches.dpdk.org/patch/78886/
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-16 12:16 ` Ferruh Yigit
@ 2020-10-16 14:32 ` Thomas Monjalon
2020-10-16 21:38 ` Ferruh Yigit
2020-10-19 3:03 ` Min Hu (Connor)
1 sibling, 1 reply; 31+ messages in thread
From: Thomas Monjalon @ 2020-10-16 14:32 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Andrew Rybchenko, dev, dev, Min Hu (Connor), Wei Hu (Xavier
16/10/2020 14:16, Ferruh Yigit:
> On 10/14/2020 3:26 AM, Ferruh Yigit wrote:
> > Queue stats are stored in 'struct rte_eth_stats' as array and array size
> > is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
> >
> > As a result of technical board discussion, decided to remove the queue
> > statistics from 'struct rte_eth_stats' in the long term.
> >
> > Instead PMDs should represent the queue statistics via xstats, this
> > gives more flexibility on the number of the queues supported.
> >
> > Currently queue stats in the xstats are filled by ethdev layer, using
> > some basic stats, when queue stats removed from basic stats the
> > responsibility to fill the relevant xstats will be pushed to the PMDs.
> >
> > During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
> > device flag is created. Initially all PMDs using xstats set this flag.
> > The PMDs implemented queue stats in the xstats should clear the flag.
> >
> > When all PMDs switch to the xstats for the queue stats, queue stats
> > related fields from 'struct rte_eth_stats' will be removed, as well as
> > 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
> > Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
> > removed.
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Hi Thomas, Andrew,
>
> What do you think having the patch for this release?
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-14 8:43 ` Kinsella, Ray
@ 2020-10-16 14:34 ` Thomas Monjalon
2020-10-16 14:36 ` Bruce Richardson
` (2 more replies)
0 siblings, 3 replies; 31+ messages in thread
From: Thomas Monjalon @ 2020-10-16 14:34 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Bruce Richardson, Neil Horman, Andrew Rybchenko, dev, Kinsella,
Ray, jerinj, olivier.matz, Stephen Hemminger, Morten Brørup,
dmitry.kozliuk, ajit.khaparde
14/10/2020 10:43, Kinsella, Ray:
>
> On 14/10/2020 03:26, Ferruh Yigit wrote:
> > Queue stats will be removed from basic stats to xstats.
> >
> > It will be PMDs responsibility to fill queue stats based on number of
> > queues they have.
> >
> > Until all PMDs implement the xstats, a temporary
> > 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
> > to the xstats should clear this flag to bypass the ethdev layer autofill
> > for queue stats.
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > ---
> > config/rte_config.h | 2 +-
> > doc/guides/rel_notes/deprecation.rst | 7 +++++++
> > lib/librte_ethdev/rte_ethdev.h | 3 +++
> > 3 files changed, 11 insertions(+), 1 deletion(-)
> >
> Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
We need more acks for the deprecation notice to be accepted.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-16 14:34 ` Thomas Monjalon
@ 2020-10-16 14:36 ` Bruce Richardson
2020-10-16 14:37 ` Jerin Jacob
2020-10-16 15:07 ` Stephen Hemminger
2 siblings, 0 replies; 31+ messages in thread
From: Bruce Richardson @ 2020-10-16 14:36 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Ferruh Yigit, Neil Horman, Andrew Rybchenko, dev, Kinsella, Ray,
jerinj, olivier.matz, Stephen Hemminger, Morten Brørup,
dmitry.kozliuk, ajit.khaparde
On Fri, Oct 16, 2020 at 04:34:46PM +0200, Thomas Monjalon wrote:
> 14/10/2020 10:43, Kinsella, Ray:
> >
> > On 14/10/2020 03:26, Ferruh Yigit wrote:
> > > Queue stats will be removed from basic stats to xstats.
> > >
> > > It will be PMDs responsibility to fill queue stats based on number of
> > > queues they have.
> > >
> > > Until all PMDs implement the xstats, a temporary
> > > 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
> > > to the xstats should clear this flag to bypass the ethdev layer autofill
> > > for queue stats.
> > >
> > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > ---
> > > config/rte_config.h | 2 +-
> > > doc/guides/rel_notes/deprecation.rst | 7 +++++++
> > > lib/librte_ethdev/rte_ethdev.h | 3 +++
> > > 3 files changed, 11 insertions(+), 1 deletion(-)
> > >
> > Acked-by: Ray Kinsella <mdr@ashroe.eu>
>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-16 14:34 ` Thomas Monjalon
2020-10-16 14:36 ` Bruce Richardson
@ 2020-10-16 14:37 ` Jerin Jacob
2020-10-16 15:07 ` Stephen Hemminger
2 siblings, 0 replies; 31+ messages in thread
From: Jerin Jacob @ 2020-10-16 14:37 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Ferruh Yigit, Bruce Richardson, Neil Horman, Andrew Rybchenko,
dpdk-dev, Kinsella, Ray, Jerin Jacob, Olivier Matz,
Stephen Hemminger, Morten Brørup, Dmitry Kozlyuk,
Ajit Khaparde
On Fri, Oct 16, 2020 at 8:05 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 14/10/2020 10:43, Kinsella, Ray:
> >
> > On 14/10/2020 03:26, Ferruh Yigit wrote:
> > > Queue stats will be removed from basic stats to xstats.
> > >
> > > It will be PMDs responsibility to fill queue stats based on number of
> > > queues they have.
> > >
> > > Until all PMDs implement the xstats, a temporary
> > > 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
> > > to the xstats should clear this flag to bypass the ethdev layer autofill
> > > for queue stats.
> > >
> > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > ---
> > > config/rte_config.h | 2 +-
> > > doc/guides/rel_notes/deprecation.rst | 7 +++++++
> > > lib/librte_ethdev/rte_ethdev.h | 3 +++
> > > 3 files changed, 11 insertions(+), 1 deletion(-)
> > >
> > Acked-by: Ray Kinsella <mdr@ashroe.eu>
>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
>
> We need more acks for the deprecation notice to be accepted.
Acked-by: Jerin Jacob <jerinj@marvell.com>
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-16 14:34 ` Thomas Monjalon
2020-10-16 14:36 ` Bruce Richardson
2020-10-16 14:37 ` Jerin Jacob
@ 2020-10-16 15:07 ` Stephen Hemminger
2020-10-16 17:48 ` Ajit Khaparde
2 siblings, 1 reply; 31+ messages in thread
From: Stephen Hemminger @ 2020-10-16 15:07 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Ferruh Yigit, Bruce Richardson, Neil Horman, Andrew Rybchenko,
dev, Kinsella, Ray, jerinj, olivier.matz, Morten Brørup,
dmitry.kozliuk, ajit.khaparde
On Fri, 16 Oct 2020 16:34:46 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> 14/10/2020 10:43, Kinsella, Ray:
> >
> > On 14/10/2020 03:26, Ferruh Yigit wrote:
> > > Queue stats will be removed from basic stats to xstats.
> > >
> > > It will be PMDs responsibility to fill queue stats based on number of
> > > queues they have.
> > >
> > > Until all PMDs implement the xstats, a temporary
> > > 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
> > > to the xstats should clear this flag to bypass the ethdev layer autofill
> > > for queue stats.
> > >
> > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > ---
> > > config/rte_config.h | 2 +-
> > > doc/guides/rel_notes/deprecation.rst | 7 +++++++
> > > lib/librte_ethdev/rte_ethdev.h | 3 +++
> > > 3 files changed, 11 insertions(+), 1 deletion(-)
> > >
> > Acked-by: Ray Kinsella <mdr@ashroe.eu>
>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats
2020-10-16 15:07 ` Stephen Hemminger
@ 2020-10-16 17:48 ` Ajit Khaparde
0 siblings, 0 replies; 31+ messages in thread
From: Ajit Khaparde @ 2020-10-16 17:48 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Thomas Monjalon, Ferruh Yigit, Bruce Richardson, Neil Horman,
Andrew Rybchenko, dpdk-dev, Kinsella, Ray,
Jerin Jacob Kollanukkaran, Olivier Matz, Morten Brørup,
dmitry.kozliuk
On Fri, Oct 16, 2020 at 8:07 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Fri, 16 Oct 2020 16:34:46 +0200
> Thomas Monjalon <thomas@monjalon.net> wrote:
>
> > 14/10/2020 10:43, Kinsella, Ray:
> > >
> > > On 14/10/2020 03:26, Ferruh Yigit wrote:
> > > > Queue stats will be removed from basic stats to xstats.
> > > >
> > > > It will be PMDs responsibility to fill queue stats based on number of
> > > > queues they have.
> > > >
> > > > Until all PMDs implement the xstats, a temporary
> > > > 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag created. PMDs switched
> > > > to the xstats should clear this flag to bypass the ethdev layer autofill
> > > > for queue stats.
> > > >
> > > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > > ---
> > > > config/rte_config.h | 2 +-
> > > > doc/guides/rel_notes/deprecation.rst | 7 +++++++
> > > > lib/librte_ethdev/rte_ethdev.h | 3 +++
> > > > 3 files changed, 11 insertions(+), 1 deletion(-)
> > > >
> > > Acked-by: Ray Kinsella <mdr@ashroe.eu>
> >
> > Acked-by: Thomas Monjalon <thomas@monjalon.net>
>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-16 14:32 ` Thomas Monjalon
@ 2020-10-16 21:38 ` Ferruh Yigit
0 siblings, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2020-10-16 21:38 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Andrew Rybchenko, dev, Min Hu (Connor), Wei Hu (Xavier
On 10/16/2020 3:32 PM, Thomas Monjalon wrote:
> 16/10/2020 14:16, Ferruh Yigit:
>> On 10/14/2020 3:26 AM, Ferruh Yigit wrote:
>>> Queue stats are stored in 'struct rte_eth_stats' as array and array size
>>> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>>>
>>> As a result of technical board discussion, decided to remove the queue
>>> statistics from 'struct rte_eth_stats' in the long term.
>>>
>>> Instead PMDs should represent the queue statistics via xstats, this
>>> gives more flexibility on the number of the queues supported.
>>>
>>> Currently queue stats in the xstats are filled by ethdev layer, using
>>> some basic stats, when queue stats removed from basic stats the
>>> responsibility to fill the relevant xstats will be pushed to the PMDs.
>>>
>>> During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
>>> device flag is created. Initially all PMDs using xstats set this flag.
>>> The PMDs implemented queue stats in the xstats should clear the flag.
>>>
>>> When all PMDs switch to the xstats for the queue stats, queue stats
>>> related fields from 'struct rte_eth_stats' will be removed, as well as
>>> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
>>> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
>>> removed.
>>>
>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>
>> Hi Thomas, Andrew,
>>
>> What do you think having the patch for this release?
>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
>
Series applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
` (3 preceding siblings ...)
2020-10-16 12:16 ` Ferruh Yigit
@ 2020-10-18 12:09 ` Xu, Rosen
4 siblings, 0 replies; 31+ messages in thread
From: Xu, Rosen @ 2020-10-18 12:09 UTC (permalink / raw)
To: Yigit, Ferruh, John W. Linville, Loftus, Ciara, Zhang, Qi Z,
Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh,
Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath,
Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur,
Chas Williams, Min Hu (Connor),
Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Guo, Jia, Wang,
Haiyue, Marcin Wojtas, Michal Krawczyk, Guy Tzalik,
Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley,
Hyong Youb Kim, Gaetan Rivet, Wang, Xiao W, Ziyang Xuan,
Xiaoyun Wang, Guoyang Zhou, Wei Hu (Xavier),
Yisen Zhuang, Xing, Beilei, Wu, Jingjing, Yang, Qiming,
Alfredo Cardigliano, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad,
Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi,
Stephen Hemminger, K. Y. Srinivasan, Haiyang Zhang, Long Li,
Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra,
Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal,
Richardson, Bruce, Andrew Rybchenko, Wiles, Keith, Maciej Czekaj,
Maxime Coquelin, Xia, Chenbo, Wang, Zhihong, Yong Wang,
Thomas Monjalon
Cc: dev
> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Wednesday, October 14, 2020 10:27
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; John W. Linville
> <linville@tuxdriver.com>; Loftus, Ciara <ciara.loftus@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Shepard Siegel <shepard.siegel@atomicrules.com>;
> Ed Czeck <ed.czeck@atomicrules.com>; John Miller
> <john.miller@atomicrules.com>; Igor Russkikh
> <igor.russkikh@aquantia.com>; Pavel Belous <pavel.belous@aquantia.com>;
> Steven Webster <steven.webster@windriver.com>; Matt Peters
> <matt.peters@windriver.com>; Somalapuram Amaranath
> <asomalap@amd.com>; Rasesh Mody <rmody@marvell.com>; Shahed
> Shaikh <shshaikh@marvell.com>; Ajit Khaparde
> <ajit.khaparde@broadcom.com>; Somnath Kotur
> <somnath.kotur@broadcom.com>; Chas Williams <chas3@att.com>; Min Hu
> (Connor) <humin29@huawei.com>; Rahul Lakkireddy
> <rahul.lakkireddy@chelsio.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Sachin Saxena <sachin.saxena@oss.nxp.com>;
> Guo, Jia <jia.guo@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>;
> Marcin Wojtas <mw@semihalf.com>; Michal Krawczyk <mk@semihalf.com>;
> Guy Tzalik <gtzalik@amazon.com>; Evgeny Schemeilin
> <evgenys@amazon.com>; Igor Chauskin <igorch@amazon.com>;
> Gagandeep Singh <g.singh@nxp.com>; John Daley <johndale@cisco.com>;
> Hyong Youb Kim <hyonkim@cisco.com>; Gaetan Rivet <grive@u256.net>;
> Wang, Xiao W <xiao.w.wang@intel.com>; Ziyang Xuan
> <xuanziyang2@huawei.com>; Xiaoyun Wang
> <cloud.wangxiaoyun@huawei.com>; Guoyang Zhou
> <zhouguoyang@huawei.com>; Wei Hu (Xavier)
> <xavier.huwei@huawei.com>; Yisen Zhuang <yisen.zhuang@huawei.com>;
> Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Yang, Qiming <qiming.yang@intel.com>; Alfredo Cardigliano
> <cardigliano@ntop.org>; Xu, Rosen <rosen.xu@intel.com>; Shijith Thotton
> <sthotton@marvell.com>; Srisivasubramanian Srinivasan
> <srinivasan@marvell.com>; Jakub Grajciar <jgrajcia@cisco.com>; Matan
> Azrad <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>;
> Viacheslav Ovsiienko <viacheslavo@nvidia.com>; Zyta Szpak
> <zr@semihalf.com>; Liron Himi <lironh@marvell.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; K. Y. Srinivasan <kys@microsoft.com>;
> Haiyang Zhang <haiyangz@microsoft.com>; Long Li <longli@microsoft.com>;
> Martin Spinler <spinler@cesnet.cz>; Heinrich Kuhn
> <heinrich.kuhn@netronome.com>; Tetsuya Mukawa
> <mtetsuyah@gmail.com>; Harman Kalra <hkalra@marvell.com>; Jerin Jacob
> <jerinj@marvell.com>; Nithin Dabilpuram <ndabilpuram@marvell.com>;
> Kiran Kumar K <kirankumark@marvell.com>; Akhil Goyal
> <akhil.goyal@nxp.com>; Richardson, Bruce <bruce.richardson@intel.com>;
> Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Wiles, Keith
> <keith.wiles@intel.com>; Maciej Czekaj <mczekaj@marvell.com>; Maxime
> Coquelin <maxime.coquelin@redhat.com>; Xia, Chenbo
> <chenbo.xia@intel.com>; Wang, Zhihong <zhihong.wang@intel.com>; Yong
> Wang <yongwang@vmware.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Cc: dev@dpdk.org
> Subject: [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue
> xstats
>
> Queue stats are stored in 'struct rte_eth_stats' as array and array size is
> defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>
> As a result of technical board discussion, decided to remove the queue
> statistics from 'struct rte_eth_stats' in the long term.
>
> Instead PMDs should represent the queue statistics via xstats, this gives
> more flexibility on the number of the queues supported.
>
> Currently queue stats in the xstats are filled by ethdev layer, using some
> basic stats, when queue stats removed from basic stats the responsibility to
> fill the relevant xstats will be pushed to the PMDs.
>
> During the switch period, temporary
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
> device flag is created. Initially all PMDs using xstats set this flag.
> The PMDs implemented queue stats in the xstats should clear the flag.
>
> When all PMDs switch to the xstats for the queue stats, queue stats related
> fields from 'struct rte_eth_stats' will be removed, as well as
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
> removed.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> drivers/net/af_packet/rte_eth_af_packet.c | 1 +
> drivers/net/af_xdp/rte_eth_af_xdp.c | 1 +
> drivers/net/ark/ark_ethdev.c | 2 ++
> drivers/net/atlantic/atl_ethdev.c | 2 ++
> drivers/net/avp/avp_ethdev.c | 1 +
> drivers/net/axgbe/axgbe_ethdev.c | 2 ++
> drivers/net/bnx2x/bnx2x_ethdev.c | 1 +
> drivers/net/bnxt/bnxt_ethdev.c | 1 +
> drivers/net/bnxt/bnxt_reps.c | 3 ++-
> drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
> drivers/net/cxgbe/cxgbe_ethdev.c | 2 ++
> drivers/net/dpaa/dpaa_ethdev.c | 2 ++
> drivers/net/dpaa2/dpaa2_ethdev.c | 2 ++
> drivers/net/e1000/em_ethdev.c | 1 +
> drivers/net/e1000/igb_ethdev.c | 2 ++
> drivers/net/ena/ena_ethdev.c | 2 ++
> drivers/net/enetc/enetc_ethdev.c | 2 ++
> drivers/net/enic/enic_ethdev.c | 1 +
> drivers/net/enic/enic_vf_representor.c | 3 ++-
> drivers/net/failsafe/failsafe.c | 3 ++-
> drivers/net/fm10k/fm10k_ethdev.c | 1 +
> drivers/net/hinic/hinic_pmd_ethdev.c | 2 ++
> drivers/net/hns3/hns3_ethdev.c | 2 ++
> drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
> drivers/net/i40e/i40e_ethdev.c | 1 +
> drivers/net/i40e/i40e_ethdev_vf.c | 1 +
> drivers/net/i40e/i40e_vf_representor.c | 3 ++-
> drivers/net/iavf/iavf_ethdev.c | 1 +
> drivers/net/ice/ice_dcf_ethdev.c | 2 ++
> drivers/net/ice/ice_ethdev.c | 2 ++
> drivers/net/igc/igc_ethdev.c | 1 +
> drivers/net/ionic/ionic_ethdev.c | 1 +
> drivers/net/ipn3ke/ipn3ke_representor.c | 3 ++-
> drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
> drivers/net/kni/rte_eth_kni.c | 1 +
> drivers/net/liquidio/lio_ethdev.c | 1 +
> drivers/net/memif/rte_eth_memif.c | 1 +
> drivers/net/mlx4/mlx4.c | 1 +
> drivers/net/mlx5/linux/mlx5_os.c | 1 +
> drivers/net/mvneta/mvneta_ethdev.c | 1 +
> drivers/net/mvpp2/mrvl_ethdev.c | 1 +
> drivers/net/netvsc/hn_ethdev.c | 2 ++
> drivers/net/nfb/nfb_ethdev.c | 2 ++
> drivers/net/nfp/nfp_net.c | 2 ++
> drivers/net/null/rte_eth_null.c | 1 +
> drivers/net/octeontx/octeontx_ethdev.c | 1 +
> drivers/net/octeontx2/otx2_ethdev.c | 1 +
> drivers/net/pcap/rte_eth_pcap.c | 1 +
> drivers/net/pfe/pfe_ethdev.c | 2 ++
> drivers/net/qede/qede_ethdev.c | 1 +
> drivers/net/ring/rte_eth_ring.c | 1 +
> drivers/net/sfc/sfc_ethdev.c | 1 +
> drivers/net/szedata2/rte_eth_szedata2.c | 2 ++
> drivers/net/tap/rte_eth_tap.c | 3 ++-
> drivers/net/thunderx/nicvf_ethdev.c | 1 +
> drivers/net/vhost/rte_eth_vhost.c | 3 ++-
> drivers/net/virtio/virtio_ethdev.c | 2 ++
> drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 +
> lib/librte_ethdev/rte_ethdev.c | 18 ++++++++++++++----
> lib/librte_ethdev/rte_ethdev.h | 5 +++++
> 60 files changed, 106 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> b/drivers/net/ipn3ke/ipn3ke_representor.c
> index b9fb4d4e46..a8765b5f4e 100644
> --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> @@ -2964,7 +2964,8 @@ ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void
> *init_params)
> return -ENODEV;
> }
>
> - ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
> + ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
> +
> RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
>
> rte_spinlock_lock(&ipn3ke_link_notify_list_lk);
> TAILQ_INSERT_TAIL(&ipn3ke_rpst_list, rpst, next); diff --git
Acked-by: Rosen Xu<rosen.xu@intel.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats
2020-10-16 12:16 ` Ferruh Yigit
2020-10-16 14:32 ` Thomas Monjalon
@ 2020-10-19 3:03 ` Min Hu (Connor)
1 sibling, 0 replies; 31+ messages in thread
From: Min Hu (Connor) @ 2020-10-19 3:03 UTC (permalink / raw)
To: Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko; +Cc: dev, Wei Hu (Xavier
在 2020/10/16 20:16, Ferruh Yigit 写道:
> On 10/14/2020 3:26 AM, Ferruh Yigit wrote:
>> Queue stats are stored in 'struct rte_eth_stats' as array and array size
>> is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
>>
>> As a result of technical board discussion, decided to remove the queue
>> statistics from 'struct rte_eth_stats' in the long term.
>>
>> Instead PMDs should represent the queue statistics via xstats, this
>> gives more flexibility on the number of the queues supported.
>>
>> Currently queue stats in the xstats are filled by ethdev layer, using
>> some basic stats, when queue stats removed from basic stats the
>> responsibility to fill the relevant xstats will be pushed to the PMDs.
>>
>> During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
>> device flag is created. Initially all PMDs using xstats set this flag.
>> The PMDs implemented queue stats in the xstats should clear the flag.
>>
>> When all PMDs switch to the xstats for the queue stats, queue stats
>> related fields from 'struct rte_eth_stats' will be removed, as well as
>> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
>> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
>> removed.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Hi Thomas, Andrew,
>
> What do you think having the patch for this release?
>
>
> Connor, Xavier,
>
> Are you OK to superseded your existing patch [1] with this approach?
> [1] https://patches.dpdk.org/patch/78886/
Hi, Ferruh,
it is ok, we will continue the work with your solution. Thanks.
> .
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2020-10-19 3:03 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 16:46 [dpdk-dev] [RFC 1/2] ethdev: move queue stats to xstats Ferruh Yigit
2020-10-12 16:46 ` [dpdk-dev] [RFC 2/2] doc: announce queue stats moving " Ferruh Yigit
2020-10-12 16:55 ` [dpdk-dev] [dpdk-techboard] " Stephen Hemminger
2020-10-12 21:53 ` [dpdk-dev] [RFC 1/2] ethdev: move queue stats " Thomas Monjalon
2020-10-13 8:31 ` Andrew Rybchenko
2020-10-13 9:05 ` Thomas Monjalon
2020-10-13 9:16 ` Andrew Rybchenko
2020-10-13 22:41 ` Ferruh Yigit
2020-10-13 15:04 ` Stephen Hemminger
2020-10-13 22:53 ` Ferruh Yigit
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Ferruh Yigit
2020-10-14 2:26 ` [dpdk-dev] [RFC v2 2/2] doc: announce queue stats moving to xstats Ferruh Yigit
2020-10-14 8:43 ` Kinsella, Ray
2020-10-16 14:34 ` Thomas Monjalon
2020-10-16 14:36 ` Bruce Richardson
2020-10-16 14:37 ` Jerin Jacob
2020-10-16 15:07 ` Stephen Hemminger
2020-10-16 17:48 ` Ajit Khaparde
2020-10-14 9:35 ` Igor Ryzhov
2020-10-14 9:45 ` Thomas Monjalon
2020-10-15 7:55 ` Igor Ryzhov
2020-10-15 8:03 ` Thomas Monjalon
2020-10-15 17:39 ` Igor Ryzhov
2020-10-15 17:45 ` Thomas Monjalon
2020-10-14 8:40 ` [dpdk-dev] [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue xstats Wang, Haiyue
2020-10-14 8:46 ` Wang, Xiao W
2020-10-16 12:16 ` Ferruh Yigit
2020-10-16 14:32 ` Thomas Monjalon
2020-10-16 21:38 ` Ferruh Yigit
2020-10-19 3:03 ` Min Hu (Connor)
2020-10-18 12:09 ` Xu, Rosen
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).