From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f179.google.com (mail-ot0-f179.google.com [74.125.82.179]) by dpdk.org (Postfix) with ESMTP id B09E41094 for ; Thu, 23 Mar 2017 08:47:19 +0100 (CET) Received: by mail-ot0-f179.google.com with SMTP id i1so182175793ota.3 for ; Thu, 23 Mar 2017 00:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=2n8a2gBeCBTev1HJhXy/EDauTXlMelqClspN9N4xhcI=; b=cXW9hjnb5daLWjiooks0ZzLuAn2ZvrNAgKHNaIp/zuFtvHPJdVuCo9LWznaeavf30A 3No6BRirG7+NCG5jp0U0enayZFKz6poApMRs152+qsnTtghoReXLEGgfcTWcD5Q9n3ij lerFHutES1pBHMi6UGKt6BEIbZvIS0M/ihbIF2eSx0d+HaZAMJamZ820STJOQvz0xHpF QyS61fTj7xtfP2MNiiXBiyyRlhxJpfsqxW7CBE1oIJEWIKVaWKAnto7odIUJd+wiSPuG Gwex84+d55+2KoD5Nczb514yJrjalLSp8qCurEcIiYSKg2jYXkdX/2W+3I8F/n3h+iDG DQRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2n8a2gBeCBTev1HJhXy/EDauTXlMelqClspN9N4xhcI=; b=CjsKhVo5n2UmODyo+yKSq064Ky52YSlXapzoXnJXDIUJeS5aG9eucypaKl2T0RcqyP O4dBx1XSXEMzXRWzEhwT5Qao3FL2V633rbG4BuZh1WsLO9jYdRrrvYAq60ooUap5CoLn Gwe0rDG9flyX7+t/XpVOkKXuAFhEwDuscsFqo99nAlHy59ShNdZf529eey/8pL6i1tSs l8b9mvIYPyOx0VbzAMCZMEFWkvtc36Lk/J703BUbnRwH//INy9UB3/A4eWU0oiV05TtP dPhvNNuiSfe6x9vUuGYaD/4Wn+qDumRPvPHGStDj3TxAGeq/eqIqVGzgk3gEthpvBdWS e/Bg== X-Gm-Message-State: AFeK/H2b+ZsKUNimEEKVs8zrZWmf5V89h+7KRMfDTnBw1FA1OMwB7QSmVONnlLQvJDjchMlQDPhN41KMwlW/+g== X-Received: by 10.157.21.4 with SMTP id u4mr499010otf.229.1490255238583; Thu, 23 Mar 2017 00:47:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.25.226 with HTTP; Thu, 23 Mar 2017 00:47:18 -0700 (PDT) From: Mike Shang Date: Thu, 23 Mar 2017 15:47:18 +0800 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Getting pci id using port id with latest DPDK X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2017 07:47:20 -0000 Hi, I have legacy code that needs to get pci id using port id in order to make different config for different pci device. In the past, we can do that with a simple call to rte_eth_dev_info_get() and look into the pci_dev file in rte_eth_dev_info structure. But with latest DPDK, rte_eth_dev_info_get() no longer fills pci_dev after this commit ( http://dpdk.org/browse/dpdk/commit/lib/librte_ether/rte_ethdev.c?id=ae34410a8a8aff1b8382e16fcc89353648355be0 ) Looks like the developers wanted to decouple pci device from a general device. Under such condition, how can I get the needed pci id from port id ? I scan all function listed in rte_ethdev.h but didn't find such function. Maybe there an indirect to do that? as a last resort, I can patch the dpdk source code to make rte_eth_dev_info_get() fill pci_dev again but that may be the last thing I would consider.....