Michael Baum 0f006468c5 net/mlx5: fix iterator type in Rx queue management
The mlx5_check_vec_rx_support function in the mlx5_rxtx_vec.c file
passes the RX queues array in the loop. Similarly, the mlx5_mprq_enabled
function in the mlx5_rxq.c file passes the RX queues array in the loop.

In both cases, the iterator of the loop is called i and the variable
representing the array size is called rxqs_n.
The i variable is of UINT16_T type while the rxqs_n variable is of
unsigned int type. The size of the rxqs_n variable is much larger than
the number of iterations allowed by the i type, theoretically there may
be a situation where the value of the rxqs_n will be greater than can be
represented by 16 bits and the loop will never end.

Change the type of i to UINT32_T.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-06-30 14:52:30 +02:00
..
2020-02-14 12:42:12 +01:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:30:58 +02:00
2020-05-19 15:49:53 +02:00
2020-05-19 15:49:53 +02:00
2020-04-16 18:30:58 +02:00
2020-04-16 18:30:58 +02:00
2020-06-30 14:52:30 +02:00
2020-05-28 17:57:07 +02:00
2020-05-18 20:35:57 +02:00
2020-04-21 13:57:08 +02:00
2020-06-30 14:52:30 +02:00
2020-04-21 13:57:07 +02:00
2020-05-11 22:27:39 +02:00
2020-04-21 13:57:07 +02:00