From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 83F1E374E for ; Wed, 13 Mar 2019 10:56:29 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0263021CA5; Wed, 13 Mar 2019 05:56:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 13 Mar 2019 05:56:29 -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=mesmtp; bh=7OXyA0sk4uPrz8ruU6+25WbNeTojrJj0dC1HN/Ba6V8=; b=JuzpfVVFG4ny IB9UyWU9nRTzUYWowe0XoWuvLvFzpBr8UXzwS5vtXM9WGgEHLSx+BdmoM6U+mm4b /0rI6WX/mRi0UtxoDDzYU6OfIsKnJ6AfGDVtivDLxyGZuWJDk+xqDldxEXDmPREL JsbNUpUmJuO7SF+3CYzsTadcd2LvBgs= 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=7OXyA0sk4uPrz8ruU6+25WbNeTojrJj0dC1HN/Ba6 V8=; b=rRPrrcHCvqfBwGSS8bg+NW8S9wEj/4nAEYl2DkYw6bZAcKZeyBcoHzVvo dtIR1wgTNxESgN276c5J8stWL0ZKyB2pb7jwjMENBBv7RWFjrApY0EKcQw3Nk46u W2msxSBWwQoGeD8DsWBQMc563actEolb04fClFTJKVruO+Eoy02hgjDQEYVK9rJJ VFqg2G3T+3CiXIG2Lqxi5u+LV0hcmbqJE6AHBpuhPdOM9zMVo4Ufqn9DD7imz/tv CvF1xHx5GLV3rd1RBv+8J6rBXYUVWzcyZbOlaEW91s3AqPPsm1XodOrSsV8icVI8 nZQokW6MczfqJ6drQxAVqFKv3S9tA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrhedtgddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd 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 120D71033F; Wed, 13 Mar 2019 05:56:26 -0400 (EDT) From: Thomas Monjalon To: Shahaf Shuler , anatoly.burakov@intel.com Cc: dev@dpdk.org, yskoh@mellanox.com, ferruh.yigit@intel.com, nhorman@tuxdriver.com, gaetan.rivet@6wind.com Date: Wed, 13 Mar 2019 10:56:25 +0100 Message-ID: <1698312.TEgN2QzQvo@xps> In-Reply-To: <1159b0da448d794e00011c7bbfd0a99523d005e6.1552206210.git.shahafs@mellanox.com> References: <1159b0da448d794e00011c7bbfd0a99523d005e6.1552206210.git.shahafs@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 3/6] bus: introduce device level DMA memory mapping 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: Wed, 13 Mar 2019 09:56:29 -0000 10/03/2019 09:28, Shahaf Shuler: > For PCI bus devices, the pci driver can expose its own map and unmap > functions to be used for the mapping. In case the driver doesn't provide > any, the memory will be mapped, if possible, to IOMMU through VFIO APIs. > > Application usage with those APIs is quite simple: > * allocate memory > * call rte_extmem_register on the memory chunk. > * take a device, and query its rte_device. > * call the device specific mapping function for this device. Should we make it documented somewhere? > +/** > + * Device level DMA map function. > + * After a successful call, the memory segment will be mapped to the > + * given device. > + * > + * @note: Memory must be registered in advance using rte_extmem_* APIs. Could we make more explicit that this function is part of the "external memory API"?