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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAE9CC433FE for ; Wed, 6 Apr 2022 00:00:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1581578AbiDEXj7 (ORCPT ); Tue, 5 Apr 2022 19:39:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381309AbiDEMy3 (ORCPT ); Tue, 5 Apr 2022 08:54:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8F5202314E for ; Tue, 5 Apr 2022 04:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649159730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=28KE+M63X+ahVj/a4F3r0KzFPc/lbb3JFcGix4GxqtQ=; b=VO7oSQn5me1rxoKu39wEwt0q1IwLRhtDlRrSIjv014AXitvh+0OfOniiLFSv2I+nsQP+IJ LA3pw+lTybH4BtOJy21IbBlW9sUZ6eVDjQX2tnA8tQmg7IqYpSZLH+zFbuanjfVqZIevL+ CHPrUq6zGv2GhoxUjPJ8fKIZWSJY/vo= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-364-0ljUOSMzMnit-GpbjHpPoQ-1; Tue, 05 Apr 2022 07:55:29 -0400 X-MC-Unique: 0ljUOSMzMnit-GpbjHpPoQ-1 Received: by mail-wr1-f70.google.com with SMTP id r16-20020adfbb10000000b002060d469943so1398482wrg.4 for ; Tue, 05 Apr 2022 04:55:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=28KE+M63X+ahVj/a4F3r0KzFPc/lbb3JFcGix4GxqtQ=; b=Wo0KS2xNIGh8RMNaFI5WX6AaHEV4usioCg90AKcme7FgBZ2SLIzH0CecCuWHbnpeMW XjLDM9Dvzoj8FdOPomRQ1cB6SS+Kc+gRCEbMSIXZ6W/Tht0SQP/nuD8i0o+Mo9yvJPUe 8ryFHsRhHL5jjNE0VgmYx/uulTBs0R2VM+8RJuKtx4pWMC2TYxYblOydqvAntGIKeV+Q J1RdY3CIGgGwnf/F8DhcWIwr2wHMVdFyb0IV8iMB5a9OlG5IosXDoofhGticA9uR5ul2 vqbx1Pt2gN71xudRDBAcMQkzqZq3WfqwuauWRh7RT3x1/o0Oe/v5zFHYiYi5CJaib+dT 8cqw== X-Gm-Message-State: AOAM532M9u+/wp5LgjWDl7+YCuyOqmVLFCBvKLU9mLJKrB5EcnASSX5I H+SLjD0H8gzM13BV7FLeuV7AsXRcFfBMmSs94VM5I0iWG4iUPrYZZXkhkw850PdaLWNdSRwcl1w pFUDlrJ1Lw98khxcxnJBjS0Za X-Received: by 2002:a5d:50d2:0:b0:206:b6f:f7db with SMTP id f18-20020a5d50d2000000b002060b6ff7dbmr2452906wrt.248.1649159728269; Tue, 05 Apr 2022 04:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1Tka5E6L9URIsWeBley60SCe/IUE6j/uwyJ5KZatVAUY55Lp2TF7WwIu2UssrhlRPLr4P1Q== X-Received: by 2002:a5d:50d2:0:b0:206:b6f:f7db with SMTP id f18-20020a5d50d2000000b002060b6ff7dbmr2452885wrt.248.1649159727975; Tue, 05 Apr 2022 04:55:27 -0700 (PDT) Received: from redhat.com ([2.52.17.211]) by smtp.gmail.com with ESMTPSA id o17-20020a05600c4fd100b0038cd5074c83sm2159309wmq.34.2022.04.05.04.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 04:55:27 -0700 (PDT) Date: Tue, 5 Apr 2022 07:55:22 -0400 From: "Michael S. Tsirkin" To: Christoph Hellwig Cc: Arnd Bergmann , Masahiro Yamada , Linux Kernel Mailing List , Linux Kbuild mailing list , linux-arch , Jason Wang , virtualization list Subject: Re: [PATCH 8/8] virtio_ring.h: do not include from exported header Message-ID: <20220405074223-mutt-send-email-mst@kernel.org> References: <20220404061948.2111820-1-masahiroy@kernel.org> <20220404061948.2111820-9-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 05, 2022 at 12:01:35AM -0700, Christoph Hellwig wrote: > On Tue, Apr 05, 2022 at 08:29:36AM +0200, Arnd Bergmann wrote: > > I think the users all have their own copies, at least the ones I could > > find on codesearch.debian.org. However, there are 27 virtio_*.h > > files in include/uapi/linux that probably should stay together for > > the purpose of defining the virtio protocol, and some others might > > be uapi relevant. > > > > I see that at least include/uapi/linux/vhost.h has ioctl() definitions > > in it, and includes the virtio_ring.h header indirectly. > > Uhh. We had a somilar mess (but at a smaller scale) in nvme, where > the uapi nvme.h contained both the UAPI and the protocol definition. > We took a hard break to only have a nvme_ioctl.h in the uapi header > and linux/nvme.h for the protocol. This did break a bit of userspace > compilation (but not running obviously) at the time, but really made > the headers much easier to main. Some userspace keeps on copying > nvme.h with the protocol definitions. So far we are quite happy with the status quo, I don't see any issues maintaining the headers. And yes, through vhost and vringh they are part of UAPI. Yes users have their own copies but they synch with the kernel. That's generally. Specifically the vring_init thing is a legacy thingy used by kvmtool and maybe others, and it inits the ring in the way that vring/virtio expect. Has been there since day 1 and we are careful not to add more stuff like that, so I don't see a lot of gain from incurring this pain for users. -- MST