Re: [PATCH v2 for-next 07/16] IB/ipoib: Increase ipoib Datagram mode MTU's upper limit

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

 



On Mon, May 11, 2020 at 12:04:55PM -0400, Dennis Dalessandro wrote:
> On 3/27/2020 12:49 PM, Jason Gunthorpe wrote:
> > On Mon, Mar 23, 2020 at 07:15:12PM -0400, Dennis Dalessandro wrote:
> > > @@ -240,13 +241,11 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
> > >   		priv->broadcast->mcmember.flow_label = mcmember->flow_label;
> > >   		priv->broadcast->mcmember.hop_limit = mcmember->hop_limit;
> > >   		/* assume if the admin and the mcast are the same both can be changed */
> > > +		mtu = rdma_mtu_enum_to_int(priv->ca,  priv->port,
> > > +					   priv->broadcast->mcmember.mtu);
> > >   		if (priv->mcast_mtu == priv->admin_mtu)
> > > -			priv->admin_mtu =
> > > -			priv->mcast_mtu =
> > > -			IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu));
> > > -		else
> > > -			priv->mcast_mtu =
> > > -			IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu));
> > > +			priv->admin_mtu = IPOIB_UD_MTU(mtu);
> > > +		priv->mcast_mtu = IPOIB_UD_MTU(mtu);
> > 
> > Er, how did this ever work? Does the OPA SM not use the 6 & 7 values
> > for the mtu in the path record? Why is it being changed now?
> 
> Prior to this patch series, we can only run AIP at a max mtu of 4K, even on
> OPA devices. Therefore, we need a way to get the max physical mtu for the
> underlying device.

Well, a month later and I don't evern remember what this is about.

> > > +/**
> > > + * rdma_mtu_from_attr - Return the mtu of the port from the port attribute.
> > > + * @device: Device
> > > + * @port_num: Port number
> > > + * @attr: port attribute
> > > + *
> > > + * Return the MTU size supported by the port as an integer value.
> > > + */
> > > +static inline int rdma_mtu_from_attr(struct ib_device *device, u8 port,
> > > +				     struct ib_port_attr *attr)
> > > +{
> > > +	if (rdma_core_cap_opa_port(device, port))
> > > +		return attr->phys_mtu;
> > 
> > Why not just always set this?
> 
> Because this is a new field and other vendor devices does not set it at all.

Fix the other drivers to set it to the 'else' branch..

Jason



[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