<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/infiniband/sw/siw, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/infiniband/sw/siw?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/infiniband/sw/siw?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-06T22:48:45Z</updated>
<entry>
<title>Merge tag 'v6.0' into rdma.git for-next</title>
<updated>2022-10-06T22:48:45Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@nvidia.com</email>
</author>
<published>2022-10-06T22:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=33331a728c83f380e53a3dbf2be0c1893da1d739'/>
<id>urn:sha1:33331a728c83f380e53a3dbf2be0c1893da1d739</id>
<content type='text'>
Trvial merge conflicts against rdma.git for-rc resolved matching
linux-next:
            drivers/infiniband/hw/hns/hns_roce_hw_v2.c
            drivers/infiniband/hw/hns/hns_roce_main.c

https://lore.kernel.org/r/20220929124005.105149-1-broonie@kernel.org

Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>RDMA/siw: Fix QP destroy to wait for all references dropped.</title>
<updated>2022-09-20T18:23:52Z</updated>
<author>
<name>Bernard Metzler</name>
<email>bmt@zurich.ibm.com</email>
</author>
<published>2022-09-20T08:25:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a3c278807a459e6f50afee6971cabe74cccfb490'/>
<id>urn:sha1:a3c278807a459e6f50afee6971cabe74cccfb490</id>
<content type='text'>
Delay QP destroy completion until all siw references to QP are
dropped. The calling RDMA core will free QP structure after
successful return from siw_qp_destroy() call, so siw must not
hold any remaining reference to the QP upon return.
A use-after-free was encountered in xfstest generic/460, while
testing NFSoRDMA. Here, after a TCP connection drop by peer,
the triggered siw_cm_work_handler got delayed until after
QP destroy call, referencing a QP which has already freed.

Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
Reported-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Bernard Metzler &lt;bmt@zurich.ibm.com&gt;
Link: https://lore.kernel.org/r/20220920082503.224189-1-bmt@zurich.ibm.com
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA/siw: Always consume all skbuf data in sk_data_ready() upcall.</title>
<updated>2022-09-20T18:21:18Z</updated>
<author>
<name>Bernard Metzler</name>
<email>bmt@zurich.ibm.com</email>
</author>
<published>2022-09-20T08:12:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=754209850df8367c954ac1de7671c7430b1f342c'/>
<id>urn:sha1:754209850df8367c954ac1de7671c7430b1f342c</id>
<content type='text'>
For header and trailer/padding processing, siw did not consume new
skb data until minimum amount present to fill current header or trailer
structure, including potential payload padding. Not consuming any
data during upcall may cause a receive stall, since tcp_read_sock()
is not upcalling again if no new data arrive.
A NFSoRDMA client got stuck at RDMA Write reception of unaligned
payload, if the current skb did contain only the expected 3 padding
bytes, but not the 4 bytes CRC trailer. Expecting 4 more bytes already
arrived in another skb, and not consuming those 3 bytes in the current
upcall left the Write incomplete, waiting for the CRC forever.

Fixes: 8b6a361b8c48 ("rdma/siw: receive path")
Reported-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Tested-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Bernard Metzler &lt;bmt@zurich.ibm.com&gt;
Link: https://lore.kernel.org/r/20220920081202.223629-1-bmt@zurich.ibm.com
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA/siw: Pass a pointer to virt_to_page()</title>
<updated>2022-09-04T07:21:59Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2022-09-02T21:59:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0d1b756acf60da5004c1e20ca4462f0c257bf6e1'/>
<id>urn:sha1:0d1b756acf60da5004c1e20ca4462f0c257bf6e1</id>
<content type='text'>
Functions that work on a pointer to virtual memory such as
virt_to_pfn() and users of that function such as
virt_to_page() are supposed to pass a pointer to virtual
memory, ideally a (void *) or other pointer. However since
many architectures implement virt_to_pfn() as a macro,
this function becomes polymorphic and accepts both a
(unsigned long) and a (void *).

If we instead implement a proper virt_to_pfn(void *addr)
function the following happens (occurred on arch/arm):

