DPDK-dev Archive mirror
 help / color / mirror / Atom feed
From: "Tom Jones" <thj@freebsd.org>
To: "Bruce Richardson" <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] freebsd: Add support for multiple dpdk instances on FreeBSD
Date: Mon, 06 May 2024 16:34:04 +0100	[thread overview]
Message-ID: <ffd4cea9-05f1-4a90-b589-d6560603fe8e@app.fastmail.com> (raw)
In-Reply-To: <ZjUWM_tH7wg0bg95@bricha3-mobl1.ger.corp.intel.com>




>> on testing this out the biggest gap I see is that we need a documentation
>> update for it. In V3 can you please update the FreeBSD GSG doc with some
>> details about how to use this feature.
>> 
>> Also, on first run using testpmd, the application failed to start, as I was
>> missing a file-prefix option. At minimum I think the code needs to default
>> the file-prefix on BSD to "contigmem0", so that when running a standalone
>> app as before, it "just works". An idea for backward compatibility here
>> that may help us, is to omit the "0" for contigmem0 device. That would mean
>> that an older DPDK app will work with a newer kernel driver, and vice
>> versa.
>> 
>> Beyond that, I'm not sure how to get multiple processes working right now
>> (hence the doc update request!). When I run a second instance of DPDK on my
>> system with "--file-prefix=contigmem1", I get errors about the shared
>> config file in "/var/run/dpdk/rte/config".
>> 
> Inspiration struck me just after I hit send on this email. Removing the
> #ifdefs in eal_common_options.c allows me to run two processes in
> parallel just fine.
>
> I think we need to consider how to rework this to avoid using the
> file-prefix argument for the contigmem files. Not sure what a better scheme
> is, though. Do you have any ideas or suggestions on this from your
> experience doing up this patch?

Thanks for testing I'll fix these pieces up. I'll add a default to /dev/contigmem0, it'll fail to get the lock in normal use so it shouldn't be a problem.

I have done basically all of my testing through vpp, I can't say I've ever had much luck getting testpmd to do more than just start up. I resused the exist file-prefix interface as it allowed the smallest change to vpp[1]. I'm not normally a fan of such overloading, but it isn't so bad in this case.

I tried adding a compatible patch with the old /dev/contigmem and sysctl API, but it added a lot to the driver to handle a case I'm not sure we need.

I think my next steps should be:
- add a default for the file prefix
- documentation for the new option

with those I'll try to post a v3 patch this week.

- Tom

[1]: https://github.com/adventureloop/vpp/commit/d49be6e1958016c2d680c2e06e23c42988911aa7

      reply	other threads:[~2024-05-07  7:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 13:55 [PATCH] freebsd: Add support for multiple dpdk instances on FreeBSD Tom Jones
2024-05-03  9:46 ` Tom Jones
2024-05-03 13:03   ` Bruce Richardson
2024-05-03 13:12     ` Tom Jones
2024-05-03 13:24       ` Bruce Richardson
2024-05-03 16:25   ` Bruce Richardson
2024-05-03 16:48   ` Bruce Richardson
2024-05-03 16:52     ` Bruce Richardson
2024-05-06 15:34       ` Tom Jones [this message]

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=ffd4cea9-05f1-4a90-b589-d6560603fe8e@app.fastmail.com \
    --to=thj@freebsd.org \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).