public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Joel Nider <JOELN-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Ilya Lesokhin <ilyal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: ib_create_qp failing
Date: Wed, 31 Jan 2018 15:58:15 +0200	[thread overview]
Message-ID: <20180131135815.GA2055@mtr-leonro.local> (raw)
In-Reply-To: <OF85410752.DF2BA5BF-ONC2258225.002CFF83-C2258225.002EB65B-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>

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

On Tue, Jan 30, 2018 at 10:30:13AM +0200, Joel Nider wrote:
> Hi Mark,
>
> Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote on 29/01/2018 22:47:04:
>
> > > I am using ConnectX5 EN with special firmware (I just mention it so
> you
> > > know, but I'm pretty sure that's not the problem).  I have used
> dynamic
> > > debug - it shows me that the call is failing like this:
> > >
> > > mlx5_core 0000:01:00.0: mlx5_cmd_check:714:(pid 120772):
> CREATE_QP(0x500)
> > > op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x48b5c0)
> >
> > The syndrome means: "create_qp: invalid service type for RoCE"
> > what QP type are you trying to create and with what parameters?
>
> I'm trying to create an RC connection - here is an outline of my code:
> In module_init(): ib_register_client() -> registers callback
> on_device_add()
> On_device_add(): I only have one device (mlx5_0) and I save the ib_device*
> to a linked list
> From sysfs, a user writes the name (string) of the device to use - this
> starts the setup procedure
> ib_register_event_handler(rpf_ib_qp_event_handler)
> ib_query_port(dev, 1) -> state=4 max_mtu=4096 active_mtu=1024 gid_len=256
> caps=0x4010000
> ib_create_cq() -> rx completion queue
> ib_create_cq() -> tx completion queue
> ib_alloc_pd() -> the protection domain
> ib_create_qp() with:
>
>         struct ib_qp_init_attr qp_attr = {
>                 .event_handler = rpf_ib_qp_event_handler,
>                 .qp_context = res,
>                 .send_cq = res->tx_cq,
>                 .recv_cq = res->rx_cq,
>                 .srq = NULL,
>                 .cap = {
>                         .max_send_wr = 16,
>                         .max_recv_wr = 48,
>                         .max_send_sge = 2,
>                         .max_recv_sge = 1,
>                 },
>                 .sq_sig_type = IB_SIGNAL_REQ_WR,
>                 .qp_type = IB_QPT_RC,
>         };
>
> Fails with the code I mentioned earlier.  This used to fail even earlier
> until I discovered that ib_query_port() has some interesting side effects,
> and is mandatory. Maybe there is some other function that I need to call
> to set up some state first?

We strongly recommend you to contact the customer support
representative, because you are getting FW error from custom FW.

Thanks

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

      parent reply	other threads:[~2018-01-31 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29  8:50 ib_create_qp failing Joel Nider
     [not found] ` <OF089AD255.99D19AC9-ONC2258224.002F8CF2-C2258224.00309558-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-29 19:04   ` Ilya Lesokhin
     [not found]     ` <AM4PR0501MB27239EF18E2C07A64B045674D4E50-dp/nxUn679gUhbbWvQuVF8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-01-29 20:18       ` Joel Nider
     [not found]         ` <OF09394B7D.58CD59F8-ONC2258224.006BDAF8-C2258224.006F854D-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-29 20:47           ` Mark Bloch
     [not found]             ` <fd693fbd-1387-0298-49d0-035e224f07d8-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2018-01-30  8:30               ` Joel Nider
     [not found]                 ` <OF85410752.DF2BA5BF-ONC2258225.002CFF83-C2258225.002EB65B-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-31 13:58                   ` Leon Romanovsky [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=20180131135815.GA2055@mtr-leonro.local \
    --to=leonro-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=JOELN-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org \
    --cc=ilyal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=markb-VPRAkNaXOzVWk0Htik3J/w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox