All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Devesh Sharma
	<devesh.sharma-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 0/4] ocrdma bug fix for linux-4.4-rc
Date: Sat, 26 Dec 2015 13:07:08 -0500	[thread overview]
Message-ID: <567ED74C.6090508@redhat.com> (raw)
In-Reply-To: <1450980848-18945-1-git-send-email-devesh.sharma-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>

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

On 12/24/2015 01:14 PM, Devesh Sharma wrote:
> This patch series fixes for critical bugs introduced due to recent
> changes in linux Infiniband stack.
> 
> Patch 0001 fixes a vlan-id assignment issues in presence of PFC.
> This bug was introduced recently got introduced and it fixes
> dbf727de7440 ('IB/core: Use GID table in AH creation and dmac resolution')
> 
> Patches 0002 to 0004 fixes a deadlock condition reported by Dough Ledford
> while testing linux-4.4-rc5. The deadlock happens when any be2net hook 
> (e.g. open/close) is called in parallel to insmod ocrdma.ko.
> 
> A. be2net is sending administrative open/close event to ocrdma holding
>    device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net.
>    So sequence of locks is rtnl_lock---> device_list lock
> 
> B.  When new ocrdma roce device gets registered, infiniband stack now
>     takes rtnl_lock in ib_register_device() in GID initialization routines.
>     So sequence of locks in this path is device_list lock ---> rtnl_lock.
> 
> This improper locking sequence causes deadlock.
> 
> Patch 0002 removes an unwanted code to force all active-QPs to error state
> using a management command. It is rather simple to let active-QPs to move
> to error on their own due to a completion error after the port error is
> reported.
> 
> Patch 0003 makes IB-dispatch-event mechanism independent of administrative
> open/close events injected from be2net driver. Instead of those events, now
> ocrdma relies on async-events generated from CNA. Thus, solving the problem
> of keeping device_list_mutex busy under rtnl-lock. Moving from administrative
> events to CNA async-events does not change the functionality of ocrdma driver
> in any way.
> 
> Patch 0004 Removes the dead code from be2net driver.
> 
> Devesh Sharma (4):
>   RDMA/ocrdma: Fix vlan-id assignment in qp parameters
>   RDMA/ocrdma: Dispatch only port event when port state changes
>   RDMA/ocrdma: Depend on async link events from CNA
>   RDMA/be2net: Remove open and close entry points
> 
>  drivers/infiniband/hw/ocrdma/ocrdma.h       | 10 +++++
>  drivers/infiniband/hw/ocrdma/ocrdma_hw.c    | 49 ++++++++++++++++++++-----
>  drivers/infiniband/hw/ocrdma/ocrdma_hw.h    |  4 +-
>  drivers/infiniband/hw/ocrdma/ocrdma_main.c  | 57 +++++++++++++----------------
>  drivers/infiniband/hw/ocrdma/ocrdma_sli.h   | 49 +++++++++++++++++++++++--
>  drivers/infiniband/hw/ocrdma/ocrdma_verbs.c |  2 +-
>  drivers/net/ethernet/emulex/benet/be.h      |  2 -
>  drivers/net/ethernet/emulex/benet/be_main.c |  4 --
>  drivers/net/ethernet/emulex/benet/be_roce.c | 36 ------------------
>  drivers/net/ethernet/emulex/benet/be_roce.h |  4 +-
>  10 files changed, 124 insertions(+), 93 deletions(-)
> 

Thanks Devesh, I'll review and test this later today.

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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

      parent reply	other threads:[~2015-12-26 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 18:14 [PATCH 0/4] ocrdma bug fix for linux-4.4-rc Devesh Sharma
     [not found] ` <1450980848-18945-1-git-send-email-devesh.sharma-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>
2015-12-24 18:14   ` [PATCH 1/4] RDMA/ocrdma: Fix vlan-id assignment in qp parameters Devesh Sharma
2015-12-24 18:14   ` [PATCH 2/4] RDMA/ocrdma: Dispatch only port event when port state changes Devesh Sharma
2015-12-24 18:14   ` [PATCH 3/4] RDMA/ocrdma: Depend on async link events from CNA Devesh Sharma
2015-12-24 18:14   ` [PATCH 4/4] RDMA/be2net: Remove open and close entry points Devesh Sharma
2015-12-26 18:07   ` Doug Ledford [this message]

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=567ED74C.6090508@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=devesh.sharma-1wcpHE2jlwO1Z/+hSey0Gg@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.