drivers/infiniband/sw/siw/siw_qp_tx.c:32:23: warning: incompatible
  integer to pointer conversion passing 'dma_addr_t' (aka 'unsigned int')
  to parameter of type 'const void *' [-Wint-conversion]
drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: warning: passing argument
  1 of 'virt_to_pfn' makes pointer from integer without a cast
  [-Wint-conversion]
drivers/infiniband/sw/siw/siw_qp_tx.c:538:36: warning: incompatible
  integer to pointer conversion passing 'unsigned long long'
  to parameter of type 'const void *' [-Wint-conversion]

Fix this with an explicit cast. In one case where the SIW
SGE uses an unaligned u64 we need a double cast modifying the
virtual address (va) to a platform-specific uintptr_t before
casting to a (void *).

Fixes: b9be6f18cf9e ("rdma/siw: transmit path")
Cc: linux-rdma@vger.kernel.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20220902215918.603761-1-linus.walleij@linaro.org
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA/siw: Add missing Kconfig selections</title>
<updated>2022-09-01T07:12:01Z</updated>
<author>
<name>Tom Talpey</name>
<email>tom@talpey.com</email>
</author>
<published>2022-08-31T16:30:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fc5e1acf6ade49da06c6a74b0c3fa903e0c9503a'/>
<id>urn:sha1:fc5e1acf6ade49da06c6a74b0c3fa903e0c9503a</id>
<content type='text'>
The SoftiWARP Kconfig is missing "select" for CRYPTO and CRYPTO_CRC32C.

In addition, it improperly "depends on" LIBCRC32C, this should be a
"select", similar to net/sctp and others. As a dependency, SIW fails
to appear in generic configurations.

Link: https://lore.kernel.org/r/d366bf02-3271-754f-fc68-1a84016d0e19@talpey.com
Signed-off-by: Tom Talpey &lt;tom@talpey.com&gt;
Acked-by: Bernard Metzler &lt;bmt@zurich.ibm.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA/siw: Fix duplicated reported IW_CM_EVENT_CONNECT_REPLY event</title>
<updated>2022-07-18T11:20:52Z</updated>
<author>
<name>Cheng Xu</name>
<email>chengyou@linux.alibaba.com</email>
</author>
<published>2022-07-14T01:30:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3056fc6c32e613b760422b94c7617ac9a24a4721'/>
<id>urn:sha1:3056fc6c32e613b760422b94c7617ac9a24a4721</id>
<content type='text'>
If siw_recv_mpa_rr returns -EAGAIN, it means that the MPA reply hasn't
been received completely, and should not report IW_CM_EVENT_CONNECT_REPLY
in this case. This may trigger a call trace in iw_cm. A simple way to
trigger this:
 server: ib_send_lat
 client: ib_send_lat -R &lt;server_ip&gt;

The call trace looks like this:

 kernel BUG at drivers/infiniband/core/iwcm.c:894!
 invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
 &lt;...&gt;
 Workqueue: iw_cm_wq cm_work_handler [iw_cm]
 Call Trace:
  &lt;TASK&gt;
  cm_work_handler+0x1dd/0x370 [iw_cm]
  process_one_work+0x1e2/0x3b0
  worker_thread+0x49/0x2e0
  ? rescuer_thread+0x370/0x370
  kthread+0xe5/0x110
  ? kthread_complete_and_exit+0x20/0x20
  ret_from_fork+0x1f/0x30
  &lt;/TASK&gt;

