From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH] nfp: copy pci info from pci to ethdev Date: Wed, 23 Mar 2016 08:51:36 -0700 Message-ID: <1458748296-15017-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org, Stephen Hemminger To: alejandro.lucero@netronome.com Return-path: Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id CF1532C09 for ; Wed, 23 Mar 2016 16:51:24 +0100 (CET) Received: by mail-pf0-f171.google.com with SMTP id 4so33612982pfd.0 for ; Wed, 23 Mar 2016 08:51:24 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The NFP driver (unlike other PCI devices) was not copying the pci info from the pci_dev to the eth_dev. This would make the driver_name be null (and other unset fields) when application uses dev_info_get. This was found by code review; do not have the hardware. Signed-off-by: Stephen Hemminger --- drivers/net/nfp/nfp_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 8810704..10ba0ec 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2319,6 +2319,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev) return 0; pci_dev = eth_dev->pci_dev; + rte_eth_copy_pci_info(eth_dev, pci_dev); + hw->device_id = pci_dev->id.device_id; hw->vendor_id = pci_dev->id.vendor_id; hw->subsystem_device_id = pci_dev->id.subsystem_device_id; -- 2.1.4