Re: [PATCH rdma-rc 3/3] IB/mlx5: Always return success for RoCE modify port

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

 



On Thu, Aug 24, 2017 at 05:39:01PM +0300, Yuval Shaia wrote:
> On Wed, Aug 23, 2017 at 08:35:42AM +0300, Leon Romanovsky wrote:
> > From: Majd Dibbiny <majd@xxxxxxxxxxxx>
> >
> > CM layer calls ib_modify_port() regardless of the link layer.
> >
> > For the Ethernet ports, qkey violation and Port capabilities
> > are meaningless. Therefore, always return success for ib_modify_port
> > calls on the Ethernet ports.
> >
> > Cc: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
> > Signed-off-by: Majd Dibbiny <majd@xxxxxxxxxxxx>
> > Reviewed-by: Moni Shoua <monis@xxxxxxxxxxxx>
> > Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
> > ---
> >  drivers/infiniband/hw/mlx5/main.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> > index a7f2e60085c4..f7fcde1ff0aa 100644
> > --- a/drivers/infiniband/hw/mlx5/main.c
> > +++ b/drivers/infiniband/hw/mlx5/main.c
> > @@ -1085,6 +1085,12 @@ static int mlx5_ib_modify_port(struct ib_device *ibdev, u8 port, int mask,
> >  	bool is_ib = (mlx5_ib_port_link_layer(ibdev, port) ==
> >  		      IB_LINK_LAYER_INFINIBAND);
> >
> > +	/* CM layer calls ib_modify_port() regardless of the link layer. For
> > +	 * Ethernet ports, qkey violation and Port capabilities are meaningless.
> > +	 */
> > +	if (!is_ib)
> > +		return 0;
> > +
>
> Alternatively you better stick to the convention used in mlx5_ib_add and do
> the check there before installing the hook, like it is done for
> mlx5_ib_get_netdev.

It is patch preparation to Selvin's common modify_qp change. In his
change, it is checked outside of this function in global ib_modify_qp
function.

Thanks

>
> >  	if (MLX5_CAP_GEN(dev->mdev, ib_virt) && is_ib) {
> >  		change_mask = props->clr_port_cap_mask | props->set_port_cap_mask;
> >  		value = ~props->clr_port_cap_mask | props->set_port_cap_mask;
> > --
> > 2.14.1
> >
> > --
> > 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

Attachment: signature.asc
Description: PGP signature


[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