From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id B6E6B2C4A for ; Wed, 5 Jul 2017 15:16:45 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4F8EE206F2; Wed, 5 Jul 2017 09:16:45 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 05 Jul 2017 09:16:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=v+cBEbhpnPC3q9+ b1rHpIZjGQ2hWmfpcZRFieiGFe+0=; b=sqpdkOM27QPcmqJo8AP1XRHG5piKXJ6 NqRUBJ33o7yrl+a3k2uECkGm/dgsrXm3xRxme7Olq6iN6FWmNU4ncC9QFy3PXE9o IcSFkLe1WWHRLYXOPnl7jIIgUZiheCvE/eWTgo3DlaHVW2UFjhYvoxJ3G8haL/e6 syyYPJTGmK6U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=v+cBEbhpnPC3q9+b1rHpIZjGQ2hWmfpcZRFieiGFe+0=; b=d98q+vf+ 2ei0LxzdOUieYVxsXSPblhcF2cYX05B191JRPKL7mM15DD+UAKj6UpIkY+WVvIHK MYNnmWF4mv9Cd2Sp4db/CIPk8E201hPYQdMbxnc3FIOZ/fAsQ2mwMWuFom/iYgM8 wU7le1W68CYtbwgTbuamWAHDKZQKC1MAxackKKQ/qRvOre2SlGu5Ghl1OzAm7edT 9LPt2f+LqSIGompbV1Y4JOZWagIh+BYjAeIReHYq5dq6bN1ueMGxJJUg7oLw8xpA LXUHg8VycUJW9gq/FP+2+1XImqdLRJraago45t1QPDjrpI6M+iyluP+2wta0dTeo +KmV2/+NZPfDmA== X-ME-Sender: X-Sasl-enc: dQw9AdloPY2ZLHU15w7NV9mFWTsvppmOsmRD8ps07YOX 1499260605 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0013624251; Wed, 5 Jul 2017 09:16:44 -0400 (EDT) From: Thomas Monjalon To: Daniel Verkamp Cc: dev@dpdk.org, Stephen Hemminger Date: Wed, 05 Jul 2017 15:16:44 +0200 Message-ID: <2177838.ELAm1vN6DR@xps> In-Reply-To: <20170623182032.28734-1-daniel.verkamp@intel.com> References: <20170623172941.14423-1-daniel.verkamp@intel.com> <20170623182032.28734-1-daniel.verkamp@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] pci: pad vendor and device ID to 4 digits X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 13:16:46 -0000 23/06/2017 20:20, Daniel Verkamp: > Some PCI vendor and device IDs have leading zeros. > > Signed-off-by: Daniel Verkamp > --- > --- a/lib/librte_eal/common/include/rte_pci.h > +++ b/lib/librte_eal/common/include/rte_pci.h > @@ -68,6 +68,9 @@ const char *pci_get_sysfs_path(void); > /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */ > #define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 > > +/** Formatting string for PCI vendor and device ID: Ex: 1234:5678 */ > +#define PCI_ID_PRI_FMT "%.4" PRIx16 ":%.4" PRIx16 Why not printing the whole PCI infos with domain and function? Note: public macros should be prefixed with RTE_