Skip to content

Commit

Permalink
app/dumpcap: fix mbuf pool ring type
Browse files Browse the repository at this point in the history
[ upstream commit 27a26d65f8039ec38a49932c4bb73801b4fd62b8 ]

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: cbb4414 ("app/dumpcap: add new packet capture application")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
  • Loading branch information
shemminger authored and kevintraynor committed Nov 16, 2023
1 parent aa40722 commit ac4382d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/dumpcap/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ static struct rte_mempool *create_mempool(void)
mp = rte_pktmbuf_pool_create_by_ops(pool_name, num_mbufs,
MBUF_POOL_CACHE_SIZE, 0,
rte_pcapng_mbuf_size(snaplen),
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,
Expand Down

0 comments on commit ac4382d

Please sign in to comment.