From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 74844567E for ; Fri, 7 Jul 2017 02:10:04 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id c11so24289614wrc.3 for ; Thu, 06 Jul 2017 17:10:04 -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=6FJeSG/BQbzdkH77hCfkCPuCiNeMkMBb8tRuYP9lcZY=; b=hi5zCeCh7hrotVUZoVU3UNsYsCkA8QdcEC4gEsSwTpk2QiIlBfWKMPnnTIvC+SS6pW 0D7PZ8GIcocTaHjGq6XqhMY2cCVCgRbOPJlPvWW1piqFCFhriwZ3ZXZ2yq2cw1ppDQHu 50Z0DxLAuGaPGMVcwIH87dpd8O+b80yPCKFXMrAqhDmlajTPKAEGZIaOwxaTv1vhI7H1 E7VbJo5H3ucCpFrx7IANL19Jmqb6OyTeHBzSkpDPNjYgmr9M+UEEk+HnubC8OR1CgOp5 30+KYWEttn7HTDA9Pmb7iMeHjB+/YfdGAREW8dL7GEQjrjlIqwJHTM1DorfwXlgOdvEo MlsQ== 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=6FJeSG/BQbzdkH77hCfkCPuCiNeMkMBb8tRuYP9lcZY=; b=Ycu6MvqGcMWi4eFSy8zeSs4CKpFw/zJvUunHJtC+aAYCkArLYb8Yrsl7QpWQiES/2V NzYLRA8CLaxH9KjjUwSuGy6R5NCSG0mSY/B+SRLj7wfK29cdBuW8Vy0+KzvRiNZ/OOyb OYujXV3VW/n2h1wwXlNze4BIZak73lymItGdRU5okRF/wZmu8Ayyin4WTH5KCdbqhcn+ jOL08Vdfb8Tu7MWzYIK52GpkvlyddwzLY/Hwg+QXhyX+dZ0QsUU/OjJNkJ/AYbUVfD2w ib5wpaUpzlFFm7/Xyd3ExOYBdbDIo5ELphGYPugVrwRaoU8pnTM02XXdF5ct9sBh+mbn vt0g== X-Gm-Message-State: AIVw112n+tEqNEEKQ/xperGlGoz80wJ5nwwuUqCd4lTmDqSSrvAeXqvs jNpAIBMrf8YFTjshJxQ= X-Received: by 10.28.189.214 with SMTP id n205mr300535wmf.122.1499386203803; Thu, 06 Jul 2017 17:10:03 -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 f45sm2391166wrf.2.2017.07.06.17.10.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Jul 2017 17:10:03 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Fri, 7 Jul 2017 02:09:15 +0200 Message-Id: <805ebe950ab6787328c5bd890885f8816e14be0c.1499385282.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v6 08/22] vdev: add dev to vdev macro 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: Fri, 07 Jul 2017 00:10:05 -0000 Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/include/rte_vdev.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index 3c07b76..639e6d6 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -46,6 +46,13 @@ struct rte_vdev_device { struct rte_device device; /**< Inherit core device */ }; +/** + * @internal + * Helper macro for drivers that need to convert to struct rte_vdev_device. + */ +#define RTE_DEV_TO_VDEV(ptr) \ + container_of(ptr, struct rte_vdev_device, device) + static inline const char * rte_vdev_device_name(const struct rte_vdev_device *dev) { -- 2.1.4