linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: dledford@redhat.com,
	Mike Marciniszyn <mike.marcinisyzn@intel.com>,
	linux-rdma@vger.kernel.org,
	Sadanand Warrier <sadanand.warrier@intel.com>,
	Kaike Wan <kaike.wan@intel.com>
Subject: Re: [PATCH v2 for-next 07/16] IB/ipoib: Increase ipoib Datagram mode MTU's upper limit
Date: Fri, 27 Mar 2020 13:49:24 -0300	[thread overview]
Message-ID: <20200327164924.GY20941@ziepe.ca> (raw)
In-Reply-To: <20200323231511.64035.16923.stgit@awfm-01.aw.intel.com>

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?

> +/**
> + * 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?

Jason

  parent reply	other threads:[~2020-03-27 16:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 23:14 [PATCH v2 for-next 00/16] New hfi1 feature: Accelerated IP Dennis Dalessandro
2020-03-23 23:14 ` [PATCH v2 for-next 01/16] IB/hfi1: Add accelerated IP capability bit Dennis Dalessandro
2020-03-23 23:14 ` [PATCH v2 for-next 02/16] IB/hfi1: Add functions to transmit datagram ipoib packets Dennis Dalessandro
2020-03-23 23:14 ` [PATCH v2 for-next 03/16] IB/hfi1: Add the transmit side of a datagram ipoib RDMA netdev Dennis Dalessandro
2020-03-23 23:14 ` [PATCH v2 for-next 04/16] IB/hfi1: Remove module parameter for KDETH qpns Dennis Dalessandro
2020-03-23 23:14 ` [PATCH v2 for-next 05/16] IB/{rdmavt, hfi1}: Implement creation of accelerated UD QPs Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 06/16] IB/hfi1: RSM rules for AIP Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 07/16] IB/ipoib: Increase ipoib Datagram mode MTU's upper limit Dennis Dalessandro
2020-03-24  5:45   ` Leon Romanovsky
2020-03-24 13:46     ` Dennis Dalessandro
2020-05-11 16:00       ` Dennis Dalessandro
2020-03-27 16:49   ` Jason Gunthorpe [this message]
2020-05-11 16:04     ` Dennis Dalessandro
2020-05-11 17:11       ` Jason Gunthorpe
2020-05-11 17:23         ` Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 08/16] IB/hfi1: Rename num_vnic_contexts as num_netdev_contexts Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 09/16] IB/hfi1: Add functions to receive accelerated ipoib packets Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 10/16] IB/hfi1: Add interrupt handler functions for accelerated ipoib Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 11/16] IB/hfi1: Add rx functions for dummy netdev Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 12/16] IB/hfi1: Activate the " Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 13/16] IB/{hfi1, ipoib, rdma}: Broadcast ping sent packets which exceeded mtu size Dennis Dalessandro
2020-03-23 23:15 ` [PATCH v2 for-next 14/16] IB/hfi1: Add packet histogram trace event Dennis Dalessandro
2020-03-23 23:16 ` [PATCH v2 for-next 15/16] IB/ipoib: Add capability to switch between datagram and connected mode Dennis Dalessandro
2020-03-23 23:16 ` [PATCH v2 for-next 16/16] IB/hfi1: Enable the transmit side of the datagram ipoib netdev Dennis Dalessandro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200327164924.GY20941@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=kaike.wan@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marcinisyzn@intel.com \
    --cc=sadanand.warrier@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).