From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jblunck@gmail.com>
Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67])
 by dpdk.org (Postfix) with ESMTP id 6EB0E5A3E
 for <dev@dpdk.org>; Sat, 25 Feb 2017 11:28:39 +0100 (CET)
Received: by mail-wm0-f67.google.com with SMTP id u63so6343538wmu.2
 for <dev@dpdk.org>; Sat, 25 Feb 2017 02:28:39 -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
 :in-reply-to:references;
 bh=koKHoyUL2IA1pdWI3ey5Mg6FFk7RvNoF3zs7OwA9bBU=;
 b=DJaohEBpnyOJyCILOmNFTNCRv1piDUtm6D9raTmWg/QsL/FoeJo0x6yvCEAorpiNUP
 +F67j97XZbM/Sm2uZJe82QXouugpgOXG4QTUvm+kqZFUzNvieuxW6u/TVBYj/JcsGOtQ
 mZtdJqbM311PH8nkyzJDw9Sj3lL8O5J5+nk4zspR5gnQKSuEwZ3m4VnzuPBnROl4Z6zh
 RcSmThEsSxumjou+pQkvNyMEDNGLAKJBk3I1rAyPiyLcwpKI9px4/ajrrRt55BhOHclX
 fZCOuL0Xs2K/r63rQG9gZFLCSdOGUIOGBoUgkKCTPgSD/R9qKACgTt68wmxF1CzwoaCL
 H34g==
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:in-reply-to:references;
 bh=koKHoyUL2IA1pdWI3ey5Mg6FFk7RvNoF3zs7OwA9bBU=;
 b=e3R57+8Ze1sExAZt2+MF0hlacvC0HTzNHghmg4rnpEBB38Ygqa4T/Ryb4nOhxO5L2B
 0TJ8ljrRXOftLp1Hrg00+PB88tHeigKS1Yr341ocTkWyl8bN/CDAFpvYR00ProT1wSvJ
 OmQPhJua9wR56k+lRP4VQM/GZEoT1X/TTpwwGd7gOxWVp0bBMZ4oP3GhTryujHcxNRFa
 bzD5ZmURCp7AgYnQYzq802QGK9PqGz6jzKHaPrXnTvJtAEqoN2G4CqAKUmO4CBnNxk7P
 4m3LnndQyYle4VOcHHxiPfANF4YktB35Hxarpw2U+6xQb/Vmdk/YT9grEzlpQnXDo2BX
 p1lA==
X-Gm-Message-State: AMke39kOJOemObVxFHSx9fzjR9tIDIhhQTFh6d6j1LKg2sfT6oxEyqlKfhLeJ/kUoYSXDw==
X-Received: by 10.28.60.66 with SMTP id j63mr6404666wma.74.1488018519120;
 Sat, 25 Feb 2017 02:28:39 -0800 (PST)
Received: from weierstrass.local.net ([91.200.109.169])
 by smtp.gmail.com with ESMTPSA id e72sm5830893wma.16.2017.02.25.02.28.37
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 25 Feb 2017 02:28:38 -0800 (PST)
Sender: Jan Blunck <jblunck@gmail.com>
From: Jan Blunck <jblunck@infradead.org>
To: dev@dpdk.org
Cc: david.marchand@6wind.com, shreyansh.jain@nxp.com, ferruh.yigit@intel.com
Date: Sat, 25 Feb 2017 11:28:14 +0100
Message-Id: <1488018496-995-9-git-send-email-jblunck@infradead.org>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1488018496-995-1-git-send-email-jblunck@infradead.org>
References: <1488018496-995-1-git-send-email-jblunck@infradead.org>
In-Reply-To: <1487600262-14382-1-git-send-email-jblunck@infradead.org>
References: <1487600262-14382-1-git-send-email-jblunck@infradead.org>
Subject: [dpdk-dev] [PATCH v3 08/10] eal: add virtual device arguments
	helper function
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sat, 25 Feb 2017 10:28:39 -0000

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 <jblunck@infradead.org>
---
 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