From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A185C4BA0A for ; Wed, 26 Feb 2020 03:57:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA23B21927 for ; Wed, 26 Feb 2020 03:57:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZTP0S5/Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726661AbgBZD5M (ORCPT ); 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-Google-Smtp-Source: APXvYqxT1mskDKO8pPXeGfj5i3NbuWvfjJvcsQi12sua3ZaKB+zMAp1/1nwwdHvRa+8Box6GWFczVQuvTFidlmGN/dU= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Stevens Subject: Re: Re: [PATCH 1/2] virtio: add dma-buf support for exported objects Date: Wed, 26 Feb 2020 12:56:58 +0900 Message-ID: References: <20200219080637.61312-1-stevensd@chromium.org> <20200219080637.61312-2-stevensd@chromium.org> <20200225061008.wqxqppfglzmwvtid@sirius.home.kraxel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: In-Reply-To: <20200225061008.wqxqppfglzmwvtid@sirius.home.kraxel.org> 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 List-Id: virtualization@lists.linuxfoundation.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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC970C4BA0B for ; Wed, 26 Feb 2020 08:09:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 779EF20714 for ; Wed, 26 Feb 2020 08:09:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZTP0S5/Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 779EF20714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D82886E194; Wed, 26 Feb 2020 08:08:28 +0000 (UTC) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9DFFA6E0E6 for ; Wed, 26 Feb 2020 03:57:10 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id d9so1286841qte.12 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=TcGyCDPJImhI6CFMGNdogKPKU2uwhJ/Z/v7NVxPz6sWZYs5DtMTiOz9ryOlFaE/IZC IsmW7wH+EFZt2aZwMXxLpUBgKl0uzZ0n5ejVKuSTS2BvPgK9ydlRgZIjBNJuDduv7vOi oYKzPuyYXowkhS+PqN1cA3SzjAN4Cwu/MDPjsRwnqd4U4dGoEHgDYp9/ClWkFnpTc41I gmQwgeYCRWUrcPbfq93/zhP03wItO+LlbVvHN5RXikM3q0XEyF0ztCg5zEVCoS+XaOMT BVhCRB/qr25frNoRGBLbzZGo9tEcrPUGexBXG1yM0kctbFapQBcECemzCvMEF3BUvRSA ApSg== X-Gm-Message-State: APjAAAXlY0Ldtb5ajKuhXWMMgY81NHf+NEBfUxPLtR2xkoRXowXWBhp6 GpNKW4kTSEU0GJXkeuhTHs64KZaDsj6YzlOX6QN5pw== X-Google-Smtp-Source: APXvYqxT1mskDKO8pPXeGfj5i3NbuWvfjJvcsQi12sua3ZaKB+zMAp1/1nwwdHvRa+8Box6GWFczVQuvTFidlmGN/dU= 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 X-Mailman-Approved-At: Wed, 26 Feb 2020 08:08:26 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, "Michael S . Tsirkin" , David Airlie , Jason Wang , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linaro-mm-sig@lists.linaro.org, Linux Media Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-dev-return-6786-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 96FFA985DF6 for ; Wed, 26 Feb 2020 03:57:10 +0000 (UTC) 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 List-ID: 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 --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org