Re: [for-rc v2] RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2018 at 02:22:07AM -0400, Devesh Sharma wrote:
> The recent changes in Broadcom's ethernet driver(L2 driver) broke
> RoCE functionality in terms of MSIx vector allocation and
> de-allocation.
> 
> There is a possibility that L2 driver would initiate MSIx vector
> reallocation depending upon the requests coming from administrator.
> In such cases L2 driver needs to free up all the MSIx vectors
> allocated previously and reallocate/initialize those.
> 
> If RoCE driver is loaded and reshuffling is attempted, there will be
> kernel crashes because RoCE driver would still be holding the MSIx
> vectors but L2 driver would attempt to free in-use vectors. Thus
> leading to a kernel crash.
> 
> Making changes in roce driver to fix crashes described above.
> As part of solution L2 driver tells RoCE driver to release
> the MSIx vector whenever there is a need. When RoCE driver
> get message it sync up with all the running tasklets and IRQ
> handlers and releases the vectors. L2 driver send one more
> message to RoCE driver to resume the MSIx vectors. L2 driver
> guarantees that RoCE vector do not change during reshuffling.
> 
> Fixes: 76dda4cba264 ("Add ULP calls to stop and restart IRQs")
> Fixes: 9f066b40c80f ("Change IRQ assignment for RDMA driver")
> Signed-off-by: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>

Come on guys..

mlx{jgg}~/oss/k.o#git describe --contains 9f066b40c80f
Could not get sha1 for 9f066b40c80f. Skipping.
mlx{jgg}~/oss/k.o#git describe  --contains 76dda4cba264
Could not get sha1 for 76dda4cba264. Skipping.

Should be

Fixes: ec86f14ea506 ("bnxt_en: Add ULP calls to stop and restart IRQs.")
Fixes: 08654eb213a8 ("bnxt_en: Change IRQ assignment for RDMA driver.")

> +	memset(nq->name, 0, 32);

Open coded size? Nope

> +	sprintf(nq->name, "bnxt_qplib_nq-%d", nq_indx);

Why the memset? Why not a snprintf? Should be

snprintf(nq->name, sizeof(nq->name), "bnxt_qplib_nq-%d", nq_indx);


> -	nq->requested = false;
> -	memset(nq->name, 0, 32);
> -	sprintf(nq->name, "bnxt_qplib_nq-%d", nq_idx);

Ditto

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux