<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/infiniband/ulp/iser/iser_memory.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-01-04T20:37:03+00:00</updated>
<entry>
<title>IB/iser: Prevent invalidating wrong MR</title>
<updated>2024-01-04T20:37:03+00:00</updated>
<author>
<name>Sergey Gorenko</name>
<email>sergeygo@nvidia.com</email>
</author>
<published>2023-12-19T07:23:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f1888281e67205bd80d3e8f54dbd519a9653f26'/>
<id>urn:sha1:2f1888281e67205bd80d3e8f54dbd519a9653f26</id>
<content type='text'>
The iser_reg_resources structure has two pointers to MR but only one
mr_valid field. The implementation assumes that we use only *sig_mr when
pi_enable is true. Otherwise, we use only *mr. However, it is only
sometimes correct. Read commands without protection information occur even
when pi_enble is true. For example, the following SCSI commands have a
Data-In buffer but never have protection information: READ CAPACITY (16),
INQUIRY, MODE SENSE(6), MAINTENANCE IN. So, we use
*sig_mr for some SCSI commands and *mr for the other SCSI commands.

In most cases, it works fine because the remote invalidation is applied.
However, there are two cases when the remote invalidation is not
applicable.
 1. Small write commands when all data is sent as an immediate.
 2. The target does not support the remote invalidation feature.

The lazy invalidation is used if the remote invalidation is impossible.
Since, at the lazy invalidation, we always invalidate the MR we want to
use, the wrong MR may be invalidated.

To fix the issue, we need a field per MR that indicates the MR needs
invalidation. Since the ib_mr structure already has such a field, let's
use ib_mr.need_inval instead of iser_reg_resources.mr_valid.

Fixes: b76a439982f8 ("IB/iser: Use IB_WR_REG_MR_INTEGRITY for PI handover")
Link: https://lore.kernel.org/r/20231219072311.40989-1-sergeygo@nvidia.com
Acked-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Signed-off-by: Sergey Gorenko &lt;sergeygo@nvidia.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB/iser: Generalize map/unmap dma tasks</title>
<updated>2022-03-18T17:37:49+00:00</updated>
<author>
<name>Max Gurtovoy</name>
<email>mgurtovoy@nvidia.com</email>
</author>
<published>2022-03-08T14:55:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80303ee244907e720544da83e10fd0552875a6f0'/>
<id>urn:sha1:80303ee244907e720544da83e10fd0552875a6f0</id>
<content type='text'>
Avoid code duplication and add the mapping/unmapping of the protection
buffers to the iser_dma_map_task_data/iser_dma_unmap_task_data functions.

Link: https://lore.kernel.org/r/20220308145546.8372-4-mgurtovoy@nvidia.com
Reviewed-by: Sergey Gorenko &lt;sergeygo@nvidia.com&gt;
Signed-off-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Acked-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB/iser: Use iser_fr_desc as registration context</title>
<updated>2022-03-18T17:37:49+00:00</updated>
<author>
<name>Max Gurtovoy</name>
<email>mgurtovoy@nvidia.com</email>
</author>
<published>2022-03-08T14:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee4efeaea8837bb7018d188a9eb8837c7ff79561'/>
<id>urn:sha1:ee4efeaea8837bb7018d188a9eb8837c7ff79561</id>
<content type='text'>
After removing the FMR support in iSER, there is only one type of
registration context. Replace the void pointer with the explicit structure
for registration (struct iser_fr_desc).

Link: https://lore.kernel.org/r/20220308145546.8372-3-mgurtovoy@nvidia.com
Reviewed-by: Sergey Gorenko &lt;sergeygo@nvidia.com&gt;
Signed-off-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Acked-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB/iser: Remove iser_reg_data_sg helper function</title>
<updated>2022-03-18T17:37:49+00:00</updated>
<author>
<name>Max Gurtovoy</name>
<email>mgurtovoy@nvidia.com</email>
</author>
<published>2022-03-08T14:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f68d7493ff07a0ad63f63c4a1a4e0781cec0dd2'/>
<id>urn:sha1:7f68d7493ff07a0ad63f63c4a1a4e0781cec0dd2</id>
<content type='text'>
Open coding it makes the code more readable and simple.

