On Fri, May 03, 2024 at 05:48:05PM +0100, Bruce Richardson wrote: > On Fri, May 03, 2024 at 09:46:15AM +0000, Tom Jones wrote: > > Add support to the contigmem module on FreeBSD for multiple concurrent > > files, this enables running multiple dpdk instances with the nic_uio > > driver. > > > > Add relevant parts in dpdk to support this. > > > > Signed-off-by: Tom Jones <t...@freebsd.org> > > --- > > config/rte_config.h | 2 + > > kernel/freebsd/contigmem/contigmem.c | 225 ++++++++++++++++++--------- > > lib/eal/common/eal_common_options.c | 2 + > > lib/eal/freebsd/eal.c | 12 ++ > > lib/eal/freebsd/eal_hugepage_info.c | 12 +- > > lib/eal/freebsd/eal_memory.c | 3 +- > > 6 files changed, 180 insertions(+), 76 deletions(-) > > > Hi Tom, > > 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, /Bruce