title: How to do IPC with a DPDK process involved?
body: <p>My goal is to create a DPDK app which will act as a middle-man between a virtual machine manager (which in my case is an userspace process) and the NIC Hardware.</p>
  <p>So far I have tried to do something on a smaller scale. Instead of using the VMM, I created a dummy process using C language.
  I managed to &quot;bind&quot; the dummy process to the DPDK process using named semaphores and shared memory.
  Basically in this little demo, the DPDK app is reading from the RX buffer and puts the content on the shared memory. Then the dummy process gets the data and prints it to stdout.</p>
  <p>All of the DPDK support for multi process communication is targeting the specific case where <em><strong>both apps are using the dpdk's libraries.</strong></em>
  I am wondering if there is some sort of support for the case where <strong>one app is not using those libraries.</strong>
  Why? Because the VMM is written in Rust and I do not know how to add DPDK libraries in Rust.</p>
  <p>What do you think it would be the most efficient way of communication?
  I was thinking if it is possible to put the mempool inside the shared memory and access the mbufs directly from the dummy process.</p>
  <p>I am currently using dpdk 20.11
  Ubuntu 20.04</p>
  <p>Thank you!</p>
  <p>UPDATE 1:</p>
  <blockquote>
  <p>is your question Can I interface/interact DPDK application with non
  DPDK application</p>
  </blockquote>
  <p>What I am actually struggling to find is this: how do I efficiently move data received on RX buffer to a non dpdk app?</p>
  <p>My current approach is this: <a href="https://imgur.com/a/cF2lq29" rel="nofollow noreferrer">https://imgur.com/a/cF2lq29</a></p>
  <p>That is the main logic loop for a dpdk app which gets data on RX buffer and sends it to the &quot;non dpdk app&quot;.</p>
  <p>How it is happening:</p>
  <ol>
  <li>Read data from RX buffer.</li>
  <li>Wait untill the non dpdk app says &quot;I am not using the shared memory, you can write on it&quot;</li>
  <li>Write on the shared memory (nb_rx is written instead of the whole packet just for simplicity)</li>
  <li>Signal the &quot;non dpdk&quot; app that now the Shared Memory is available for being read.</li>
  </ol>
  <p>As one can see, it is not quite efficient and I am afraid my synchronization method will create a bottleneck.</p>
  <p>So this makes me wonder &quot;are there any better, by the book ways, of accomplishing this communication?</p>