Link: https://lore.kernel.org/r/20220308145546.8372-2-mgurtovoy@nvidia.com
Reviewed-by: Sergey Gorenko &lt;sergeygo@nvidia.com&gt;
Signed-off-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Acked-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>RDMA/iser: Delete useless module.h include</title>
<updated>2022-01-28T17:03:13+00:00</updated>
<author>
<name>Leon Romanovsky</name>
<email>leonro@nvidia.com</email>
</author>
<published>2022-01-23T18:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f156b944e5f406cdbdca031d4d25d47828b9a97b'/>
<id>urn:sha1:f156b944e5f406cdbdca031d4d25d47828b9a97b</id>
<content type='text'>
There is no need in include of module.h in the following files.

Link: https://lore.kernel.org/r/bdbf940ca5edbbc649153fa15737b779c073c498.1642960861.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Acked-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB/iser: Align coding style across driver</title>
<updated>2022-01-06T17:47:08+00:00</updated>
<author>
<name>Max Gurtovoy</name>
<email>mgurtovoy@nvidia.com</email>
</author>
<published>2021-12-15T13:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca2770c65b56374374fa00c349883e67c16943de'/>
<id>urn:sha1:ca2770c65b56374374fa00c349883e67c16943de</id>
<content type='text'>
The following changes were made:
1. Align function signatures to 80 characters per line.
2. Remove tabs for variable assignment and use 1 space instead.
3. Don't compare to NULL in "if" clause.
4. Remove strange indentations.

This will ease on the maintenance of the driver for the future.

Link: https://lore.kernel.org/r/20211215135721.3662-7-mgurtovoy@nvidia.com
Signed-off-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>scsi: RDMA/iser: Use scsi_cmd_to_rq() instead of scsi_cmnd.request</title>
<updated>2021-08-12T02:25:37+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-08-09T23:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99247108c0f2aac3a153fd255f12e17db40432a2'/>
<id>urn:sha1:99247108c0f2aac3a153fd255f12e17db40432a2</id>
<content type='text'>
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.

Link: https://lore.kernel.org/r/20210809230355.8186-9-bvanassche@acm.org
Reviewed-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>IB/iser: Remove unneeded semicolons</title>
<updated>2021-01-20T00:02:06+00:00</updated>
<author>
<name>Max Gurtovoy</name>
<email>mgurtovoy@nvidia.com</email>
</author>
<published>2021-01-11T14:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5bf0e4b80b2a8b52e8e986f8501e10d4a56c3a01'/>
<id>urn:sha1:5bf0e4b80b2a8b52e8e986f8501e10d4a56c3a01</id>
<content type='text'>
No need to add semicolon after closing bracket.

Link: https://lore.kernel.org/r/20210111145754.56727-2-mgurtovoy@nvidia.com
Reviewed-by: Israel Rukshin &lt;israelr@nvidia.com&gt;
Signed-off-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>RDMA/iser: Remove support for FMR memory registration</title>
<updated>2020-06-02T23:32:53+00:00</updated>
<author>
<name>Israel Rukshin</name>
<email>israelr@mellanox.com</email>
</author>
<published>2020-05-28T19:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1fc431320a53f3e9b33b399667c8788fa00eb8b0'/>
<id>urn:sha1:1fc431320a53f3e9b33b399667c8788fa00eb8b0</id>
<content type='text'>
FMR is not supported on most recent RDMA devices (that use fast memory
registration mechanism). Also, FMR was recently removed from NFS/RDMA
ULP.

Link: https://lore.kernel.org/r/1-v3-f58e6669d5d3+2cf-fmr_removal_jgg@mellanox.com
Signed-off-by: Israel Rukshin &lt;israelr@mellanox.com&gt;
Signed-off-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/iser: Always check sig MR before putting it to the free pool</title>
<updated>2020-03-26T19:46:54+00:00</updated>
<author>
<name>Sergey Gorenko</name>
<email>sergeygo@mellanox.com</email>
</author>
<published>2020-03-25T15:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=26e28deb813eed908cf31a6052870b6493ec0e86'/>
<id>urn:sha1:26e28deb813eed908cf31a6052870b6493ec0e86</id>
<content type='text'>
libiscsi calls the check_protection transport handler only if SCSI-Respose
is received. So, the handler is never called if iSCSI task is completed
for some other reason like a timeout or error handling. And this behavior
looks correct. But the iSER does not handle this case properly because it
puts a non-checked signature MR to the free pool. Then the error occurs at
reusing the MR because it is not allowed to invalidate a signature MR
without checking.

This commit adds an extra check to iser_unreg_mem_fastreg(), which is a
part of the task cleanup flow. Now the signature MR is checked there if it
is needed.

Link: https://lore.kernel.org/r/20200325151210.1548-1-sergeygo@mellanox.com
Signed-off-by: Sergey Gorenko &lt;sergeygo@mellanox.com&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
</feed>
