Hardware requires the number of rings in indirection table to be a power
of 2. When setting number of channels to a non power of 2 number,
indirection table is using only the closest power of 2 rings.
Report this number in 'ethtool -x' and not the total number of rx rings.
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        int err = 0;
 
        rss_rings = priv->prof->rss_rings ?: priv->rx_ring_num;
+       rss_rings = 1 << ilog2(rss_rings);
 
        while (n--) {
                ring_index[n] = rss_map->qps[n % rss_rings].qpn -