doc: add limitation on MPRQ usage in multi-process app

Message ID 20220204031913.595195-1-akozyrev@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series doc: add limitation on MPRQ usage in multi-process app |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Alexander Kozyrev Feb. 4, 2022, 3:19 a.m. UTC
  MPRQ cannot be used in multi-process applications because of
externally attached MPRQ buffers. A callback is registered by
a primary process to free MPRQ buffers once they are no longer
needed. But this information is shared among all the processes.
The virtual address of the mlx5_mprq_buf_free_cb function is
different in a secondary process, which leads to a segmentation
fault. Document that MPRQ is not supported in a multi-process
app, since there is no way to find out if this is the one.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Raslan Darawsheh Feb. 9, 2022, 8:53 a.m. UTC | #1
Hi,
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Friday, February 4, 2022 5:19 AM
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>
> Subject: [PATCH] doc: add limitation on MPRQ usage in multi-process app
> 
> MPRQ cannot be used in multi-process applications because of
> externally attached MPRQ buffers. A callback is registered by
> a primary process to free MPRQ buffers once they are no longer
> needed. But this information is shared among all the processes.
> The virtual address of the mlx5_mprq_buf_free_cb function is
> different in a secondary process, which leads to a segmentation
> fault. Document that MPRQ is not supported in a multi-process
> app, since there is no way to find out if this is the one.
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Patch applied  to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index daa7f2affb..7ac997ac27 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -138,6 +138,9 @@  Limitations
 - For secondary process:
 
   - Forked secondary process not supported.
+  - MPRQ is not supported. Callback to free externally attached MPRQ buffer is sets
+    in a primary process, but has a different virtual address in a secondary process.
+    Calling a function at the wrong address leads to a segmentation fault.
   - External memory unregistered in EAL memseg list cannot be used for DMA
     unless such memory has been registered by ``mlx5_mr_update_ext_mp()`` in
     primary process and remapped to the same virtual address in secondary