From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D9EFA0C43 for ; Fri, 26 Nov 2021 20:49:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2499B40C35; Fri, 26 Nov 2021 20:49:53 +0100 (CET) Received: from mail-vk1-f178.google.com (mail-vk1-f178.google.com [209.85.221.178]) by mails.dpdk.org (Postfix) with ESMTP id C6B1F406FF for ; Fri, 26 Nov 2021 20:49:51 +0100 (CET) Received: by mail-vk1-f178.google.com with SMTP id b192so6645673vkf.3 for ; Fri, 26 Nov 2021 11:49:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8JDHS9wR2w5hVCv2+o0huqUvcmAjnzlqsKupmigBLgw=; b=IktMFJPh7Omd0/CIc/NVW9NqIfplzHwx37umto1CAo8X/Zccpooj9VR20uK1FSqHvQ nXFKfhwXRrzyRZ0S7ltP6yNSPkEo/diLPlEZ1rfXlfJZ0HKbE0OKK8EZ3Usi2+vcIBkn 51pYl3jUmdrEGOwtoBxOblrgO09vLKDoJ3hpwRVquPoYXkuZZrNIaj7m34tPg+BakUt9 573MU6gA1mw+BoqFnz5S9Py7/K6G9y8OtxpMtm6cvEKka5++pVCD82bk1X4sJWF5DQU7 nDdpwbqjBXR5OIAb93aP6BuRM8PVxhcT+Rjmzxbyf4MdkumdeS1dJq9edUgT1PXbRfTG kCRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8JDHS9wR2w5hVCv2+o0huqUvcmAjnzlqsKupmigBLgw=; b=X1PgLMC/O6/4r9BS57MkQJnz5DHAF5mS/b9YlFHkYOBDMKAJMk5FUA5/GUlig34Guz 3ASoK3wP+0fDiNYlRIShYJgcZzl1AR1cbt4TEITz35e+1Ht2tJjpJ/qW6FdpkZ3sUuuv mrQV0iAyfQSeH4vf0lFP8puzrk4MwUELiXzjT6Ju9Qbi8apjP0F1ONUXp1qQAAMnGqD1 hFYQ0xGmqSN3IVFkWGy1KqhEjjrBvS5U+106Jd5vWZzIgFgx1/sn0nD6ZTnwjnCNLXDw BO8XjXQOVUV0qwruHSFxzvCQHFbvGbQ6RYpSbdf6RIPqQgBmLk4yFZQArVLrzR9zZL5C iTig== X-Gm-Message-State: AOAM531k2I1X504Hwl9edvi/zIkjvDo38r9sprzftRfHa/8mz8mdWc/P GX60zDuPoGr5gGbsTx9uEG0JJmovtaeVJwwYHAE= X-Google-Smtp-Source: ABdhPJyRcs+QMZgwR4Hwq6z+qMUDDjHmSPnJFzayiScmjCarnDU4unZVrK0ico1J/NgU1UQ2vRUofgObI173mDdDUxs= X-Received: by 2002:a1f:e605:: with SMTP id d5mr16740765vkh.39.1637956190859; Fri, 26 Nov 2021 11:49:50 -0800 (PST) MIME-Version: 1.0 References: <20211126092236.7a16dab0@hermes.local> In-Reply-To: <20211126092236.7a16dab0@hermes.local> From: Staffan Wiklund Date: Fri, 26 Nov 2021 20:49:39 +0100 Message-ID: Subject: Re: Impact on DPDK application when using the multi-process feature? To: Stephen Hemminger Cc: users Content-Type: multipart/alternative; boundary="000000000000e9f48305d1b6649f" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --000000000000e9f48305d1b6649f Content-Type: text/plain; charset="UTF-8" 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 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. > --000000000000e9f48305d1b6649f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello

Stephen, thanks for yo= ur answer.

>Which of the rte_eth_xxx functions = are you asking about?

<= div>I wonder if the following rte_eth_xxx function= s 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_set= up
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_con= figure
rte_eth_dev_count_avail


I also would like to ask if a secondary process can create and free m= emory pools using for example the following functions:
rte_pktmbu= f_pool_create
rte_mempool_create
rte_mempool_create_emp= ty
rte_mempool_set_ops_byname
rte_mempool_populate_defa= ult
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 d= evices and memory pools so I wonder if these applications need to be modifi= ed in order to be used as secondary processes.

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

Regards
Staffan


Den fre 26 nov. 2021 kl 18:22 skrev Stephen Hemminger <stephen@networkplumber.org>= ;:
On Fri, 26 No= v 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 D= PDK
> multi-process feature?
>
> If a primary process and the secondary processes all execute on differ= ent
> CPU cores,
> what limitations are there on the secondary processes when using DPDK<= br> > functions
> for initialization of EAL and for handling ethernet devices?
>
> That is, is a secondary process allowed to call the rte_eal_init funct= ion
> 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 functi= ons?
>
> The reason for these questions is that I would like to execute 3-4 DPD= K
> applications that
> now executes as stand-alone applications as one primary process and th= e
> other
> applications as secondary processes. All these processes will share me= mory
> 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 a= nd 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 u= se cases.
--000000000000e9f48305d1b6649f--