From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 083A26932 for ; Tue, 11 Apr 2017 17:44:34 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id l28so738010wre.0 for ; Tue, 11 Apr 2017 08:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=hjl49yzqMzfY9ZD9ch9fNI2ePRh2vcqOlWJ1hdPJIU0=; b=buMKRULZDfUvW+GWVYoSbGV7sQIHZe2NhAqOQgOr43SbxHqyDQCObLG4mqQuvwm7Ge HLWucI21Dp6YTWJ9NoCI02YyBhwifJdkuJk7di6WkEGmuSCzv39yv/GXiSE6zCk902fF c9C0HNnJmuyHY3nYgb1pnox56u/4h2yY+Zqx58z6lBMrJIEyXFPBy4mNiQ9JzLKd8bMY k+3/JkXh83bAwVASxROMBhsv184FAakZwq305bxQSCfCmHbjtM/brbs4lRj+s3jFxoBF fJyHOaJbb+PIrXHZ6ihnbEUhYVczQM39kI5QOY1SOXFLebJeW6dIRb/yd4ucogW35uJg 1TzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=hjl49yzqMzfY9ZD9ch9fNI2ePRh2vcqOlWJ1hdPJIU0=; b=nPLSYkqxZ/1ye5CSdZt1Mt2ktbebcD/v9nHc73QQIu6FeAkYw7vMFsNiHZkR2FQFXR 71R9KeA4p5BrCtd9KMihI4cnC3Rg6GfNAaUUJqJ88k5yzNVAPxlbcJX2MmBAsnpGOsR5 amvElI3Mz8tanmlWRGN7FT9U06GYhjT0RxBf1F1k5xmLFz1DXcJuFMRneGrrAHUXn9aJ Y+WlU9KLOpekJNCqP51dNcFPpW0nO2VfLjBzFEHgmjurs7yBGhidfCMPx5EdgBG6K1hw Jn1c9n/z2RytQPfSW4WdlkjBMfAPWfJw8VFRKHwNIrAAlCDPV+mjISQo2RbD79iJWtdK czIA== X-Gm-Message-State: AN3rC/5VkVAKawyglO3xZ/9Jpso56sZutVooVRk2yBwT71FxOg50442MfwyxGFNvSlMwyJ9N X-Received: by 10.223.163.212 with SMTP id m20mr8370043wrb.29.1491925474042; Tue, 11 Apr 2017 08:44:34 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id v14sm2936830wmv.24.2017.04.11.08.44.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:44:33 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:09 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 05/12] 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: Tue, 11 Apr 2017 15:44:35 -0000 From: Jan Blunck This adds the rte_vdev_device structure which embeds a generic rte_device. Signed-off-by: Jan Blunck Tested-by: Ferruh Yigit Acked-by: Shreyansh Jain --- 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 c255073..e3a75fd 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -43,6 +43,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.1.4