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 03866A0A0C; Thu, 15 Apr 2021 09:59:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA4EE1620D4; Thu, 15 Apr 2021 09:59:32 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id F1F531620C1 for ; Thu, 15 Apr 2021 09:59:30 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 8E9605C0182; Thu, 15 Apr 2021 03:59:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 15 Apr 2021 03:59:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= QDiPaQdve3MgeR4dCgnwHSc5ufBY4MCiNyYOB7/6/JU=; b=cOHb4e0d6kxdv5qw CoFSyc0aKlhqpveRQYellSsDRGeJ9KOS67lpagPxj9QTdiTrHV1cGZVpVO4nN6ns 1vPuRy3JI7aaVQ6Ll2/twHX/UsKFmFJtL9mxxgkwlmUhiRJdrI1kccjxwUa2RthZ uOvKpV2qjIIBP4Ja0SE+JWJgeAPgddWRdMNd1+4SewInOXNzDV/2zRcrj9OvEK4s pM31iB3bJw1ml7Od1upOE2y+Owowf9IsVmO4GGFviTvceMgF3Oi/FwONQKfRoTLS ev3I7+2pmLtpSOfknT8qlixvSftNsCHpNu3zrYEYc2kY/q2IrVOxwq2XonGmrUBS thi7RQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=QDiPaQdve3MgeR4dCgnwHSc5ufBY4MCiNyYOB7/6/ JU=; b=mXUlGISwXlzmc5aqufDchnKVGO/n1alWYQ8buw5wiibizqUO7TGnJgVAf jp6Fyg9FAnENVZZ07Exf6j74fCvn6KeuqAEy7t7+m+K19sStgaG9zacuvKBJ48li A/9Y3vkXeDTIk33TcQcjE9/HYSpJCjjpP88LXskt7/4f9xuqV0DI/ng+YwOx+X5T PYSE+0uzyp9y77S2yp+on7OizyGncjIxm91Y77mMYKE+VNxcJcmOkk/7XqE63Lk8 +FMdmKLXVPKaR7W/iTwU1eOLCHhvgKmc3oayvZCB5z9FYGUDvJavUZCZga/GMlWI 4rTUY6y51FEQMa+MbEJedwUjLPF7A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudelvddguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeffvdffjeeuteelfeeileduudeugfetjeelveefkeejfeeigeeh teffvdekfeegudenucffohhmrghinhepughpughkrdhorhhgnecukfhppeejjedrudefge drvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 772C324005D; Thu, 15 Apr 2021 03:59:28 -0400 (EDT) From: Thomas Monjalon To: "Wang, Haiyue" , "Xueming(Steven) Li" Cc: "dev@dpdk.org" , Asaf Penso , Parav Pandit , Ray Kinsella , david.marchand@redhat.com, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru, olivier.matz@6wind.com Date: Thu, 15 Apr 2021 09:59:27 +0200 Message-ID: <4194128.XUg4IPFSnV@thomas> In-Reply-To: References: <20210311130113.31382-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v1] bus/auxiliary: introduce auxiliary bus 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" 15/04/2021 09:55, Xueming(Steven) Li: > From: Wang, Haiyue > > From: Xueming(Steven) Li > > > From: Wang, Haiyue > > > > From: dev On Behalf Of Xueming Li > > > > > +/** > > > > > + * A structure describing an auxiliary driver. > > > > > + */ > > > > > +struct rte_auxiliary_driver { > > > > > + TAILQ_ENTRY(rte_auxiliary_driver) next; /**< Next in list. */ > > > > > + struct rte_driver driver; /**< Inherit core driver. */ > > > > > + struct rte_auxiliary_bus *bus; /**< Auxiliary bus reference. */ > > > > > + auxiliary_match_t *match; /**< Device match function. */ > > > > > + auxiliary_probe_t *probe; /**< Device Probe function. */ > > > > > + auxiliary_remove_t *remove; /**< Device Remove function. */ > > > > > + auxiliary_dma_map_t *dma_map; /**< Device dma map function. */ > > > > > + auxiliary_dma_unmap_t *dma_unmap; /**< Device dma unmap function. */ > > > > > > > > These API type can be pointer type defined, then no need "*": > > > > > > > > typedef int (*auxiliary_dma_unmap_t)(struct rte_auxiliary_device *dev, > > > > void *addr, uint64_t iova, size_t len); > > > > > > > > auxiliary_dma_unmap_t dma_unmap; > > > > > > > > Like: > > > > https://patchwork.dpdk.org/project/dpdk/patch/20210331224547.2217759 > > > > -1-thomas@monjalon.net/ > > > > > > > > typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, > > > > void *addr, uint64_t iova, size_t len); > > > > > > Thanks, is there a reason to prefer pointer type? > > > > Good practice to make code beautiful ? ;-) Honestly, I am not sure which one is better, having the pointer type hidden in the typedef or explicit? > > > Thoma's patch looks good, will rebase on it once accepted. > > > > I mean the function type is defined as pointer type. > Yes, I'm talking another topic :) > His patch makes dma map/unmap higher level to rte_bus, so that no need to define the api again here. I think my patch will be abandoned.