From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id A305C374F for ; Mon, 1 May 2017 15:56:21 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3DC0F20A17; Mon, 1 May 2017 09:56:21 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 01 May 2017 09:56:21 -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=nfwq8UY5awNCxfl tQe6OtaB5DeKg0qW1NRgvY/ky/go=; b=mJk1yrHCW96CY+ZEcS6D0zbwNdqzMw5 YSnGEfrxYaurKYtCuaYAOv4lp0SURn7s3lHJO9gQlvo/hqJJ8Ej3umk3AF+UEV59 q9Eupcky62vqC1WWGYgqxBIWzvAsNq3F85Aj1LB1rhdHER4ZHywna+4JSQb+/tsG NiGIi8Go69Ww= 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=nfwq8UY5awNCxfltQe6OtaB5DeKg0qW1NRgvY/ky/go=; b=Lgv3wVXj Cn5PPJ5nsIhiEaMCM5E3pcQR1yaqyx5hiNBrJjHA1ueXWlPlQ0/Ovl8v1Zlc12mn S6+r7NPBdHn9mTFTgaD2FitONnX32WVJjmvk4z61fB7vG73IdcsaTa/r9yByf3wP TIBuxG2LsMLwWoho+r/AK3rH7q4Ew/Cl0N/awgUytJLmrAkptYNDnZp+VIf5Oo17 g3P1WpNDrQnvW+g09ta4HQLgr2yF2c4kwdT2gbsvHWX4FCPujtW8q1HxeIINxxIE ljI9ZnT10jpIB4AMB81g9XGYp7hO0qNt/2sU6arEAXayAJ4M5MGciyXbT3L27Wi1 9mnv6xRlzp/+Pw== X-ME-Sender: X-Sasl-enc: LgMpz5Bsuxy83oxQ2Fu/DFCXkmOEEgEj4E7XLm5dNxEK 1493646980 Received: from xps.localnet (245.114.118.80.rev.sfr.net [80.118.114.245]) by mail.messagingengine.com (Postfix) with ESMTPA id D3A227E354; Mon, 1 May 2017 09:56:20 -0400 (EDT) From: Thomas Monjalon To: Yulong Pei Cc: dev@dpdk.org, jingjing.wu@intel.com Date: Mon, 01 May 2017 15:56:18 +0200 Message-ID: <2267864.xljogAfNJv@xps> In-Reply-To: <1493181099-14232-1-git-send-email-yulong.pei@intel.com> References: <1493181099-14232-1-git-send-email-yulong.pei@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add bus info when display port info 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: Mon, 01 May 2017 13:56:21 -0000 26/04/2017 06:31, Yulong Pei: > Display pci device bus info when show port info. > > Signed-off-by: Yulong Pei > --- > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -469,6 +469,14 @@ port_infos_display(portid_t port_id) > print_ethaddr("MAC address: ", &mac_addr); > printf("\nDriver name: %s", dev_info.driver_name); > printf("\nConnect to socket: %u", port->socket_id); > + if (dev_info.pci_dev) > + printf("\nBus-info: %04x:%02x:%02x:%x", > + dev_info.pci_dev->addr.domain, > + dev_info.pci_dev->addr.bus, > + dev_info.pci_dev->addr.devid, > + dev_info.pci_dev->addr.function); > + else > + printf("\nBus-info: N/A"); The bus information must be managed in a more generic way. The field pci_dev will probably be removed in a next release.