From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id DA59B2BFE for ; Thu, 7 Apr 2016 09:12:03 +0200 (CEST) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF7297AE94; Thu, 7 Apr 2016 07:12:02 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-7-204.ams2.redhat.com [10.36.7.204]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u377C0wt026199; Thu, 7 Apr 2016 03:12:01 -0400 To: Yuanhan Liu , dev@dpdk.org References: <1459925635-15299-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: huawei.xie@intel.com, Thomas Monjalon , Ilya Maximets From: Panu Matilainen Message-ID: <57060840.5040503@redhat.com> Date: Thu, 7 Apr 2016 10:12:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <1459925635-15299-1-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Subject: Re: [dpdk-dev] [PATCH] vhost: ABI/API change announcement due to refactor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2016 07:12:04 -0000 On 04/06/2016 09:53 AM, Yuanhan Liu wrote: > We currently exposed way too many fields (or even structures) than > necessary. For example, vhost_virtqueue struct should NOT be exposed > to user at all: application just need to tell the right queue id to > locate a specific queue, and that's all. Instead, the structure should > be defined in an internal header file. With that, we could do any changes > to it we want, without worrying about that we may offense the painful > ABI rules. > > Similar changes could be done to virtio_net struct as well, just exposing > very few fields that are necessary and moving all others to an internal > structure. > > Huawei then suggested a more radical yet much cleaner one: just exposing > a virtio_net handle to application, just like the way kernel exposes an > fd to user for locating a specific file, and exposing some new functions > to access those old fields, such as flags, virt_qp_nb. > > With this change, we're likely to be free from ABI violations forever > (well, except when we have to extend the virtio_net_device_ops struct). > For example, following nice cleanup would not be a blocking one then: > > http://dpdk.org/ml/archives/dev/2016-February/033528.html > > Suggested-by: Huawei Xie > Cc: Ilya Maximets > Signed-off-by: Yuanhan Liu > --- > doc/guides/rel_notes/deprecation.rst | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > index ad31355..7d16d86 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -40,3 +40,10 @@ Deprecation Notices > The existing API will be backward compatible, but there will be new API > functions added to facilitate the creation of mempools using an external > handler. The 16.07 release will contain these changes. > + > +* A librte_vhost public structures refactor is planned for DPDK 16.07 > + that requires both ABI and API change. > + The proposed refactor would expose DPDK vhost dev to applications as > + a handle, like the way kernel exposes an fd to user for locating a > + specific file, and to keep all major structures internally, so that > + we are likely to be free from ABI violations in future. > Acked-by: Panu Matilainen I applaud the initiative, public structs are by far the worst offender when trying to maintain a stable ABI because they're so hard to correctly version that hardly anybody besides glibc bothers. - Panu -