From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 65E8EA0524; Wed, 2 Jun 2021 22:48:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CA51410E1; Wed, 2 Jun 2021 22:48:49 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 07FDA410E0 for ; Wed, 2 Jun 2021 22:48:48 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id jz2-20020a17090b14c2b0290162cf0b5a35so4132121pjb.5 for ; Wed, 02 Jun 2021 13:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a2soh8fY5GFr6Se6T8PwH3/W1HPFPprGb/9BwwR6XcM=; b=xIcBzogic0CkrY/SjcATC1lCtIsbjuJjMVUhrTPJJ3UCEqWr8tVGFmY7SFaq/MEZMd 3KpiZlHODgS7B5yAmKEPkc4b2PelpmNJmuU9ZI7h7DI2pYNQ/xTuHobHbD8EMB2xlnlO IrWYCF7jguWtmYKVDcg5MsrGAp4ofLtYY78rT3UNGRI+A3qoBjw87GEoDzrdpHiz+Nzr 3DH4QH3q0J/f0s+pQbbJwbVuc+spkxU8XogfQugLObopt6sdTYB/L0X/hbnBYt6s8jrj vxThcgpS/dBd+DrSK1JrVehRICo9Lyd71c1orOuA+BqDJuMm0fM+uqadgr5fEYUSYEIX atJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a2soh8fY5GFr6Se6T8PwH3/W1HPFPprGb/9BwwR6XcM=; b=ZOPcu72/8KHQS594M53RMdykXvw9CinCl/6sZ60Oy4n+fICZS+avpGAsbaqs8+UhC1 UW/QEoWGqUDhFtJKaW/eR1jUvOczeqyuQvNifB+4m0j8anGaAz13N51Y2AGM7572fzgw ulyIfPjIXBIqCQhdq/owBenUhpUESXwwRZYb2zLIOd0Y+UAdbSfepcwXVqCcHFP+8ADH seH/FwH2YjC1m991Kmu+gzsEMm/8ZqUnVRzlyUbqNlUgmYhdgB+bipSsvpEsa20oMb3q 40C9xvXIPtWykJkG8RdWhJG5nrgK8/aWBChrlb+BAR1BScb6fAbF10p9RyscEu3NZJMl CBxw== X-Gm-Message-State: AOAM530yRtKoSWfMte2rpSxYsaWpnrdhclcqZJg4rgGElA9H+mmGjLPh npcMMDMm9ajW23FTSJ/EP45nYg== X-Google-Smtp-Source: ABdhPJy/7715y3+K50zzC+8lA5G+QP/7IV3kCi8pUGmPSr7P94oAOIbPmnPRPbjFES1YChO5jLMR9A== X-Received: by 2002:a17:90a:e298:: with SMTP id d24mr15721912pjz.36.1622666926604; Wed, 02 Jun 2021 13:48:46 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id z9sm408137pfc.101.2021.06.02.13.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 13:48:46 -0700 (PDT) Date: Wed, 2 Jun 2021 13:48:43 -0700 From: Stephen Hemminger To: Ori Kam Cc: Ivan Malov , "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ray Kinsella , Neil Horman Message-ID: <20210602134843.7eed92d6@hermes.local> In-Reply-To: References: <20210527082504.3495-1-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: add support for testpmd-compliant flow rule dumping X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, 30 May 2021 07:27:32 +0000 Ori Kam 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?