All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH rfc 1/3] nvmet-rdma: automatic listening port re-activation
Date: Wed, 4 Apr 2018 16:06:22 +0300	[thread overview]
Message-ID: <6976a748-4c05-640c-ec9c-51882259a7b6@grimberg.me> (raw)
In-Reply-To: <2b3f168a-cf0c-f62d-ea37-42465c81c34d@mellanox.com>


>> @@ -1413,23 +1356,22 @@ static int nvmet_rdma_add_port(struct 
>> nvmet_port *port)
>> ????????? goto out_destroy_id;
>> ????? }
>> -??? ret = rdma_bind_addr(cm_id, (struct sockaddr *)&addr);
>> +??? ret = rdma_bind_addr(cm_id, addr);
>> ????? if (ret) {
>> -??????? pr_err("binding CM ID to %pISpcs failed (%d)\n",
>> -??????????? (struct sockaddr *)&addr, ret);
>> +??????? pr_err("binding CM ID to %pISpcs failed (%d)\n", addr, ret);
>> ????????? goto out_destroy_id;
>> ????? }
>> ????? ret = rdma_listen(cm_id, 128);
>> ????? if (ret) {
>> -??????? pr_err("listening to %pISpcs failed (%d)\n",
>> -??????????? (struct sockaddr *)&addr, ret);
>> +??????? pr_err("listening to %pISpcs failed (%d)\n", addr, ret);
>> ????????? goto out_destroy_id;
>> ????? }
>> -??? pr_info("enabling port %d (%pISpcs)\n",
>> -??????? le16_to_cpu(port->disc_addr.portid), (struct sockaddr *)&addr);
>> -??? port->priv = cm_id;
>> +??? port->cm_id = cm_id;
>> +??? if (cm_id->device)
> 
> can device be NULL here ?

Yes, for unbound listeners.

>> +??? ret = nvmet_rdma_enable_port(port);
>> +??? if (ret)
>> +??????? schedule_delayed_work(&port->enable_work, HZ);
> 
> I think it's beter to schedule it after 5 seconds since we use the 
> system_wq and since it's a recovery process.

OK...

  reply	other threads:[~2018-04-04 13:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 19:02 [PATCH rfc 0/3] nvmet-rdma automatic port re-activation Sagi Grimberg
2018-03-22 19:03 ` [PATCH rfc 1/3] nvmet-rdma: automatic listening " Sagi Grimberg
2018-03-25  8:25   ` Max Gurtovoy
2018-03-26  7:01   ` Max Gurtovoy
2018-04-04 13:06     ` Sagi Grimberg [this message]
2018-03-22 19:03 ` [PATCH rfc 2/3] nvmet: Add fabrics ops to port Sagi Grimberg
2018-03-22 19:03 ` [PATCH rfc 3/3] nvmet: Add port transport active flag Sagi Grimberg
2018-03-26  7:52   ` Max Gurtovoy
2018-04-04 13:08     ` Sagi Grimberg
2018-03-22 19:03 ` [PATCH 4/3 rfc nvmetcli] nvmetcli: expose nvmet port status and state Sagi Grimberg
2018-03-27  8:34   ` Nitzan Carmi
2018-04-11 16:17 ` [PATCH rfc 0/3] nvmet-rdma automatic port re-activation Max Gurtovoy

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=6976a748-4c05-640c-ec9c-51882259a7b6@grimberg.me \
    --to=sagi@grimberg.me \
    /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.