All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jack Morgenstein
	<jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Subject: Re: [PATCH rdma-rc 4/7] IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets
Date: Sun, 18 Sep 2016 09:53:56 +0300	[thread overview]
Message-ID: <20160918065356.GA2923@leon.nu> (raw)
In-Reply-To: <4ad7c7fb-71a4-8ac4-f3a2-d0b4f2001385-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2816 bytes --]

On Fri, Sep 16, 2016 at 02:01:57PM -0400, Doug Ledford wrote:
> On 9/12/2016 12:16 PM, Leon Romanovsky wrote:
> > From: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
> >
> > In MLX qp packets, the LRH (built by the driver) has both a VL field
> > and an SL field. When building a QP1 packet, the VL field should
> > reflect the SLtoVL mapping and not arbitrarily contain zero (as is
> > done now). This bug causes credit problems in IB switches at
> > high rates of QP1 packets.
> >
> > The fix is to cache the SL to VL mapping in the driver, and look up
> > the VL mapped to the SL provided in the send request when sending
> > QP1 packets.
> >
> > For FW versions which support generating a port_management_config_change
> > event with subtype sl-to-vl-table-change, the driver uses that event
> > to update its sl-to-vl mapping cache.  Otherwise, the driver snoops
> > incoming SMP mads to update the cache.
> >
> > There remains the case where the FW is running in secure-host mode
> > (so no QP0 packets are delivered to the driver), and the FW does not
> > generate the sl2vl mapping change event. To support this case, the
> > driver updates (via querying the FW) its sl2vl mapping cache when
> > running in secure-host mode when it receives either a Port Up event
> > or a client-reregister event (where the port is still up, but there
> > may have been an opensm failover).
> > OpenSM modifies the sl2vl mapping before Port Up and Client-reregister
> > events occur, so if there is a mapping change the driver's cache will
> > be properly updated.
> >
> > Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
> > Signed-off-by: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
> > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > ---
> >  drivers/infiniband/hw/mlx4/mad.c        |  64 ++++++++++++++++++-
> >  drivers/infiniband/hw/mlx4/main.c       | 110 +++++++++++++++++++++++++++++++-
> >  drivers/infiniband/hw/mlx4/mlx4_ib.h    |   7 ++
> >  drivers/infiniband/hw/mlx4/qp.c         |  23 ++++++-
> >  drivers/net/ethernet/mellanox/mlx4/fw.c |  13 ++--
> >  include/linux/mlx4/device.h             |  13 +++-
> >  6 files changed, 220 insertions(+), 10 deletions(-)
>
> That's a lot more code churn than I would like to see in a late RC.  I'm
> going to drop this patch and move it to 4.9 instead.  If this fixed an
> oops or something like that, I would be more open to taking it now, but
> the problem being resolved is credits on a switch.  That isn't the sort
> of showstopper issue that would justify this large of a patch this late
> in the cycle.

No problem, Thanks.

>
>
> --
> Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>     GPG Key ID: 0E572FDD
>




[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-09-18  6:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 16:16 [PATCH rdma-rc 0/7] Second round of mlx4/mlx5 fixes for 4.8 Leon Romanovsky
     [not found] ` <1473696984-6161-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-09-12 16:16   ` [PATCH rdma-rc 1/7] IB/mlx4: Fix incorrect MC join state bit-masking on SR-IOV Leon Romanovsky
2016-09-12 16:16   ` [PATCH rdma-rc 2/7] IB/mlx4: Fix code indentation in QP1 MAD flow Leon Romanovsky
2016-09-12 16:16   ` [PATCH rdma-rc 3/7] IB/mlx4: Use correct subnet-prefix in QP1 mads under SR-IOV Leon Romanovsky
2016-09-12 16:16   ` [PATCH rdma-rc 4/7] IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets Leon Romanovsky
     [not found]     ` <1473696984-6161-5-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-09-16 18:01       ` Doug Ledford
     [not found]         ` <4ad7c7fb-71a4-8ac4-f3a2-d0b4f2001385-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-18  6:53           ` Leon Romanovsky [this message]
     [not found]             ` <20160918065356.GA2923-2ukJVAZIZ/Y@public.gmane.org>
2016-09-23 16:48               ` Doug Ledford
2016-09-12 16:16   ` [PATCH rdma-rc 5/7] IB/mlx4: Diagnostic HW counters are not supported in slave mode Leon Romanovsky
2016-09-12 16:16   ` [PATCH rdma-rc 6/7] IB/mlx5: Enable MAD_IFC commands for IB ports only Leon Romanovsky
     [not found]     ` <1473696984-6161-7-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-09-13  5:43       ` Leon Romanovsky
2016-09-12 16:16   ` [PATCH rdma-rc 7/7] IB/mlx5: Set source mac address in FTE Leon Romanovsky
2016-09-16 18:02   ` [PATCH rdma-rc 0/7] Second round of mlx4/mlx5 fixes for 4.8 Doug Ledford

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=20160918065356.GA2923@leon.nu \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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.