Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1226863ima; Fri, 1 Feb 2019 19:20:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IY7S+U1YvC6iQrrekaiXvxxnZb0cLanXAaj0EIC05o1l5ZnKHXr+x29gU31U53PkqJfe3ny X-Received: by 2002:a63:9712:: with SMTP id n18mr4776133pge.295.1549077634150; Fri, 01 Feb 2019 19:20:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549077634; cv=none; d=google.com; s=arc-20160816; b=nLe0cjNbOcfO7xHYlr8/n0oM8+IXIRGYu30REfMS6gRMgHwpY59jLZsx1AmVqOPdLW auBs8SdDUzXtM8T/qXp+bsLxX/iA60PL1nKokwxTbjnrB/w+2dbWe+hAZqcrS7TOHdjR 6TuICi1PPeBQfGjfgska7v4Uc9AlIwwcTFogEWtdCtTBNG2Zjq/gzIb8W8bQ07ydFH2P v8a6FH9zL9MZR0pmHrkRuIUZTGPYX3PVQf4JXmummeT6BM/9aiaWtkz0ayZe8Tleu6Ww Akvpxg5y/cCya1yc43IhgDcMF4j9McCz5hkZmi3CfJZUdmnwAXWuoxFl//zth95rOF+N JYug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=/41aUFXiRXuKzS/X6XF9BK5lPlV88aQiJGdOZEhnJEg=; b=PPs0ptIcJDbFlCHx4Q4TFCIojMB8Z3z8GDLMu1f07SIqIh3oPd6SeLIL5zwXEuNDy4 D4fTuP0U3qUkfwsdthP968bvsZEW1IZJOdtcDmG8eblJua35NNryUk5A8VIhSa4iohPH mCglBb3PpbrGI+dJHzM857FNLlo8csElnwijPVJ5MttmbEwkvyEvQKK7uDg7iY6bMf6W zJZqLgn0bEBkax2xsjAyMnSl33svDZy7rPeznr7UFX0bEPyDxUsXNxNdFiijHlp153Zy nfp7RHi2t6p+0ukviN3Vl7L56UfwGO8cv1mBvQqjhrCxrGrLJKIsql7Uh6VkY0gVLhIM fXrQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x74si9383316pfe.23.2019.02.01.19.20.17; Fri, 01 Feb 2019 19:20:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726872AbfBBDSm (ORCPT + 99 others); Fri, 1 Feb 2019 22:18:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37770 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbfBBDSm (ORCPT ); Fri, 1 Feb 2019 22:18:42 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50FECC05D419; Sat, 2 Feb 2019 03:18:42 +0000 (UTC) Received: from [10.72.12.58] (ovpn-12-58.pek2.redhat.com [10.72.12.58]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9B977600C4; Sat, 2 Feb 2019 03:18:38 +0000 (UTC) Subject: Re: [PATCH] virtio: drop internal struct from UAPI To: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org Cc: Tiwei Bie , virtualization@lists.linux-foundation.org References: <20190201221553.7210-1-mst@redhat.com> From: Jason Wang Message-ID: <423ece1f-5eb9-8023-81f0-90fc57e19e24@redhat.com> Date: Sat, 2 Feb 2019 11:18:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190201221553.7210-1-mst@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 02 Feb 2019 03:18:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/2/2 上午6:16, Michael S. Tsirkin wrote: > There's no reason to expose struct vring_packed in UAPI - if we do we > won't be able to change or drop it, and it's not part of any interface. > > Let's move it to virtio_ring.c > > Cc: Tiwei Bie > Signed-off-by: Michael S. Tsirkin > --- > drivers/virtio/virtio_ring.c | 7 ++++++- > include/uapi/linux/virtio_ring.h | 10 ---------- > 2 files changed, 6 insertions(+), 11 deletions(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index 412e0c431d87..1c85b3423182 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -152,7 +152,12 @@ struct vring_virtqueue { > /* Available for packed ring */ > struct { > /* Actual memory layout for this queue. */ > - struct vring_packed vring; > + struct { > + unsigned int num; > + struct vring_packed_desc *desc; > + struct vring_packed_desc_event *driver; > + struct vring_packed_desc_event *device; > + } vring; > > /* Driver ring wrap counter. */ > bool avail_wrap_counter; > diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h > index 2414f8af26b3..4c4e24c291a5 100644 > --- a/include/uapi/linux/virtio_ring.h > +++ b/include/uapi/linux/virtio_ring.h > @@ -213,14 +213,4 @@ struct vring_packed_desc { > __le16 flags; > }; > > -struct vring_packed { > - unsigned int num; > - > - struct vring_packed_desc *desc; > - > - struct vring_packed_desc_event *driver; > - > - struct vring_packed_desc_event *device; > -}; > - > #endif /* _UAPI_LINUX_VIRTIO_RING_H */ Acked-by: Jason Wang