[dpdk-dev] [RFC PATCH] ethdev: add support for testpmd-compliant flow rule dumping
Stephen Hemminger
stephen at networkplumber.org
Wed Jun 2 22:48:43 CEST 2021
On Sun, 30 May 2021 07:27:32 +0000
Ori Kam <orika at nvidia.com> wrote:
> > + retv = snprintf(buf + *nb_chars_total, write_size_max,
> > + " %02x:%02x:%02x:%02x:%02x:%02x",
> > + ab[0], ab[1], ab[2], ab[3], ab[4], ab[5]);
please use existing rte_ether_format_addr instead of another copy of it.
> +static int
> +rte_flow_snprint_hex32(char *buf, size_t buf_size, size_t *nb_chars_total,
> + const void *value_ptr)
> +{
> + SNPRINT(uint32_t, " 0x%08x");
> +}
Why not use "%#"PRIx32 to be safe against sizes?
More information about the dev
mailing list