Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4423594ybv; Tue, 25 Feb 2020 19:58:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzminf24zN9PYjfwc6pTmvdIgprC77TXzkT26OzmBs7+Ew+ZDMJ6bKjcX9cCz4FYN+ingCh X-Received: by 2002:aca:49cd:: with SMTP id w196mr1543511oia.15.1582689497790; Tue, 25 Feb 2020 19:58:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582689497; cv=none; d=google.com; s=arc-20160816; b=XrgqAxq4B8WzfYcejMy7NLgwbdjGTZUTzXiqeQE7gg13sIKUmiDNr48WfHMvxDKFZx M7Z9bkaO1drHFuCiS87knymASFci93VCcTCN31mqn8Lt2mbSEHvs6TIByksDtuJB7Yvy qPdc03iUfnS1HzZQ2g6K8RrN6UitQ0eKKA1ux7sYD60BB5Mh9onueTmIfjXXQdxCZ8nC i93Rl2lH5svcU7UTAx/b8fsWu9aTQSgQHWQZE3KSETo+P+XDAOJ3Wwd332XEz5GYEpuY zdrkr+j9qf0iB+EWvOLKMQnmzurOMd/qvqt9c61tNEd8a7q2wo0tX3b64NZVPvPhOlJ7 /aug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=y43f351GsocmwieumGvRVXcMvZ/sEk6tnZeuhSLflZ0=; b=JnssVbiiwZ54Nv82l1bpczLcMaYcJWCliFOfXcI6BUa3ED4J+ZqG2b5+fExAvYiu+/ /S+5RFjflDM0Vqrd2KoK3CpdlSCtAervqblGejN0hbxs5ISCtymbSAy2JbIgJrJuGWIU B0F2xQjEz6w3KhijJMbProWjyabU7uwMS0XAYA7OLitek8Fcdv0vVj1L95zpXVnTQcJL NjuCnavS9OSyI5E9j3yL4JUO3jFOYbQXQvLan4Eny6RRQ+zF2q0fhWiR3cixIK4mgbXy kNZGNW8rp8QcVMixrv2vcQl6ibew234LcidL5v6lXfy3hQ55lv5Y3BbBw6I0KdqtUH7Q 952A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="ZTP0S5/Q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si527950otf.141.2020.02.25.19.58.05; Tue, 25 Feb 2020 19:58:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="ZTP0S5/Q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726603AbgBZD5M (ORCPT + 99 others); Tue, 25 Feb 2020 22:57:12 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:47032 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbgBZD5M (ORCPT ); Tue, 25 Feb 2020 22:57:12 -0500 Received: by mail-qt1-f194.google.com with SMTP id i14so1275444qtv.13 for ; Tue, 25 Feb 2020 19:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y43f351GsocmwieumGvRVXcMvZ/sEk6tnZeuhSLflZ0=; b=ZTP0S5/QDGhwujJhePEeqS8RMJkWkFJa/5JZyyUqiRn+ilygUdrbn911hQNVMntZy3 zOVmYLjUDv+1xez2rK2QVc0DQfcPJ2wyrY370P5wT5ptsjyywr20gibLSnkSa/oD3SzQ 709zTNnUw5Qbx/eMUMt6+qNAINBmx2JE1k9GI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y43f351GsocmwieumGvRVXcMvZ/sEk6tnZeuhSLflZ0=; b=gsL/knCP35G3rFDM75OSJ3tpJPeZQLS0ZQ/I8VuyORgK51BsEKEwa+Ey17CtLSc786 MXoc6R0XyhPC/LTlSkKbcQ1cXnkJq7c5Uxk2aqiu07az/UtG293uAhMxPlvmHtUNsPYr Hk5Os1BQdUQz/Yd1yEf7jbrwRK3CpgWcH8/9/ieM7eVVVQ9g5tiMNhndeHiJn9+R2F2e K8xTYiKD35fKYqJuJJGYLKPfAQykL41A+hhWecH4K/GrMpr7syBJ05EZMvZYe5DERUMS dXDEoW6AEWS/G3wtbELqSmNIUw6Iz728WgCQnPlMYuo7dLNLGSmZG+3/2wJQtYVXusTO i3bw== X-Gm-Message-State: APjAAAV87Dt+MgBrpO0tz0FSbTalB/IvC372tx6ycKvZSELV1N96w+fS RIG3rRM2iZ4Fw1l6ZkxakgWvegyj+8xwF+P0rTZ86w== X-Received: by 2002:aed:3e6d:: with SMTP id m42mr2584657qtf.187.1582689429791; Tue, 25 Feb 2020 19:57:09 -0800 (PST) MIME-Version: 1.0 References: <20200219080637.61312-1-stevensd@chromium.org> <20200219080637.61312-2-stevensd@chromium.org> <20200225061008.wqxqppfglzmwvtid@sirius.home.kraxel.org> In-Reply-To: <20200225061008.wqxqppfglzmwvtid@sirius.home.kraxel.org> From: David Stevens Date: Wed, 26 Feb 2020 12:56:58 +0900 Message-ID: Subject: Re: [virtio-dev] Re: [PATCH 1/2] virtio: add dma-buf support for exported objects To: Gerd Hoffmann Cc: David Airlie , Daniel Vetter , "Michael S . Tsirkin" , Jason Wang , Sumit Semwal , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, Linux Media Mailing List , linaro-mm-sig@lists.linaro.org, virtio-dev@lists.oasis-open.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 3:10 PM Gerd Hoffmann wrote: > > On Wed, Feb 19, 2020 at 05:06:36PM +0900, David Stevens wrote: > > This change adds a new flavor of dma-bufs that can be used by virtio > > drivers to share exported objects. A virtio dma-buf can be queried by > > virtio drivers to obtain the UUID which identifies the underlying > > exported object. > > That duplicates a bunch of code from dma-buf.c in virtio_dma_buf.c. > > How about dma_buf_{get,set}_uuid, simliar to dma_buf_set_name? While I'm not opposed to such an API, I'm also hesitant to make changes to the dma-buf API for a single use case. As for the duplicated code around virtio_dma_buf_export_info, it can be removed by sacrificing a little bit of type safety, if that's preferable. -David