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 B2185D4A4 for ; Mon, 20 Feb 2017 15:18:46 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id r18so14641740wmd.3 for ; Mon, 20 Feb 2017 06:18:46 -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=r5stRf1zivrfc5xkw+1Op3C9a+3DcDXnRSHXmJh6ync=; b=CaQmpL6k72jb3H0Zo+C4wcKQLwwXoQrWAIyNQWSB7dsSMEGmUIAh8ycruQNQU3sfMQ YAAKLunA33xHHkJOit74dt3U9yL4oYnNtqS4K+73k/32NpgSoBIQ+j5hZc6YV08SjUQM 5sV5KQ2PO6FdkCxeqV4nCf2tgiX9vMYuy/dAetPDj5Aip9Ao79Zekvs4/tjwBVQ1QfQ7 FuviebcxfBisqmdMCyTTLGx5R96xszywE2sosCOrixPNxtE5F8vpiRDQqZnSgWVsj03E tHnqF4+eYENG7s3H6a1Zor2wLE9hEsCBYCWKuf9NLrBBjTCA0A16TKqGWLScivX0yhST 47vQ== 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=r5stRf1zivrfc5xkw+1Op3C9a+3DcDXnRSHXmJh6ync=; b=tKWyZ5gJUFT5eGDnOFqUlTNolGP3TAtJc758tKERw9qUU2j4BVf/LnYhgRICGBIZmh 6dPhc/6aUxcuePHySmDOzX+EGTxLF0dBlOYG9VddEgckE9oJLdKaS5r7yxSwgHldu16Y XKCQA2yId5dMBfmvwyolqKVBKuTsjXxhGec1IeCqz2yYGDp1WY8ZQYGKswUQt/JU9K4o AF/zU+nXxIueGHWwRnSfWaUWH5COXrT0foskh4U3f48vZ/o+3cmfldYC2A58jlHDV7LR J12ewvPVCdmQXYOJmSEC4nMZA0raWYclB4Ss7SaySkNymlxGwtQP4kQU6QnkiVBpZjxW yapA== X-Gm-Message-State: AMke39mguXxn7Yl9LQWUpMwDHoFbWGoR1oSx0i+0MZVfK9W7V1tvD+jVWDv190awnGV8Rw== X-Received: by 10.28.139.74 with SMTP id n71mr11535204wmd.139.1487600326556; Mon, 20 Feb 2017 06:18:46 -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.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Feb 2017 06:18:41 -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:40 +0100 Message-Id: <1487600262-14382-7-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 6/8] eal: add struct rte_vdev_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: Mon, 20 Feb 2017 14:18:46 -0000 This adds the rte_vdev_device structure which embeds a generic rte_device. Signed-off-by: Jan Blunck Tested-by: Ferruh Yigit --- lib/librte_eal/common/eal_common_vdev.c | 5 +++++ lib/librte_eal/common/include/rte_vdev.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 6ba3c91..61677de 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -42,6 +42,11 @@ #include #include +/** Double linked list of virtual device drivers. */ +TAILQ_HEAD(vdev_device_list, rte_vdev_device); + +static struct vdev_device_list vdev_device_list = + TAILQ_HEAD_INITIALIZER(vdev_device_list); struct vdev_driver_list vdev_driver_list = TAILQ_HEAD_INITIALIZER(vdev_driver_list); diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index 784e837..8f98372 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -40,6 +40,11 @@ extern "C" { #include #include +struct rte_vdev_device { + TAILQ_ENTRY(rte_vdev_device) next; /**< Next attached vdev */ + struct rte_device device; /**< Inherit core device */ +}; + /** Double linked list of virtual device drivers. */ TAILQ_HEAD(vdev_driver_list, rte_vdev_driver); -- 2.7.4