Fixes: 6c52fdc244b5 ("rdma/siw: connection management")
Link: https://lore.kernel.org/r/dae34b5fd5c2ea2bd9744812c1d2653a34a94c67.1657706960.git.chengyou@linux.alibaba.com
Signed-off-by: Cheng Xu &lt;chengyou@linux.alibaba.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>RDMA: remove useless condition in siw_create_cq()</title>
<updated>2022-07-18T09:27:28Z</updated>
<author>
<name>Andrey Strachuk</name>
<email>strochuk@ispras.ru</email>
</author>
<published>2022-07-11T15:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aeea6cc067525103301fb7a6ba5c861b631f2086'/>
<id>urn:sha1:aeea6cc067525103301fb7a6ba5c861b631f2086</id>
<content type='text'>
Comparison of 'cq' with NULL is useless since
'cq' is a result of container_of and cannot be NULL
in any reasonable scenario.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
Link: https://lore.kernel.org/r/20220711151251.17089-1-strochuk@ispras.ru
Signed-off-by: Andrey Strachuk &lt;strochuk@ispras.ru&gt;
Acked-by: Bernard Metzler &lt;bmt@zurich.ibm.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v5.18' into rdma.git for-next</title>
<updated>2022-05-24T15:40:28Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@nvidia.com</email>
</author>
<published>2022-05-24T15:40:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a6f844da39af8046798ba5cadf92a0c54da80b26'/>
<id>urn:sha1:a6f844da39af8046798ba5cadf92a0c54da80b26</id>
<content type='text'>
Following patches have dependencies.

Resolve the merge conflict in
drivers/net/ethernet/mellanox/mlx5/core/main.c by keeping the new names
for the fs functions following linux-next:

https://lore.kernel.org/r/20220519113529.226bc3e2@canb.auug.org.au/

Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>RDMA/siw: Enable siw on tunnel devices</title>
<updated>2022-05-11T16:52:38Z</updated>
<author>
<name>Bernard Metzler</name>
<email>bmt@zurich.ibm.com</email>
</author>
<published>2022-05-10T14:39:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a2d36b02c15d49cec1f5a44c5123bb7f3bdfea8e'/>
<id>urn:sha1:a2d36b02c15d49cec1f5a44c5123bb7f3bdfea8e</id>
<content type='text'>
Enable siw to attach to tunnel devices, there is no reason not to, siw
properly generates all packets already.

Link: https://lore.kernel.org/r/20220510143917.23735-1-bmt@zurich.ibm.com
Tested-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Bernard Metzler &lt;bmt@zurich.ibm.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>RDMA/siw: Fix a condition race issue in MPA request processing</title>
<updated>2022-05-04T23:59:54Z</updated>
<author>
<name>Cheng Xu</name>
<email>chengyou@linux.alibaba.com</email>
</author>
<published>2022-04-24T08:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ef91271c65c12d36e4c2b61c61d4849fb6d11aa0'/>
<id>urn:sha1:ef91271c65c12d36e4c2b61c61d4849fb6d11aa0</id>
<content type='text'>
The calling of siw_cm_upcall and detaching new_cep with its listen_cep
should be atomistic semantics. Otherwise siw_reject may be called in a
temporary state, e,g, siw_cm_upcall is called but the new_cep-&gt;listen_cep
has not being cleared.

This fixes a WARN:

  WARNING: CPU: 7 PID: 201 at drivers/infiniband/sw/siw/siw_cm.c:255 siw_cep_put+0x125/0x130 [siw]
  CPU: 2 PID: 201 Comm: kworker/u16:22 Kdump: loaded Tainted: G            E     5.17.0-rc7 #1
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
  Workqueue: iw_cm_wq cm_work_handler [iw_cm]
  RIP: 0010:siw_cep_put+0x125/0x130 [siw]
  Call Trace:
   &lt;TASK&gt;
   siw_reject+0xac/0x180 [siw]
   iw_cm_reject+0x68/0xc0 [iw_cm]
   cm_work_handler+0x59d/0xe20 [iw_cm]
   process_one_work+0x1e2/0x3b0
   worker_thread+0x50/0x3a0
   ? rescuer_thread+0x390/0x390
   kthread+0xe5/0x110
   ? kthread_complete_and_exit+0x20/0x20
   ret_from_fork+0x1f/0x30
   &lt;/TASK&gt;

Fixes: 6c52fdc244b5 ("rdma/siw: connection management")
Link: https://lore.kernel.org/r/d528d83466c44687f3872eadcb8c184528b2e2d4.1650526554.git.chengyou@linux.alibaba.com
Reported-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Reviewed-by: Bernard Metzler &lt;bmt@zurich.ibm.com&gt;
Signed-off-by: Cheng Xu &lt;chengyou@linux.alibaba.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
</feed>
