All of lore.kernel.org
 help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>, dev@dpdk.org
Cc: huawei.xie@intel.com, Thomas Monjalon <thomas.monjalon@6wind.com>,
	Ilya Maximets <i.maximets@samsung.com>
Subject: Re: [PATCH] vhost: ABI/API change announcement due to refactor
Date: Thu, 7 Apr 2016 10:12:00 +0300	[thread overview]
Message-ID: <57060840.5040503@redhat.com> (raw)
In-Reply-To: <1459925635-15299-1-git-send-email-yuanhan.liu@linux.intel.com>

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 <huawei.xie@intel.com>
> Cc: Ilya Maximets <i.maximets@samsung.com>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> ---
>   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 <pmatilai@redhat.com>

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 -

  reply	other threads:[~2016-04-07  7:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06  6:53 [PATCH] vhost: ABI/API change announcement due to refactor Yuanhan Liu
2016-04-07  7:12 ` Panu Matilainen [this message]
2016-04-10  9:58   ` Thomas Monjalon
2016-04-10 10:02     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57060840.5040503@redhat.com \
    --to=pmatilai@redhat.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=i.maximets@samsung.com \
    --cc=thomas.monjalon@6wind.com \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.