From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=5T7uiZ3FhKKZ/UABWSIvJgHAVk4AbY08f+1ANyMMit0=; b=gd7kl5KN4ZbCGkPyz13OId/Hg+Wng0xvgwwNcBtAE+jtXyBUwd1mQOxOJK0hJmdq7C L/U1mUZgn7KEN0Bni77bSHAzs4P+AMNgGfEyZuxoRvW0eUO/Q57sxxvjzcZuss6eBY8m ZXjvOXPtB41G5K1dA4c/rSt+o03hzY5esl/eSM4VFp5rHHe0aeyfvZm1OUCW8qsT9mMQ jBeRMTmYtzMH3U96bjDCCYag6l/BAqyu2EDZc2jaFPnkZQtfh65iqj+PVEOV9/Xuxwco RZuYhTa+qCD5XxLc9Yxfl3bBJ8FDA/WQzMRVhbRVh0lBi/xGaMorHEAy31DtzAblK2l4 nioA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5T7uiZ3FhKKZ/UABWSIvJgHAVk4AbY08f+1ANyMMit0=; b=S9+B7BaoPInt5Hsxi+M7nyqYqvkh5bJs8RfrJa+lm2a6U4pHFKdD57iIk2bkTmV0SL 3kUnzIlcN2XlE/nbbvvRtLrp3gEHlS9MHRjlwHjL6bVSewbn8KYF8tC6+e4Bj+NziRPV 5sodjcSeTdzfl8B08cU1CpNCJ1Y2aja2Bh/pWDTT1oGyrP1zxqOcmqDTLkaNH/7DXxZ5 gahYXz4/M6dVNmmo0cX1c/z/rNmJNp2U68Zs1R33gV23GvKjgLoCBWZePiWXP7od7Fzj 3FG8YOtbsOGRDj8nXo28sQMdXVOMHy8LYPDZ2jxRUZncx9NZah1A4pe3VLRWhzVxakNl x9dg== X-Gm-Message-State: AD7BkJJkLNsqdP/PZIzmae3V3CJq0EXSF6Enq2kkddNY/bE2PLFgD+nSv6Ga54sE/bYXSA== X-Received: by 10.98.10.29 with SMTP id s29mr5400504pfi.166.1458748284136; Wed, 23 Mar 2016 08:51:24 -0700 (PDT) Received: from xeon-e3.home.lan (static-50-53-65-230.bvtn.or.frontiernet.net. [50.53.65.230]) by smtp.gmail.com with ESMTPSA id yx1sm5136830pac.29.2016.03.23.08.51.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Mar 2016 08:51:23 -0700 (PDT) From: Stephen Hemminger To: alejandro.lucero@netronome.com Cc: dev@dpdk.org, Stephen Hemminger Date: Wed, 23 Mar 2016 08:51:36 -0700 Message-Id: <1458748296-15017-1-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] nfp: copy pci info from pci to ethdev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 15:51:25 -0000 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