Thread (16 messages) 16 messages, 6 authors, 2023-03-23

Re: [dpdk-dev] [RFC PATCH] ethdev: add support for testpmd-compliant flow rule dumping

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-06-02 20:48:50

On Sun, 30 May 2021 07:27:32 +0000
Ori Kam [off-list ref] wrote:
quoted
+	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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help