On Mon, 2 Oct 2023 10:42:53 +0200 Morten Brørup <m...@smartsharesystems.com> wrote:
> > Switching to rte_pktmbuf_pool_create() still leaves the user with the > > possibility to shoot himself in the foot (I was thinking of setting > > some --mbuf-pool-ops-name EAL option). > > > > This application has explicit requirements in terms of concurrent > > access (and I don't think the mempool library exposes per driver > > capabilities in that regard). > > The application was enforcing the use of mempool/ring so far. > > > > I think it is safer to go with an explicit > > rte_pktmbuf_pool_create_by_ops(... "ring_mp_mc"). > > WDYT? > > <feature creep> > Or perhaps one of "ring_mt_rts" or "ring_mt_hts", if any of those mbuf pool > drivers are specified on the command line; otherwise fall back to > "ring_mp_mc". > > Actually, I prefer Stephen's suggestion of using the default mbuf pool > driver. The option is there for a reason. > > However, David is right: We want to prevent the user from using a > thread-unsafe mempool driver in this use case. > > And I guess there might be other use cases than this one, where a thread-safe > mempool driver is required. So adding a generalized function to get the > "upgraded" (i.e. thread safe) variant of a mempool driver would be nice. > </feature creep> If the user overrides the default mbuf pool type, then it will need to be thread safe for the general case of driver as well (or they are on single cpu). I think the patch should be applied as is.