git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: add C++ include guard to public header
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_stats.c
diff --git
a/drivers/net/mlx5/mlx5_stats.c
b/drivers/net/mlx5/mlx5_stats.c
index
4dbd831
..
7327759
100644
(file)
--- a/
drivers/net/mlx5/mlx5_stats.c
+++ b/
drivers/net/mlx5/mlx5_stats.c
@@
-16,8
+16,8
@@
#include "mlx5_defs.h"
#include "mlx5.h"
#include "mlx5_defs.h"
#include "mlx5.h"
-#include "mlx5_rxtx.h"
#include "mlx5_rx.h"
#include "mlx5_rx.h"
+#include "mlx5_tx.h"
#include "mlx5_malloc.h"
/**
#include "mlx5_malloc.h"
/**
@@
-107,7
+107,7
@@
mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
memset(&tmp, 0, sizeof(tmp));
/* Add software counters. */
for (i = 0; (i != priv->rxqs_n); ++i) {
memset(&tmp, 0, sizeof(tmp));
/* Add software counters. */
for (i = 0; (i != priv->rxqs_n); ++i) {
- struct mlx5_rxq_data *rxq =
(*priv->rxqs)[i]
;
+ struct mlx5_rxq_data *rxq =
mlx5_rxq_data_get(dev, i)
;
if (rxq == NULL)
continue;
if (rxq == NULL)
continue;
@@
-181,10
+181,11
@@
mlx5_stats_reset(struct rte_eth_dev *dev)
unsigned int i;
for (i = 0; (i != priv->rxqs_n); ++i) {
unsigned int i;
for (i = 0; (i != priv->rxqs_n); ++i) {
- if ((*priv->rxqs)[i] == NULL)
+ struct mlx5_rxq_data *rxq_data = mlx5_rxq_data_get(dev, i);
+
+ if (rxq_data == NULL)
continue;
continue;
- memset(&(*priv->rxqs)[i]->stats, 0,
- sizeof(struct mlx5_rxq_stats));
+ memset(&rxq_data->stats, 0, sizeof(struct mlx5_rxq_stats));
}
for (i = 0; (i != priv->txqs_n); ++i) {
if ((*priv->txqs)[i] == NULL)
}
for (i = 0; (i != priv->txqs_n); ++i) {
if ((*priv->txqs)[i] == NULL)