mlx4: fix possible crash when clearing device statistics
A typo causes TX stats indices to be retrieved from RX queues. Fixes: 7fae69eeff13 ("mlx4: new poll mode driver") Reported-by: Nicolas Harnois <nicolas.harnois@6wind.com> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
parent
334505bad2
commit
0f9db82d9f
@ -3958,7 +3958,7 @@ mlx4_stats_reset(struct rte_eth_dev *dev)
|
|||||||
for (i = 0; (i != priv->txqs_n); ++i) {
|
for (i = 0; (i != priv->txqs_n); ++i) {
|
||||||
if ((*priv->txqs)[i] == NULL)
|
if ((*priv->txqs)[i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
idx = (*priv->rxqs)[i]->stats.idx;
|
idx = (*priv->txqs)[i]->stats.idx;
|
||||||
(*priv->txqs)[i]->stats =
|
(*priv->txqs)[i]->stats =
|
||||||
(struct mlx4_txq_stats){ .idx = idx };
|
(struct mlx4_txq_stats){ .idx = idx };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user