DPDK usage discussions
 help / color / mirror / Atom feed
* Impact on DPDK application when using the multi-process feature?
@ 2021-11-26 12:27 Staffan Wiklund
  2021-11-26 17:22 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Staffan Wiklund @ 2021-11-26 12:27 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

Hello

I wonder if you please can help me with some questions regarding the DPDK
multi-process feature?

If a primary process and the secondary processes all execute on different
CPU cores,
what limitations are there on the secondary processes when using DPDK
functions
for initialization of EAL and for handling ethernet devices?

That is, is a secondary process allowed to call the rte_eal_init function
or any of
the rte_eth_xxx functions?
What will happen if a secondary process calls any of these DPDK functions?

The reason for these questions is that I would like to execute 3-4 DPDK
applications that
now executes as stand-alone applications as one primary process and the
other
applications as secondary processes. All these processes will share memory
which
shall be used to improve the speed of communication between the
applications.

The applications currently use DPDK for Ethernet based communication and I
would
like to learn what needs to be modified in order to be able to execute them
as a
primary and secondary processes using DPDK shared memory.

Best regards
Staffan

[-- Attachment #2: Type: text/html, Size: 1384 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Impact on DPDK application when using the multi-process feature?
  2021-11-26 12:27 Impact on DPDK application when using the multi-process feature? Staffan Wiklund
@ 2021-11-26 17:22 ` Stephen Hemminger
  2021-11-26 19:49   ` Staffan Wiklund
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2021-11-26 17:22 UTC (permalink / raw)
  To: Staffan Wiklund; +Cc: users

On Fri, 26 Nov 2021 13:27:40 +0100
Staffan Wiklund <staffan491@gmail.com> wrote:

> Hello
> 
> I wonder if you please can help me with some questions regarding the DPDK
> multi-process feature?
> 
> If a primary process and the secondary processes all execute on different
> CPU cores,
> what limitations are there on the secondary processes when using DPDK
> functions
> for initialization of EAL and for handling ethernet devices?
> 
> That is, is a secondary process allowed to call the rte_eal_init function
> or any of
> the rte_eth_xxx functions?


Secondary process has to call rte_eal_init() with secondary (or auto flag).
Which of the rte_eth_xxx functions are you asking about?

> What will happen if a secondary process calls any of these DPDK functions?
> 
> The reason for these questions is that I would like to execute 3-4 DPDK
> applications that
> now executes as stand-alone applications as one primary process and the
> other
> applications as secondary processes. All these processes will share memory
> which
> shall be used to improve the speed of communication between the
> applications.

Several applications do this.

> The applications currently use DPDK for Ethernet based communication and I
> would
> like to learn what needs to be modified in order to be able to execute them
> as a
> primary and secondary processes using DPDK shared memory.
> 
> Best regards
> Staffan

To be honest, my experience is that not all functions work on all drivers
with the multi-process model. The documentation mostly covers the ones that
don't but you have to be careful and test with particular drivers and use cases.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Impact on DPDK application when using the multi-process feature?
  2021-11-26 17:22 ` Stephen Hemminger
@ 2021-11-26 19:49   ` Staffan Wiklund
  0 siblings, 0 replies; 3+ messages in thread
From: Staffan Wiklund @ 2021-11-26 19:49 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: users

[-- Attachment #1: Type: text/plain, Size: 3143 bytes --]

Hello

Stephen, thanks for your answer.

>Which of the rte_eth_xxx functions are you asking about?

I wonder if the following rte_eth_xxx functions can be used in secondary
processes:
rte_eth_rx_burst
rte_eth_tx_burst
rte_eth_stats_reset
rte_eth_xstats_get
rte_eth_rx_queue_setup
rte_eth_tx_queue_setup
rte_eth_macaddr_getueue_setup
rte_eth_dev_set_mtu
rte_eth_dev_rx_queue_stop
rte_eth_dev_tx_queue_stop
rte_eth_dev_info_get
rte_eth_dev_get_name_by_port
rte_eth_dev_start
rte_eth_dev_socket_id
rte_eth_dev_configure
rte_eth_dev_count_avail


I also would like to ask if a secondary process can create and free memory
pools using for example the following functions:
rte_pktmbuf_pool_create
rte_mempool_create
rte_mempool_create_empty
rte_mempool_set_ops_byname
rte_mempool_populate_default
rte_mempool_free

The applications I would like to use for shared memory using the DPDK
multi-process use these rte_eth_xxx and rte memory pool functions for
handling
Ethernet devices and memory pools so I wonder if these applications need to
be modified in order to be used as secondary processes.

The NICs I plan to use are Intel 700 series (XL710 40GbE, XXV710 25 GbE)
and Mellanox ConnectX-4 Lx 25GbE, ConnectX-5 100 GbE and ConnectX-6 100 GbE.
Can these be used from both the primary and the secondary processes?

Regards
Staffan


Den fre 26 nov. 2021 kl 18:22 skrev Stephen Hemminger <
stephen@networkplumber.org>:

> On Fri, 26 Nov 2021 13:27:40 +0100
> Staffan Wiklund <staffan491@gmail.com> wrote:
>
> > Hello
> >
> > I wonder if you please can help me with some questions regarding the DPDK
> > multi-process feature?
> >
> > If a primary process and the secondary processes all execute on different
> > CPU cores,
> > what limitations are there on the secondary processes when using DPDK
> > functions
> > for initialization of EAL and for handling ethernet devices?
> >
> > That is, is a secondary process allowed to call the rte_eal_init function
> > or any of
> > the rte_eth_xxx functions?
>
>
> Secondary process has to call rte_eal_init() with secondary (or auto flag).
> Which of the rte_eth_xxx functions are you asking about?
>
> > What will happen if a secondary process calls any of these DPDK
> functions?
> >
> > The reason for these questions is that I would like to execute 3-4 DPDK
> > applications that
> > now executes as stand-alone applications as one primary process and the
> > other
> > applications as secondary processes. All these processes will share
> memory
> > which
> > shall be used to improve the speed of communication between the
> > applications.
>
> Several applications do this.
>
> > The applications currently use DPDK for Ethernet based communication and
> I
> > would
> > like to learn what needs to be modified in order to be able to execute
> them
> > as a
> > primary and secondary processes using DPDK shared memory.
> >
> > Best regards
> > Staffan
>
> To be honest, my experience is that not all functions work on all drivers
> with the multi-process model. The documentation mostly covers the ones that
> don't but you have to be careful and test with particular drivers and use
> cases.
>

[-- Attachment #2: Type: text/html, Size: 4273 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-26 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-26 12:27 Impact on DPDK application when using the multi-process feature? Staffan Wiklund
2021-11-26 17:22 ` Stephen Hemminger
2021-11-26 19:49   ` Staffan Wiklund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).