<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/nvme/target/fc.c, branch master</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2017-08-17T07:35:08+00:00</updated>
<entry>
<title>nvmet-fc: eliminate incorrect static markers on local variables</title>
<updated>2017-08-17T07:35:08+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2017-08-16T17:47:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=369157b41cca435442cf5add9df209aaf951860d'/>
<id>urn:sha1:369157b41cca435442cf5add9df209aaf951860d</id>
<content type='text'>
There were 2 statics introduced that were bogus. Removed the static
designations.

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: correct use after free on list teardown</title>
<updated>2017-08-16T08:06:18+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2017-08-14T18:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=16a5a480f067f945fd27bf91ffdce3f959b0d4b6'/>
<id>urn:sha1:16a5a480f067f945fd27bf91ffdce3f959b0d4b6</id>
<content type='text'>
Use list_for_each_entry_safe to prevent list handling from referencing
next pointers directly after list_del's

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvmet_fc: add defer_req callback for deferment of cmd buffer return</title>
<updated>2017-08-10T09:06:38+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2017-08-01T22:12:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=0fb228d30b8d72bfee51f57e638d412324d44a11'/>
<id>urn:sha1:0fb228d30b8d72bfee51f57e638d412324d44a11</id>
<content type='text'>
At queue creation, the transport allocates a local job struct
(struct nvmet_fc_fcp_iod) for each possible element of the queue.
When a new CMD is received from the wire, a jobs struct is allocated
from the queue and then used for the duration of the command.
The job struct contains buffer space for the wire command iu. Thus,
upon allocation of the job struct, the cmd iu buffer is copied to
the job struct and the LLDD may immediately free/reuse the CMD IU
buffer passed in the call.

However, in some circumstances, due to the packetized nature of FC
and the api of the FC LLDD which may issue a hw command to send the
wire response, but the LLDD may not get the hw completion for the
command and upcall the nvmet_fc layer before a new command may be
asynchronously received on the wire. In other words, its possible
for the initiator to get the response from the wire, thus believe a
command slot free, and send a new command iu. The new command iu
may be received by the LLDD and passed to the transport before the
LLDD had serviced the hw completion and made the teardown calls for
the original job struct. As such, there is no available job struct
available for the new io. E.g. it appears like the host sent more
queue elements than the queue size. It didn't based on it's
understanding.

Rather than treat this as a hard connection failure queue the new
request until the job struct does free up. As the buffer isn't
copied as there's no job struct, a special return value must be
returned to the LLDD to signify to hold off on recycling the cmd
iu buffer.  And later, when a job struct is allocated and the
buffer copied, a new LLDD callback is introduced to notify the
LLDD and allow it to recycle it's command iu buffer.

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-fc: revise TRADDR parsing</title>
<updated>2017-07-25T16:05:25+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2017-07-17T20:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9c5358e15ca12ed3dc3b1e51671dee5d155de8e0'/>
<id>urn:sha1:9c5358e15ca12ed3dc3b1e51671dee5d155de8e0</id>
<content type='text'>
The FC-NVME spec hasn't locked down on the format string for TRADDR.
Currently the spec is lobbying for "nn-&lt;16hexdigits&gt;:pn-&lt;16hexdigits&gt;"
where the wwn's are hex values but not prefixed by 0x.

Most implementations so far expect a string format of
"nn-0x&lt;16hexdigits&gt;:pn-0x&lt;16hexdigits&gt;" 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 &lt;james.smart@broadcom.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: fix byte swapping in nvmet_fc_ls_create_association</title>
<updated>2017-07-20T14:41:56+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-07-14T09:14:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7722ecdc54a4019eaeeebfdac53915bf0c68a7ff'/>
<id>urn:sha1:7722ecdc54a4019eaeeebfdac53915bf0c68a7ff</id>
<content type='text'>
We always need to do non-equal comparisms on the native endian versions
to get the correct result.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet_fc: Accept variable pad lengths on Create Association LS</title>
<updated>2017-07-10T06:09:58+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2017-07-08T01:08:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4cb7ca8073e1f226487168155c9a887079d605e4'/>
<id>urn:sha1:4cb7ca8073e1f226487168155c9a887079d605e4</id>
<content type='text'>
Target validation of the Create Association LS revised to accept any
LS as long as all non-pad data has been received. This allows a (newer)
target to accept the LS from older initiators with varying pad lengths.

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvmet_fc: fix crashes on bad opcodes</title>
<updated>2017-06-28T14:14:13+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2017-06-16T06:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=188f7e8a3789cb2e37b68903e0a40f406091fa97'/>
<id>urn:sha1:188f7e8a3789cb2e37b68903e0a40f406091fa97</id>
<content type='text'>
if a nvme command is issued with an opcode that is not supported by
the target (example: opcode 21 - detach namespace), the target
crashes due to a null pointer.

nvmet_req_init() detects the bad opcode and immediately calls the nvme
command done routine with an error status, allowing the transport to
send the response. However, the FC transport was aborting the command
on error, so the abort freed the lldd point, but the rsp transmit path
referenced it psot the free.

Fix by removing the abort call on nvmet_req_init() failure.
The completion response will be sent with an error status code.

As the completion path will terminate the io, ensure the data_sg
lists show an unused state so that teardown paths are successful.

Signed-off-by: Paul Ely &lt;Paul.Ely@broadcom.com&gt;
Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: remove target cpu scheduling flag</title>
<updated>2017-05-20T16:11:34+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2017-04-25T23:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4b8ba5fa525bc8bdaaed2a5c5433f0f2008d7bc5'/>
<id>urn:sha1:4b8ba5fa525bc8bdaaed2a5c5433f0f2008d7bc5</id>
<content type='text'>
Remove NVMET_FCTGTFEAT_NEEDS_CMD_CPUSCHED. It's unnecessary.

Signed-off-by: James Smart &lt;james.smart@broadcom.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: properly endian swap sq_head</title>
<updated>2017-04-24T07:18:26+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-04-21T08:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=8ad76cf10012b625800a9764c5af08dbc0948ff7'/>
<id>urn:sha1:8ad76cf10012b625800a9764c5af08dbc0948ff7</id>
<content type='text'>
Found by sparse.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: James Smart &lt;james.smart@broadcom.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
</content>
</entry>
<entry>
<title>nvmet-fc: mark the sqhd field as __le16</title>
<updated>2017-04-24T07:18:25+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-04-21T08:42:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=f63688a610958a410e9cab7b4d41b77a29912379'/>
<id>urn:sha1:f63688a610958a410e9cab7b4d41b77a29912379</id>
<content type='text'>
That's what it's used as.

Found by sparse.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: James Smart &lt;james.smart@broadcom.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
</content>
</entry>
</feed>
