Re: [PATCH for-next 7/7] RDMA/bnxt_re: Enable congestion control by default

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

 



On Thu, Mar 23, 2023 at 02:12:19AM -0700, Selvin Xavier wrote:
> Enable Congesion control by default. Issue FW command
> enable the CC during driver load and disable it during
> unload.
> 
> Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/hw/bnxt_re/main.c       |  24 ++++++-
>  drivers/infiniband/hw/bnxt_re/qplib_rcfw.c |  15 ++--
>  drivers/infiniband/hw/bnxt_re/qplib_rcfw.h |  20 ++++--
>  drivers/infiniband/hw/bnxt_re/qplib_sp.c   | 109 +++++++++++++++++++++++++++++
>  drivers/infiniband/hw/bnxt_re/qplib_sp.h   |  67 ++++++++++++++++++
>  5 files changed, 222 insertions(+), 13 deletions(-)

<...>

> index 06979f7..73f936c 100644
> --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
> +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
> @@ -96,7 +96,7 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw,
>  	u32 sw_prod, cmdq_prod;
>  	struct pci_dev *pdev;
>  	unsigned long flags;
> -	u32 size, opcode;
> +	u32 bsize, opcode;
>  	u16 cookie, cbit;
>  	u8 *preq;

<...>

>  	memset(msg->resp, 0, sizeof(*msg->resp));
>  	crsqe->resp = (struct creq_qp_event *)msg->resp;
> -	crsqe->resp->cookie = msg->req->cookie;
> +	crsqe->resp->cookie = cookie;

I see that you didn't change cookie type in this patch, but it is better
to fix smatch/sparse warnings while you are changing the code.

I don't want to see any warnings generated by new patches even for old code.

drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:155:29: warning: incorrect type in assignment (different base types)
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:155:29:    expected restricted __le16 [usertype] cookie
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:155:29:    got unsigned short [assigned] [usertype] cookie
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h:96:13: warning: restricted __le16 degrades to integer

Thanks



[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