> From: Stephen Hemminger [mailto:step...@networkplumber.org]
> Sent: Wednesday, 8 November 2023 19.36
> 
> 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.
> 
> Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
> Reported-by: Isaac Boukris <ibouk...@gmail.com>
> Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
> ---

Minor detail: getpid() returns int, so prefer %d over %u.

[...]

>                       rte_exit(EXIT_FAILURE,
>                               "Packet dump enable on %u:%s failed %s\n",
>                               intf->port, intf->name,
> -                             rte_strerror(-ret));
> +                             rte_strerror(rte_errno));

This bugfix (the line above, not the patch itself) supports Tyler's proposal to 
standardize on returning -1 with rte_errno set on failure, instead of some 
functions returning -errno. Our dual convention for function return values will 
cause many bugs like this.

With %u or %d,

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

Reply via email to