All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erez Shitrit <erezsh@dev.mellanox.co.il>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Doug Ledford <dledford@redhat.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Mike Marciniszyn <mike.marciniszyn@intel.com>,
	Dennis Dalessandro <dennis.alessandro@intel.com>,
	Gary Leshner <Gary.S.Leshner@intel.com>,
	Kaike Wan <kaike.wan@intel.com>
Subject: Re: [PATCH for-next 13/16] IB/{hfi1, ipoib, rdma}: Broadcast ping sent packets which exceeded mtu size
Date: Wed, 19 Feb 2020 15:41:15 +0200	[thread overview]
Message-ID: <CAAk-MO91iV9GDZChWCKjMAmv553EDGfSdr9B8aFw1f4yncx-Wg@mail.gmail.com> (raw)
In-Reply-To: <20200210131944.87776.64386.stgit@awfm-01.aw.intel.com>

On Mon, Feb 10, 2020 at 3:19 PM Dennis Dalessandro
<dennis.dalessandro@intel.com> wrote:
>
> From: Gary Leshner <Gary.S.Leshner@intel.com>
>
> When in connected mode ipoib sent broadcast pings which exceeded the mtu
> size for broadcast addresses.

But this broadcast done via the UD QP and not via the connected mode,
please explain

>
> Add an mtu attribute to the rdma_netdev structure which ipoib sets to its
> mcast mtu size.
>
> The RDMA netdev uses this value to determine if the skb length is too long
> for the mtu specified and if it is, drops the packet and logs an error
> about the errant packet.
>
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
> Reviewed-by: Dennis Dalessandro <dennis.alessandro@intel.com>
> Signed-off-by: Gary Leshner <Gary.S.Leshner@intel.com>
> Signed-off-by: Kaike Wan <kaike.wan@intel.com>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c      |    2 ++
>  drivers/infiniband/ulp/ipoib/ipoib_multicast.c |    1 +
>  drivers/infiniband/ulp/ipoib/ipoib_vlan.c      |    3 +++
>  3 files changed, 6 insertions(+)
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 5c1cf68..ddb896f 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1906,6 +1906,7 @@ static int ipoib_ndo_init(struct net_device *ndev)
>  {
>         struct ipoib_dev_priv *priv = ipoib_priv(ndev);
>         int rc;
> +       struct rdma_netdev *rn = netdev_priv(ndev);
>
>         if (priv->parent) {
>                 ipoib_child_init(ndev);
> @@ -1918,6 +1919,7 @@ static int ipoib_ndo_init(struct net_device *ndev)
>         /* MTU will be reset when mcast join happens */
>         ndev->mtu = IPOIB_UD_MTU(priv->max_ib_mtu);
>         priv->mcast_mtu = priv->admin_mtu = ndev->mtu;
> +       rn->mtu = priv->mcast_mtu;

If this is something specific for your lower driver (opa_vnic etc.)
you don't need to do that here, you can use the rn->clnt_priv member
in order to get the mcast_mtu

>         ndev->max_mtu = IPOIB_CM_MTU;
>
>         ndev->neigh_priv_len = sizeof(struct ipoib_neigh);
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
> index 7166ee9b..3d5f6b8 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
> @@ -246,6 +246,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
>                 if (priv->mcast_mtu == priv->admin_mtu)
>                         priv->admin_mtu = IPOIB_UD_MTU(mtu);
>                 priv->mcast_mtu = IPOIB_UD_MTU(mtu);
> +               rn->mtu = priv->mcast_mtu;
>
>                 priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey);
>                 spin_unlock_irq(&priv->lock);
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
> index 8ac8e18..3086560 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
> @@ -97,6 +97,7 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv,
>  {
>         struct net_device *ndev = priv->dev;
>         int result;
> +       struct rdma_netdev *rn = netdev_priv(ndev);
>
>         ASSERT_RTNL();
>
> @@ -117,6 +118,8 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv,
>                 goto out_early;
>         }
>
> +       rn->mtu = priv->mcast_mtu;
> +
>         priv->parent = ppriv->dev;
>         priv->pkey = pkey;
>         priv->child_type = type;
>

  parent reply	other threads:[~2020-02-19 13:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 13:18 [PATCH for-next 00/16] New hfi1 feature: Accelerated IP Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 01/16] IB/hfi1: Add accelerated IP capability bit Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 02/16] IB/hfi1: Add functions to transmit datagram ipoib packets Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 03/16] IB/hfi1: Add the transmit side of a datagram ipoib RDMA netdev Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 04/16] IB/hfi1: Remove module parameter for KDETH qpns Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 05/16] IB/{rdmavt, hfi1}: Implement creation of accelerated UD QPs Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 06/16] IB/hfi1: RSM rules for AIP Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 07/16] IB/ipoib: Increase ipoib Datagram mode MTU's upper limit Dennis Dalessandro
2020-02-19 11:01   ` Erez Shitrit
2020-02-21 19:40     ` Dennis Dalessandro
2020-02-10 13:18 ` [PATCH for-next 08/16] IB/hfi1: Rename num_vnic_contexts as num_netdev_contexts Dennis Dalessandro
2020-02-10 13:19 ` [PATCH for-next 09/16] IB/hfi1: Add functions to receive accelerated ipoib packets Dennis Dalessandro
2020-02-10 13:19 ` [PATCH for-next 10/16] IB/hfi1: Add interrupt handler functions for accelerated ipoib Dennis Dalessandro
2020-02-10 13:19 ` [PATCH for-next 11/16] IB/hfi1: Add rx functions for dummy netdev Dennis Dalessandro
2020-02-10 13:19 ` [PATCH for-next 12/16] IB/hfi1: Activate the " Dennis Dalessandro
2020-02-10 13:19 ` [PATCH for-next 13/16] IB/{hfi1, ipoib, rdma}: Broadcast ping sent packets which exceeded mtu size Dennis Dalessandro
2020-02-19  0:42   ` Jason Gunthorpe
2020-02-21 19:40     ` Dennis Dalessandro
2020-02-21 23:32       ` Jason Gunthorpe
2020-03-20 13:53         ` Dennis Dalessandro
2020-02-19 13:41   ` Erez Shitrit [this message]
2020-02-21 19:40     ` Dennis Dalessandro
2020-02-10 13:19 ` [PATCH for-next 14/16] IB/hfi1: Add packet histogram trace event Dennis Dalessandro
2020-02-10 13:19 ` [PATCH for-next 15/16] IB/ipoib: Add capability to switch between datagram and connected mode Dennis Dalessandro
2020-02-10 13:20 ` [PATCH for-next 16/16] IB/hfi1: Enable the transmit side of the datagram ipoib netdev Dennis Dalessandro
2020-02-10 13:31 ` [PATCH for-next 00/16] New hfi1 feature: Accelerated IP Jason Gunthorpe
2020-02-10 17:36   ` Dennis Dalessandro
2020-02-10 18:32     ` Jason Gunthorpe
2020-02-11 21:58       ` 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=CAAk-MO91iV9GDZChWCKjMAmv553EDGfSdr9B8aFw1f4yncx-Wg@mail.gmail.com \
    --to=erezsh@dev.mellanox.co.il \
    --cc=Gary.S.Leshner@intel.com \
    --cc=dennis.alessandro@intel.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kaike.wan@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.