> From: Stephen Hemminger [mailto:step...@networkplumber.org]
> Sent: Wednesday, 8 November 2023 17.51
> 
> On Tue, 7 Nov 2023 18:38:32 +0100
> Morten Brørup <m...@smartsharesystems.com> wrote:
> 
> > > If user decides to use a thread unsafe mempool, wouldn't it break
> in
> > > every PMD as well.
> >
> > Yes, except if the application only uses one thread for packet
> processing. Then thread safety is not necessary.
> >
> 
> 
> If application only used single thread then single consumer pool would
> work fine
> for dumpcap. Only the primary thread would ever allocate. But both
> secondary and
> primary could be freeing mbuf.

I think it is an acceptable risk. Perhaps mention somewhere that dumpcap breaks 
the application if it uses non-thread safe mbuf ops.

Acked-by: Morten Brørup <m...@smartsharesystems.com>

Optionally, dumpcap could compare the return value of 
rte_mbuf_best_mempool_ops() [1] with the few known unsafe ops. However, this is 
probably going to be forgotten, if new non-thread safe mempool ops are ever 
added to DPDK.

[1]: 
https://elixir.bootlin.com/dpdk/latest/source/lib/mbuf/rte_mbuf_pool_ops.c#L88

Reply via email to