From: james.smart@broadcom.com (James Smart)
Subject: [PATCH rfc 0/3] add support to discovery async event notifications
Date: Fri, 19 Oct 2018 09:09:57 -0700 [thread overview]
Message-ID: <35bca510-c2ac-1464-8d76-3c8e88c137eb@broadcom.com> (raw)
In-Reply-To: <16d6de92-2f42-d78e-b3dd-60f8c4f18613@suse.de>
On 10/17/2018 8:29 AM, Hannes Reinecke wrote:
> On 10/16/18 7:59 PM, James Smart wrote:
>>
>> fyi - the udev script fc uses passes arguments (HOST_TRADDR and
>> TRADDR) from the event into the systemd service. Actually, it creates
>> an instance of the service based on the names built from those
>> arguments.
>>
>> Passing different arguments beyond that seemed rather difficult. For
>> that I was assuming the instance arguments would have to be parsed,
>> and a system file extracted, to obtain any variable values (such as
>> device-specific connect timeouts, or queue count limits, etc).
>>
> That is precisely where I'm scratching my head now.
> Essentially the systemd '@' thingie allows you to pass exactly _one_
> argument. Sadly we have several options to pass, not just one.
I know.? see below.
> We could reduce the number of options by having per-transport services,
> but then we require at least two arguments to be passed (host traddr
> and traddr for FC, traddr, trsvcid, and adrfam for RDMA).
> From what I can see we can try to:
> 1) escape the arguments so that they appear as one string to systemd,
> and then de-escaping them in the service file. Works without
> modification to the code, but then you always have to invoke the shell
> to handle escaping/de-escaping.
> 2) preformat the nvme option string, and pass that as argument for the
> systemd service. Which actually would get rid of the need for using
> nvme-cli, too, as we could just write the string into the device node.
this is what FC did as FC had 2 args (for now): host_traddr and traddr
A single string was created for systemd, and that single string is
passed as an argument to connect-all.? As the argument to connect-all
was really 2 separate arguments (--host_traddr=<value>? and
--traddr=<value), when we built the string for systemd which wants only
1 arg, we embedded the spaces - used \\x20 rather than a space
character.? There should be no reason this couldn't be extended to more
arguments.??? We had tried several different ways to pass the arguments
and this was the only way that seemed to hold together.? So it
effectively does both of the things above.
And as I hinted before - I still think that this process needs to be
augmented by something that sets per-connection overrides, so that
different connect requests could have different connect timeouts. In
general, these differences wouldn't be known by the transport. Although
it would be possible to define a mechanism to go in the
kernel/transport, I think it would be far better for nvme-cli to have a
admin-defined override that could be used to match the connect args to
custom parameters, which would support explicit matches as well as
wildcards, then issue the connect request.??? For example, it could
state anything that is of transport type X to use arguments Z, or
anything that maps to address M to use arguments N.
-- james
> Will be looking into it.
>
> Cheers,
>
> Hannes
next prev parent reply other threads:[~2018-10-19 16:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 21:23 [PATCH rfc 0/3] add support to discovery async event notifications Sagi Grimberg
2018-10-04 21:23 ` [PATCH rfc 1/3] nvme-fabrics: allow discovery subsystems accept a kato Sagi Grimberg
2018-10-05 5:50 ` Hannes Reinecke
2018-10-04 21:23 ` [PATCH rfc 2/3] nvme: enable aen also for discovery controllers Sagi Grimberg
2018-10-05 5:51 ` Hannes Reinecke
2018-10-04 21:23 ` [PATCH rfc 3/3] nvme: fire discovery log page change events to userspace Sagi Grimberg
2018-10-05 5:51 ` Hannes Reinecke
2018-10-04 21:23 ` [PATCH 4/3 rfc nvme-cli] fabrics: support persistent connections to a discovery controller Sagi Grimberg
2018-10-04 21:23 ` [PATCH 5/3 rfc nvme-cli] fabrics: allow user to retrieve discovery log from existing " Sagi Grimberg
2018-10-05 5:50 ` [PATCH rfc 0/3] add support to discovery async event notifications Hannes Reinecke
2018-10-05 7:08 ` Sagi Grimberg
2018-10-05 7:36 ` Hannes Reinecke
2018-10-05 19:34 ` Sagi Grimberg
2018-10-16 1:11 ` Sagi Grimberg
2018-10-16 5:59 ` Hannes Reinecke
2018-10-16 17:59 ` James Smart
2018-10-17 15:29 ` Hannes Reinecke
2018-10-19 0:44 ` Sagi Grimberg
2018-10-19 16:09 ` James Smart [this message]
2018-10-17 0:38 ` Sagi Grimberg
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=35bca510-c2ac-1464-8d76-3c8e88c137eb@broadcom.com \
--to=james.smart@broadcom.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.