From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: [PATCH v3 2/9] ethdev: Helper to convert to struct rte_pci_device Date: Tue, 20 Dec 2016 12:11:48 +0100 Message-ID: <1482232315-21626-3-git-send-email-jblunck@infradead.org> References: <1482232315-21626-1-git-send-email-jblunck@infradead.org> Cc: shreyansh.jain@nxp.com, david.marchand@6wind.com, stephen@networkplumber.org To: dev@dpdk.org Return-path: Received: from mail-wj0-f194.google.com (mail-wj0-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id BA551FB49 for ; Tue, 20 Dec 2016 12:12:18 +0100 (CET) Received: by mail-wj0-f194.google.com with SMTP id j10so27174754wjb.3 for ; Tue, 20 Dec 2016 03:12:18 -0800 (PST) In-Reply-To: <1482232315-21626-1-git-send-email-jblunck@infradead.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Jan Blunck Acked-by: Shreyansh Jain --- lib/librte_ether/rte_ethdev.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 9678179..3adbb2b 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1644,6 +1644,12 @@ struct rte_eth_dev { uint8_t attached; /**< Flag indicating the port is attached */ } __rte_cache_aligned; +/** + * @internal + * Helper for drivers that need to convert from rte_eth_dev to rte_pci_device. + */ +#define ETH_DEV_PCI_DEV(ptr) ((ptr)->pci_dev) + struct rte_eth_dev_sriov { uint8_t active; /**< SRIOV is active with 16, 32 or 64 pools */ uint8_t nb_q_per_pool; /**< rx queue number per pool */ -- 2.7.4