From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: [PATCH v4 08/10] eal: add virtual device arguments helper function Date: Mon, 6 Mar 2017 11:56:47 +0100 Message-ID: <1488797809-12917-9-git-send-email-jblunck@infradead.org> References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> Cc: david.marchand@6wind.com, shreyansh.jain@nxp.com, ferruh.yigit@intel.com To: dev@dpdk.org Return-path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 3B02D952 for ; Mon, 6 Mar 2017 11:57:12 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id z63so10862822wmg.2 for ; Mon, 06 Mar 2017 02:57:12 -0800 (PST) In-Reply-To: <1488797809-12917-1-git-send-email-jblunck@infradead.org> In-Reply-To: <1488018496-995-1-git-send-email-jblunck@infradead.org> References: <1488018496-995-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" This adds the rte_vdev_device_args() helper function to prepare for changing the virtual drivers probe() functions take a rte_vdev_device pointer instead of the name+args strings. Signed-off-by: Jan Blunck --- lib/librte_eal/common/include/rte_vdev.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index abdefab..81f6beb 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -54,6 +54,14 @@ rte_vdev_device_name(const struct rte_vdev_device *dev) return NULL; } +static inline const char * +rte_vdev_device_args(const struct rte_vdev_device *dev) +{ + if (dev && dev->device.devargs) + return dev->device.devargs->args; + return ""; +} + /** Double linked list of virtual device drivers. */ TAILQ_HEAD(vdev_driver_list, rte_vdev_driver); -- 2.7.4