DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@6wind.com>
To: jean.tourrilhes@hpe.com
Cc: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/1] eal: Don't fail secondary if primary is missing tailqs
Date: Wed, 5 Oct 2016 09:58:01 +0200	[thread overview]
Message-ID: <CALwxeUtkPsQop3zr4RnS7Y8bwKzar6DaRxCPWCX_trgc4kMm_w@mail.gmail.com> (raw)
In-Reply-To: <20161004165930.GA2012@labs.hpe.com>

Hello,

On Tue, Oct 4, 2016 at 6:59 PM, Jean Tourrilhes <jt@labs.hpe.com> wrote:
> On Tue, Oct 04, 2016 at 02:11:39PM +0100, Sergio Gonzalez Monroy wrote:
>> The case you are trying to fix is, as an example, when your secondary app is
>> using LPM but your primary is not.
>> So basically with this patch, you are removing the tailq for LPM on
>> secondary and continuing as normal, is that the case?
>
>         The secondary can't use tailq types that the primary does not
> have, because they are shared across the shared memory.

I am not a "multi process" user but afaik the primary process is
responsible for filling the shared memory.
The secondary processes look at it.
So having unaligned processes can't work.


>         What happens is that the primary and secondary did not compile
> in the same list of tailq. See previous e-mail :
>                 http://dpdk.org/ml/archives/dev/2016-September/047329.html
>         The reason it's happening is that the secondary was not
> compiled with the DPDK build system, but with the build system of the
> application (in this case, Snort). Oubviously, porting the application
> to the DPDK build system is not practical, so we need to live with
> this case.
>         The build system of the application does not have all the
> subtelties of the DPDK build system, and ends up including *all* the
> constructors, wether they are used or not in the code. Moreover, they
> are included in a different order. Actually, by default the builds
> include no constructors at all (which is a big fail), so the library
> needs to be included with --whole-archive (see Snort DPDK
> instructions).

I thought you had unaligned binaries.
You are compiling only one binary ?


>> I am not convinced about this approach.
>
>         I agree that the whole constructor approach is flaky and my
> patch is only a band aid. Constructors should be entirely removed
> IMHO, and a more deterministic init method should be used instead of
> depending on linker magic.
>         Note that the other constructors happen to work right in my
> case, but that's probably pure luck. The list of mempool constructors
> happen to be the same and in the same order (order matters for mempool
> constructors). The app is not using spinlock, hash, crc and acl, so
> I did not look if the lists did match.


I am not sure Sergio is talking about the constructor approach.

Anyway, the constructors invocation order should not matter.
Primary and secondary processes build their local tailq entries list
in constructors (so far, I can't see how this is wrong).
"Later", each process updates this list with the actual pointer to the
lists by looking at the shared memory in rte_eal_init (calling
rte_eal_tailqs_init).

What matters is that secondary tailqs are a subset of the primary tailqs.


I still have some trouble understanding what you are trying to do.
As Sergio asked, can you come up with a simplified example/use case ?

Thanks.


-- 
David Marchand

  reply	other threads:[~2016-10-05  7:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 20:46 [dpdk-dev] [Bug] Static constructors considered evil Jean Tourrilhes
2016-09-22 21:17 ` [dpdk-dev] [PATCH 1/1] eal: Don't fail secondary if primary is missing tailqs Jean Tourrilhes
2016-10-04 13:11   ` Sergio Gonzalez Monroy
2016-10-04 16:59     ` Jean Tourrilhes
2016-10-05  7:58       ` David Marchand [this message]
2016-10-05 16:49         ` Jean Tourrilhes
2016-10-05 17:09           ` Thomas Monjalon
2016-10-05 17:34             ` Jean Tourrilhes
2016-10-05 17:47             ` [dpdk-dev] [PATCH v2] eal: don't " Jean Tourrilhes
2018-12-21 15:50               ` Ferruh Yigit
2018-11-12 23:33 [dpdk-dev] [PATCH 1/1] eal: Don't " Burdick, Cliff
2018-11-13  9:21 ` Thomas Monjalon
2018-11-13  9:39   ` Burakov, Anatoly
2018-11-13 15:45     ` Burdick, Cliff
2018-11-13 16:06       ` Thomas Monjalon
2018-11-13 16:38         ` Burdick, Cliff
2018-11-13 16:44           ` Thomas Monjalon
2018-11-13 22:08             ` Burdick, Cliff
2018-11-13 22:18               ` Thomas Monjalon
2018-11-13 23:42                 ` Burdick, Cliff
2018-11-14 11:47                   ` Bruce Richardson
2018-11-14 17:40                     ` Burdick, Cliff
2018-11-14 18:15                       ` Luca Boccassi
2018-11-14 18:24                         ` Burdick, Cliff
2018-11-15  9:33                           ` Luca Boccassi
2018-11-15 16:15                             ` Burdick, Cliff
2018-11-15 16:41                               ` Bruce Richardson
2018-11-15 16:55                                 ` Burdick, Cliff
2018-11-15 17:01                                   ` Richardson, Bruce
2018-11-15 17:05                                     ` Luca Boccassi
2018-11-15 17:17                                       ` Bruce Richardson
2018-11-15 17:36                                         ` Burdick, Cliff
2018-11-16 10:22                                           ` Bruce Richardson
2018-11-15 18:22                                         ` Luca Boccassi
2018-11-16 10:23                                           ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALwxeUtkPsQop3zr4RnS7Y8bwKzar6DaRxCPWCX_trgc4kMm_w@mail.gmail.com \
    --to=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=jean.tourrilhes@hpe.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).