From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 918C9A052A; Mon, 25 Jan 2021 15:52:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A829140EE9; Mon, 25 Jan 2021 15:52:01 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id B431C140EBE for ; Mon, 25 Jan 2021 15:51:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611586318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b1rZYc+RBzbrbJDeHUw4tEhMd6xGR5YkTTUnQWDC6VU=; b=ct7jN9rvVy/wlUin4Gx8n9YD3pYskoslLmz71MeKxuYGb3UYkeoyMx9ZCDjM06/vaWvknZ n7SAl/HRNCn23VaN+lvqZ6P4fKBaLHPSZPQkCrBa1Szpqz9+nnIrYqHvtb9h3XxdWz1XND Ah/TJAsGFHZvl8vs9NoMEJr4BSj3jnw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-110-XuoYetfFOaWwsvwTWv2Ssw-1; Mon, 25 Jan 2021 09:51:55 -0500 X-MC-Unique: XuoYetfFOaWwsvwTWv2Ssw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D991B107ACF8; Mon, 25 Jan 2021 14:51:53 +0000 (UTC) Received: from [10.36.110.31] (unknown [10.36.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A9FE60C78; Mon, 25 Jan 2021 14:51:42 +0000 (UTC) To: "Xia, Chenbo" , "dev@dpdk.org" , "olivier.matz@6wind.com" , "amorenoz@redhat.com" , "david.marchand@redhat.com" References: <20210119212507.1043636-1-maxime.coquelin@redhat.com> <20210119212507.1043636-2-maxime.coquelin@redhat.com> From: Maxime Coquelin Message-ID: <1d131153-714d-a683-5b31-2614367bfa7d@redhat.com> Date: Mon, 25 Jan 2021 15:51:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 01/44] bus/vdev: add helper to get vdev from eth dev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 1/21/21 9:58 AM, Xia, Chenbo wrote: > Hi Maxime, > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Wednesday, January 20, 2021 5:24 AM >> To: dev@dpdk.org; Xia, Chenbo ; olivier.matz@6wind.com; >> amorenoz@redhat.com; david.marchand@redhat.com >> Cc: Maxime Coquelin >> Subject: [PATCH v2 01/44] bus/vdev: add helper to get vdev from eth dev > > Sorry that I missed the title in v1.. > > Better use 'ethdev' or 'eth device'here? Changed to ethedv. Thanks, Maxime > Thanks, > Chenbo > >> >> This patch adds an helper macro to get the rte_vdev_device >> pointer from a rte_eth_dev pointer. >> >> This is similar to RTE_ETH_DEV_TO_PCI(). >> >> Signed-off-by: Maxime Coquelin >> Reviewed-by: Chenbo Xia >> Reviewed-by: David Marchand >> --- >> drivers/bus/vdev/rte_bus_vdev.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/bus/vdev/rte_bus_vdev.h b/drivers/bus/vdev/rte_bus_vdev.h >> index d14eeb41b0..f99a41f825 100644 >> --- a/drivers/bus/vdev/rte_bus_vdev.h >> +++ b/drivers/bus/vdev/rte_bus_vdev.h >> @@ -34,6 +34,8 @@ struct rte_vdev_device { >> #define RTE_DEV_TO_VDEV_CONST(ptr) \ >> container_of(ptr, const struct rte_vdev_device, device) >> >> +#define RTE_ETH_DEV_TO_VDEV(eth_dev) RTE_DEV_TO_VDEV((eth_dev)->device) >> + >> static inline const char * >> rte_vdev_device_name(const struct rte_vdev_device *dev) >> { >> -- >> 2.29.2 >