From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=fK5+Ow+lSJ02VZguGtIeE/F070FNqzhzERuhoCuAeM8=; b=d2XqM/DMS3nUbvJKDbYqq6YAOQRSnn3BJc2RP9fQp4IAXsuuLSw4tnxVw3CGhPET6s yz7gDztN/AUcNVcOwyLdh6JtlnzrTQQBwIYNzXoW+PnUq96p6PRUz0zhPraU7NteDIVv 2W9MYmDIoxbHB6/+5Pv4UgcaYj1Ox34KQu0suBNw861tC1048RTiSrA1/Yt+iwQ9gGvy dnc0hhaHYS972VWjwcUFojstr0PAEVyll5mmlk0MpyIVlT9VXfFgxVq6HsMPJDR6/n1b NIxvgt3DMAJRYpJvipmKcEHNoqetFgKvMA7VL8FyDPuBD3YfRmwwbgHg6vT762pSu5zv pp/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=fK5+Ow+lSJ02VZguGtIeE/F070FNqzhzERuhoCuAeM8=; b=Lki/rQGUfPPVPMBLIIbiu0kKrD9uJaCXZSc+ZVXKPeQNQ6BqgISaFydZx5bsx3yx1q 3Rvoc9UQ+ZakWgWVo+oKuOxyMc0BB8aun34sdPpAMxoJp3LNrWPQin2ODVmaEQXtyLDu XJwIvm1ZcxtaKAgotfGHS3WaXY810eLbBgxvCtLAAXR4k9OYBz2irzvhBGbVCT5Z5tbS aHOxItzKmlPQ1DgheT7ShsVCcDU0so0GCszWwLQqAK5hNvNXEPHhElityRf/nh0Zny4r 1sxNi6F/H2DRM9AEOpdq1dBfQMIkHRkrS0z5vEs0MuxjdoOs52iDLtPG57cp31C8Thiz 92qA== X-Gm-Message-State: AIkVDXIdRYWTO/rbwZYsqCg8JCIZwA/FEjoMhiJYMylrkKmxzwoG93hd5TR2w23J7Pspwg== X-Received: by 10.194.97.8 with SMTP id dw8mr17516373wjb.84.1482232338253; Tue, 20 Dec 2016 03:12:18 -0800 (PST) Received: from weierstrass.local.net ([91.200.109.169]) by smtp.gmail.com with ESMTPSA id q65sm21527756wmd.6.2016.12.20.03.12.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2016 03:12:16 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Cc: shreyansh.jain@nxp.com, david.marchand@6wind.com, stephen@networkplumber.org Date: Tue, 20 Dec 2016 12:11:48 +0100 Message-Id: <1482232315-21626-3-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482232315-21626-1-git-send-email-jblunck@infradead.org> References: <1482232315-21626-1-git-send-email-jblunck@infradead.org> Subject: [dpdk-dev] [PATCH v3 2/9] ethdev: Helper to convert to struct rte_pci_device 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: Tue, 20 Dec 2016 11:12:18 -0000 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