mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS
Subsystems (2)
PATCH 4/9 mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS
Required in cases were dev->caps.num_comp_vectors > MAX_RX_RINGS. For current values this would happen on machines that have more then 16 cores.
--- drivers/net/mlx4/en_main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/mlx4/en_main.c +2 -1
@@ -170,7 +170,8 @@ static void *mlx4_en_add(struct mlx4_dev *dev)mlx4_info (mdev,"Using %d tx rings for port:%d\n" , mdev->profile.prof[i].tx_ring_num, i);if (!mdev->profile.prof[i].rx_ring_num) { - mdev->profile.prof[i].rx_ring_num = dev->caps.num_comp_vectors;; + mdev->profile.prof[i].rx_ring_num = +min_t (int, dev->caps.num_comp_vectors,MAX_RX_RINGS );mlx4_info (mdev,"Defaulting to %d rx rings for port:%d\n" , mdev->profile.prof[i].rx_ring_num, i); }else
Signature · 1 line
1.5.4
David Miller
maintainerFrom: Yevgeny Petrilin <[email protected]>
Date: Mon, 22 Dec 2008 12:00:49 +0200
Quoted 5 lines
Required in cases were
dev->caps.num_comp_vectors>MAX_RX_RINGS. For current values this would happen on machines that have more then 16 cores.Signed-off-by Yevgeny Petrilin <[email protected]>
This patch does not apply to the tree.
In fact, there is no reference at all to num_comp_vectors in the mlx4_en driver at all. The code there currently reads:
if (!mdev->profile.prof[i].rx_ring_num) {
mdev->profile.prof[i].rx_ring_num = 1;
mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n",
1, i);So there is some other patch applied to your copy of the driver already that adds all of that num_comp_vectors stuff. It isn't in the upstream sources, and it certainly isn't in the networking development GIT tree(s), that is for sure.
Please, please (did I say please?), please be more careful in the future and don't send patches that do not apply properly to the tree. This wastes a lot of my time and discourages my handling your patches efficiently in the future.