Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1260234ima; Fri, 1 Feb 2019 20:08:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN5sZF8Bcga9eDqfSIB7xPhEejF7tpYwTV9ZbItC9WpWdos64DwVGXUBWzTynkjPN7MG5uV9 X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11mr43344092plb.332.1549080486911; Fri, 01 Feb 2019 20:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549080486; cv=none; d=google.com; s=arc-20160816; b=SUdoffY+K5gfv0t+/M+/CM98KyBcTR8orJZ5m/+yhi+cF13IEqMVltVTQ7Gd3RNWKy r3SpVO2nMtPynNxSOQbqfV6BfVtGOWu+HmmLGLBKbrJLtp8hqEivRpO/YMHSAwj5zNa3 8NO8bEndSCp5unR3hYoLjbH47MAKXzJRxtEgmJcNQ9ftOjSCeGfKnyZTaECJ8Ir5sex2 CdALULdEdSODZmBrPWKoGJ/Hpi8Ayc6812P+I+tiP5mUKighmi8GQMmdKnd+MBVZ4WhQ aOD6WLtev/1AoKQxSkFk6RH8mwCAezow71QOFrWG2ovgnrxIXwqblJ0PBGoTzIlPrnTl qBqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=J1I6TKRylCP5kAvHf5SBZFZNsvG4CTv/pPalrtofNds=; b=U/K4mlujnYPoh5mmUvfct4JuGJ99oY1BUZWE/7kzL58wtIelAGfp7mqhIdYCFgLs70 VJyfeekGo4dY8Sy8ZTKJB8iY9EnMKncYfKlH+hpJf7/h0ujNygKiuZAqMV6ztMNfW52Y vmCKmrtc9pyZP5IrLuHaFmiAve2y37Rg5IkjCa4RykkdweIw8dh6JueLdgmC1R35TOxd ZNqYVHOWUwFoOy75YRBJhhMzEiBnao28VQs1PimS5tXCuDqP0/MfCbdh4KlzYlgG7MBS qCsjlJd49vExu+GPnNobJRaLRqRwgiL2ZmQ5e2fzMK7AaTZ2qLHTH9EHUfTneq9FoN/a PQeQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si9453750plh.307.2019.02.01.20.07.17; Fri, 01 Feb 2019 20:08:06 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726545AbfBBEHM (ORCPT + 99 others); Fri, 1 Feb 2019 23:07:12 -0500 Received: from mga09.intel.com ([134.134.136.24]:12513 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfBBEHM (ORCPT ); Fri, 1 Feb 2019 23:07:12 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2019 20:07:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,550,1539673200"; d="scan'208";a="143571060" Received: from unknown (HELO dpdk-tbie) ([10.67.104.173]) by fmsmga001.fm.intel.com with ESMTP; 01 Feb 2019 20:07:10 -0800 Date: Sat, 2 Feb 2019 12:04:40 +0800 From: Tiwei Bie To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, Jason Wang , virtualization@lists.linux-foundation.org Subject: Re: [PATCH] virtio: drop internal struct from UAPI Message-ID: <20190202040440.GA19948@dpdk-tbie> References: <20190201221553.7210-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190201221553.7210-1-mst@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 01, 2019 at 05:16:01PM -0500, 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 */ > -- > MST Acked-by: Tiwei Bie