[v3] dumpcap: fix mbuf pool ring type
Checks
Commit Message
The internal buffer pool used for copies of mbufs captured
needs to be thread safe. If capturing on multiple interfaces
or multiple queues, the same pool will be used (consumers).
And if the capture ring gets full, the queues will need
to put back the capture buffer which leads to multiple producers.
Bugzilla ID: 1271
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
v3 - just change ops, don't use default pool ops
app/dumpcap/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, 8 November 2023 18.48
>
> The internal buffer pool used for copies of mbufs captured
> needs to be thread safe. If capturing on multiple interfaces
> or multiple queues, the same pool will be used (consumers).
> And if the capture ring gets full, the queues will need
> to put back the capture buffer which leads to multiple producers.
>
> Bugzilla ID: 1271
> Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
09/11/2023 08:21, Morten Brørup:
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Wednesday, 8 November 2023 18.48
> >
> > The internal buffer pool used for copies of mbufs captured
> > needs to be thread safe. If capturing on multiple interfaces
> > or multiple queues, the same pool will be used (consumers).
> > And if the capture ring gets full, the queues will need
> > to put back the capture buffer which leads to multiple producers.
> >
> > Bugzilla ID: 1271
> > Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Applied, thanks.
@@ -694,7 +694,7 @@ static struct rte_mempool *create_mempool(void)
mp = rte_pktmbuf_pool_create_by_ops(pool_name, num_mbufs,
MBUF_POOL_CACHE_SIZE, 0,
data_size,
- rte_socket_id(), "ring_mp_sc");
+ rte_socket_id(), "ring_mp_mc");
if (mp == NULL)
rte_exit(EXIT_FAILURE,
"Mempool (%s) creation failed: %s\n", pool_name,