From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 65AFA2C48 for ; Mon, 21 Nov 2016 17:57:06 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id a20so549867wme.2 for ; Mon, 21 Nov 2016 08:57:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dreeQuq66LOo2PQlXaaiaOXtWGb9Jn2NE7oLus13W98=; b=FSNsadFsvbbt1tYo8ywrIuJ7vVgI22DJ913+trPuuiN7waiz3smpwDl+tTWHHm3G7h 8jx6QZ5Bsm5AaUC0yyp/6HudVmL7WZpraqybMdBwPB01BaJgsSh3wlvVrGTF0jWBy0cK +nCkUA8d6Apq7a53lkbI9uU0o6XNZldR3wM75KqONwYXBYFp8KyeH/p7PCDIaiz6xpCz htt9wM0PFl9FTV7XeLNpycWM4GGc/l6MnICcFDVN9nY+MbRMGnXki1ahlZx9cEGeJHLS Snz43V2vjHhEssicvvNchcqLC4bbFvKqWwAT5ziRJ+VZyRFvAxt1AbJXqIp4SP7/3DgQ CWGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=dreeQuq66LOo2PQlXaaiaOXtWGb9Jn2NE7oLus13W98=; b=OQwLSmj/3JjVaMWIPhOD7SE0kVh/Ab0rJcKUQdCAUpt0OmPaDHfHUmbC7oDRgZk6+C 29F0Nzd33vFTnHvYECs8RiyAjlUzsOpGt7V5pnvbsiMWzU+zegNYJyKK6QyXfY5nfAT/ zeDkUZ2lVTCOPWz/Gkk3rz8bPgO4thimkIm8xFcdf5c0nKNrG/BbpP0z/KlSvIHwYdRI QXo1aTJA9W6WosroVm6xpqOV3xlMgzXRyQ4pwwaV3xZEhdoXAQG/WPoBoNEmwfPRL2dh D1jVeL3r5PAZOrFfGgOvlDHMciWzSQeFgDhQEEzVjEb9GZ1ePqCRdhuaA0sbbWypgDTF w4jA== X-Gm-Message-State: AKaTC03b4jorowmFga06wFm1XaRdX6nAKKe0/gEWW7/q3aLk/bqjWXTHSS1WjUIYnE+IQA== X-Received: by 10.28.208.203 with SMTP id h194mr14842880wmg.45.1479747425998; Mon, 21 Nov 2016 08:57:05 -0800 (PST) Received: from weierstrass.local.net ([91.200.110.70]) by smtp.gmail.com with ESMTPSA id v202sm20536051wmv.8.2016.11.21.08.57.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Nov 2016 08:57:05 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Cc: shreyansh.jain@nxp.com, david.marchand@6wind.com Date: Mon, 21 Nov 2016 17:55:16 +0100 Message-Id: <1479747322-5774-2-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479747322-5774-1-git-send-email-jblunck@infradead.org> References: <1479747322-5774-1-git-send-email-jblunck@infradead.org> Subject: [dpdk-dev] [PATCH v2 2/8] ethdev: Helper to convert to struct rte_pci_device 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: Mon, 21 Nov 2016 16:57:06 -0000 Signed-off-by: Jan Blunck --- 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