Re: [PATCH for-rc] RDMA/siw: Fix setting active_mtu attribute

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

 



-----"Kamal Heib" <kamalheib1@xxxxxxxxx> wrote: -----

>To: linux-rdma@xxxxxxxxxxxxxxx
>From: "Kamal Heib" <kamalheib1@xxxxxxxxx>
>Date: 02/05/2020 09:14AM
>Cc: "Doug Ledford" <dledford@xxxxxxxxxx>, "Jason Gunthorpe"
><jgg@xxxxxxxx>, "Bernard Metzler" <bmt@xxxxxxxxxxxxxx>, "Kamal Heib"
><kamalheib1@xxxxxxxxx>
>Subject: [EXTERNAL] [PATCH for-rc] RDMA/siw: Fix setting active_mtu
>attribute
>
>Make sure to set the active_mtu attribute to avoid report the
>following
>invalid value:
>
>$ ibv_devinfo -d siw0 | grep active_mtu
>			active_mtu:		invalid MTU (0)
>
>Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
>Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx>
>---
> drivers/infiniband/sw/siw/siw_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/infiniband/sw/siw/siw_verbs.c
>b/drivers/infiniband/sw/siw/siw_verbs.c
>index 07e30138aaa1..73485d0da907 100644
>--- a/drivers/infiniband/sw/siw/siw_verbs.c
>+++ b/drivers/infiniband/sw/siw/siw_verbs.c
>@@ -168,12 +168,12 @@ int siw_query_port(struct ib_device *base_dev,
>u8 port,
> 
> 	memset(attr, 0, sizeof(*attr));
> 
>-	attr->active_mtu = attr->max_mtu;
> 	attr->active_speed = 2;
> 	attr->active_width = 2;
> 	attr->gid_tbl_len = 1;
> 	attr->max_msg_sz = -1;
> 	attr->max_mtu = ib_mtu_int_to_enum(sdev->netdev->mtu);
>+	attr->active_mtu = ib_mtu_int_to_enum(sdev->netdev->mtu);
> 	attr->phys_state = sdev->state == IB_PORT_ACTIVE ?
> 		IB_PORT_PHYS_STATE_LINK_UP : IB_PORT_PHYS_STATE_DISABLED;
> 	attr->pkey_tbl_len = 1;
>-- 
>2.21.1
>
>

thanks, makes complete sense.

Reviewed-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>




[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