| Submitter | Yevgeny Petrilin |
|---|---|
| Date | Dec. 22, 2008, 10 a.m. |
| Message ID | <494F6551.3040500@mellanox.co.il> |
| Download | mbox | patch |
| Permalink | /patch/15210/ |
| State | Rejected |
| Delegated to: | David Miller |
| Headers | show |
Comments
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Date: Mon, 22 Dec 2008 12:00:49 +0200 > 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 <yevgenyp@mellanox.co.il> 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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index e44e018..34f3a19 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c @@ -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
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 <yevgenyp@mellanox.co.il> --- drivers/net/mlx4/en_main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)