[PATCH v4 2/5] dumpcap: allow multiple invocations
Morten Brørup
mb at smartsharesystems.com
Thu Nov 9 19:30:12 CET 2023
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Thursday, 9 November 2023 18.34
>
> If dumpcap is run twice with each instance pointing a different
> interface, it would fail because of overlap in ring a pool names.
> Fix by putting process id in the name.
>
> It is still not allowed to do multiple invocations on the same
> interface because only one callback is allowed and only one copy
> of mbuf is done. Dumpcap will fail with error in this case:
>
> pdump_prepare_client_request(): client request for pdump
> enable/disable failed
> EAL: Error - exiting with code: 1
> Cause: Packet dump enable on 0:net_null0 failed File exists
>
> Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
> Reported-by: Isaac Boukris <iboukris at gmail.com>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
[...]
> + snprintf(ring_name, sizeof(ring_name),
> + "dumpcap-%d", getpid());
Fixed - thank you.
[...]
> + snprintf(pool_name, sizeof(pool_name), "capture_%u", getpid());
Should change from %u to %d here too. ;-)
Either way,
Reviewed-by: Morten Brørup <mb at smartsharesystems.com>
More information about the dev
mailing list