linux/drivers/nvme/target
James Smart 9c5358e15c nvme-fc: revise TRADDR parsing
The FC-NVME spec hasn't locked down on the format string for TRADDR.
Currently the spec is lobbying for "nn-<16hexdigits>:pn-<16hexdigits>"
where the wwn's are hex values but not prefixed by 0x.

Most implementations so far expect a string format of
"nn-0x<16hexdigits>:pn-0x<16hexdigits>" to be used. The transport
uses the match_u64 parser which requires a leading 0x prefix to set
the base properly. If it's not there, a match will either fail or return
a base 10 value.

The resolution in T11 is pushing out. Therefore, to fix things now and
to cover any eventuality and any implementations already in the field,
this patch adds support for both formats.

The change consists of replacing the token matching routine with a
routine that validates the fixed string format, and then builds
a local copy of the hex name with a 0x prefix before calling
the system parser.

Note: the same parser routine exists in both the initiator and target
transports. Given this is about the only "shared" item, we chose to
replicate rather than create an interdendency on some shared code.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2017-07-25 18:05:25 +02:00
..
admin-cmd.c nvmet: don't report 0-bytes in serial number 2017-07-20 08:41:56 -06:00
configfs.c nvmet: preserve controller serial number between reboots 2017-07-20 08:41:56 -06:00
core.c nvmet: Move serial number from controller to subsystem 2017-07-20 08:41:56 -06:00
discovery.c nvme: use a single NVME_AQ_DEPTH and relax it to 32 2017-06-28 08:14:13 -06:00
fabrics-cmd.c nvmet: convert from kmap to nvmet_copy_from_sgl 2017-04-21 16:41:47 +02:00
fc.c nvme-fc: revise TRADDR parsing 2017-07-25 18:05:25 +02:00
fcloop.c nvmet-fc: Remove a set-but-not-used variable 2017-06-15 14:30:25 +02:00
io-cmd.c nvmet: avoid unneeded assignment of submit_bio return value 2017-07-10 18:45:38 +03:00
Kconfig nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
loop.c nvme: split nvme_uninit_ctrl into stop and uninit 2017-07-06 09:49:42 +03:00
Makefile nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
nvmet.h nvmet: Move serial number from controller to subsystem 2017-07-20 08:41:56 -06:00
rdma.c nvmet-rdma: register ib_client to not deadlock in device removal 2017-06-28 08:14:13 -06:00