DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ori Kam <orika@nvidia.com>
Cc: Ivan Malov <ivan.malov@oktetlabs.ru>,
	"dev@dpdk.org" <dev@dpdk.org>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: add support for testpmd-compliant flow rule dumping
Date: Wed, 2 Jun 2021 13:48:43 -0700	[thread overview]
Message-ID: <20210602134843.7eed92d6@hermes.local> (raw)
In-Reply-To: <BL1PR12MB53352FFAB92FFDFE9E7659F6D6209@BL1PR12MB5335.namprd12.prod.outlook.com>

On Sun, 30 May 2021 07:27:32 +0000
Ori Kam <orika@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?

  parent reply	other threads:[~2021-06-02 20:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27  8:25 Ivan Malov
2021-05-30  7:27 ` Ori Kam
2021-05-31  2:28   ` Stephen Hemminger
2021-06-01 14:17     ` Ivan Malov
2021-06-01 15:10       ` Stephen Hemminger
2021-06-01 14:08   ` Ivan Malov
2021-06-02 13:32     ` Ori Kam
2021-06-02 13:49       ` Andrew Rybchenko
2021-06-03  8:25         ` Ori Kam
2021-06-03  8:43           ` Andrew Rybchenko
2021-06-03  9:27             ` Ori Kam
2023-03-23 12:54               ` Ferruh Yigit
2021-06-02 20:48   ` Stephen Hemminger [this message]
2021-06-14 12:42 ` Singh, Aman Deep
2021-06-17  8:11   ` Singh, Aman Deep
2021-07-02 10:20   ` Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210602134843.7eed92d6@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ivan.malov@oktetlabs.ru \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).