From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id B9FBCF92F for ; Mon, 20 Feb 2017 15:18:55 +0100 (CET) Received: by mail-wr0-f195.google.com with SMTP id s27so2978612wrb.0 for ; Mon, 20 Feb 2017 06:18:55 -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=H5uUUqrFbrWksJmcRjQSVico8gnp3BUMU3E7tsYtihI=; b=Tp8n5CMrT+DzYdT0BNl9/vmwd50Q+PmVzPESwfdfJTU+PEmqVhYTsFR18xTgdwMony 3bNkhbPRAiIAAZjQnEXll3GncPOb2hsOvHSX8081lfCBgJ6ASInsOKvg3HnVcSDXGaGi NI1c+6eyLjcKHgMqq5u3iXV/v2yUR4oXe9nQ5e5kHionISgp6V/LqP+X/viDiwt/g2pw XsyUEeBs4Mb3fbfOwdDuW4Ii0XoG0SpROgNh8xgcTYgi1Sot8c6ax/6wghAAQkKIMelY mEUVrFp6l0y/8pH71EDIy0ujwg932YGsia1k2Jvdl41IwPRlSS9bfE6wslH4JYe9Ilq2 aQqQ== 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=H5uUUqrFbrWksJmcRjQSVico8gnp3BUMU3E7tsYtihI=; b=EnNpMoLELQ4BI+pNeNk3xM+IJL9gC23giNbB+z/8uCqTAw2n4fBcESvkHqsLBtdDBG DXKC6mxMYiauh/JtXZ8ku5DrVtte2Hdbi0nKU7VnQAFwdAR46lqKyClMs19XhIUfdRmm c7ql4LhUAsdXvuHQBMjAdfkzcvhinRi1khjdmPxxMW868b6V60uuPSAl/lko35q70rKs S3/V7QwGQsd9dG4oSnX17TWCOtn4CcvyhoGzqRSjth1HeCQWAa70tSRgshzsQuDterrP ZcayXIyk51XBI9Ard/wA0JpXrcNzzOuxdBkjmKNkNvL2S86VkVswnnMrwQt5JIcLVjgp NVaw== X-Gm-Message-State: AMke39lTCvxKJ/66DHDkwh/GVk5dQShvEnNw6P/szN2q60UemsfUanbzlI3+/JffvRzyLA== X-Received: by 10.223.179.78 with SMTP id k14mr18312601wrd.34.1487600335580; Mon, 20 Feb 2017 06:18:55 -0800 (PST) Received: from weierstrass.local.net ([91.200.109.169]) by smtp.gmail.com with ESMTPSA id o2sm24932276wra.42.2017.02.20.06.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Feb 2017 06:18:50 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Cc: david.marchand@6wind.com, shreyansh.jain@nxp.com, ferruh.yigit@intel.com Date: Mon, 20 Feb 2017 15:17:41 +0100 Message-Id: <1487600262-14382-8-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487600262-14382-1-git-send-email-jblunck@infradead.org> References: <1487600262-14382-1-git-send-email-jblunck@infradead.org> In-Reply-To: <1487152929-23627-1-git-send-email-jblunck@infradead.org> References: <1487152929-23627-1-git-send-email-jblunck@infradead.org> Subject: [dpdk-dev] [PATCH v2 7/8] eal: add virtual device name helper function 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: Mon, 20 Feb 2017 14:18:55 -0000 This adds the rte_vdev_device_name() helper function to retrieve the rte_vdev_device name which makes moving the name of the low-level device into struct rte_device easier in the future. Signed-off-by: Jan Blunck --- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 6 ++++++ lib/librte_eal/common/eal_common_vdev.c | 6 ++++++ lib/librte_eal/common/include/rte_vdev.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map index 0116085..4afa1c5 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -184,3 +184,9 @@ DPDK_17.02 { rte_bus_unregister; } DPDK_16.11; + +DPDK_17.05 { + global: + + rte_vdev_device_name; +} DPDK_17.02; diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 61677de..a9798d0 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -66,6 +66,12 @@ rte_eal_vdrv_unregister(struct rte_vdev_driver *driver) TAILQ_REMOVE(&vdev_driver_list, driver, next); } +const char * +rte_vdev_device_name(const struct rte_vdev_device *dev) +{ + return dev->device.devargs->virt.drv_name; +} + static int vdev_probe_all_drivers(const char *name, const char *args) { diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index 8f98372..ffa48bd 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -45,6 +45,8 @@ struct rte_vdev_device { struct rte_device device; /**< Inherit core device */ }; +const char *rte_vdev_device_name(const struct rte_vdev_device *dev); + /** Double linked list of virtual device drivers. */ TAILQ_HEAD(vdev_driver_list, rte_vdev_driver); -- 2.7.4