DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mcnamara, John" <john.mcnamara@intel.com>
To: Panu Matilainen <pmatilai@redhat.com>,
	Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Xie, Huawei" <huawei.xie@intel.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	Rich Lane <rich.lane@bigswitch.com>,
	Tetsuya Mukawa <mukawa@igel.co.jp>
Subject: Re: [dpdk-dev] [PATCH v3 00/20] vhost ABI/API refactoring
Date: Thu, 30 Jun 2016 11:15:39 +0000	[thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE2025896B8@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <cc0e70aa-70b1-ec40-e1e5-457e80b08e83@redhat.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
> Sent: Thursday, June 30, 2016 10:05 AM
> To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> Cc: dev@dpdk.org; Xie, Huawei <huawei.xie@intel.com>; Thomas Monjalon
> <thomas.monjalon@6wind.com>; Rich Lane <rich.lane@bigswitch.com>; Tetsuya
> Mukawa <mukawa@igel.co.jp>
> Subject: Re: [dpdk-dev] [PATCH v3 00/20] vhost ABI/API refactoring
> 
> On 06/30/2016 10:57 AM, Yuanhan Liu wrote:
> > On Thu, Jun 30, 2016 at 10:39:45AM +0300, Panu Matilainen wrote:
> >> On 06/07/2016 06:51 AM, Yuanhan Liu wrote:
> >>> v3: - adapted the new vhost ABI/API changes to tep_term example, to
> make
> >>>      sure not break build at least.
> >>>    - bumped the ABI version to 3
> >>>
> >>> NOTE: I created a branch at dpdk.org [0] for more conveinient testing:
> >>>
> >>>    [0]: git://dpdk.org/next/dpdk-next-virtio for-testing
> >>>
> >>>
> >>> Every time we introduce a new feature to vhost, we are likely to
> >>> break ABI. Moreover, some cleanups (such as the one from Ilya to
> >>> remove vec_buf
> >> >from vhost_virtqueue struct) also break ABI.
> >>>
> >>> This patch set is meant to resolve above issue ultimately, by hiding
> >>> virtio_net structure (as well as few others) internaly, and export
> >>> the virtio_net dev strut to applications by a number, vid, like the
> >>> way kernel exposes an fd to user space.
> >>>
> >>> Back to the patch set, the first part of this set makes some changes
> >>> to vhost example, vhost-pmd and vhost, bit by bit, to remove the
> >>> dependence to "virtio_net" struct. And then do the final change to
> >>> make the current APIs to adapt to using "vid".
> >>>
> >>> After that, "vrtio_net_device_ops" is the only left open struct that
> >>> an application can acces, therefore, it's the only place that might
> >>> introduce potential ABI breakage in future for extension. Hence, I
> >>> made few more
> >>> (5) space reservation, to make sure we will not break ABI for a long
> >>> time, and hopefuly, forever.
> >>
> >> Been intending to say this for a while but seems I never actually got
> >> around to do so:
> >>
> >> This is a really fine example of how to refactor an API against
> >> constant ABI breakages, thank you Yuanhan!
> >
> > Panu, thanks!
> >
> >> Exported structs are one of the biggest obstacles in keeping a stable
> >> ABI while adding new features, and while its not always possible to
> >> hide everything to this extent, the damage (erm,
> >> exposure) can usually be considerably limited by careful API design.
> >
> > Agreed.
> >
> >> Since the first and the foremost objection against doing this in the
> >> DPDK context is always "but performance!", I'm curious as to what
> >> sort of numbers you're getting with the new API vs the old one? I'm
> >> really hoping other libraries would follow suit after seeing that its
> >> possible to provide a future-proof API/ABI without sacrificing
> >> performance :)
> >
> > From my (limited) test, nope, I see no performance drop at all, not
> > even a little.
> 
> Awesome!
> 
> With that, hopefully others will see the light and follow its example.
> If nothing else, they ought to get a bit envious when you can add features
> left and right without ever having to wait for API/ABI break periods etc
> ;)

Agreed. We should be doing more of this type of refactoring work to make the API/ABI less easier to break.

John

  reply	other threads:[~2016-06-30 11:15 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02 22:25 [dpdk-dev] [PATCH 00/16] " Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 01/16] vhost: declare backend with int type Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 02/16] vhost: set/reset dev flags internally Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 03/16] vhost: declare device_fh as int Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 04/16] example/vhost: make a copy of virtio device id Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 05/16] vhost: rename device_fh to vid Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 06/16] vhost: get device by vid only Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 07/16] vhost: move vhost_device_ctx to cuse Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 08/16] vhost: query pmd internal by vid Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 09/16] vhost: add few more functions Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 10/16] vhost: export vid as the only interface to applications Yuanhan Liu
2016-05-10 16:17   ` Rich Lane
2016-05-10 16:39     ` Yuanhan Liu
2016-05-10 17:13       ` Rich Lane
2016-05-10 17:29         ` Yuanhan Liu
2016-05-10 19:22           ` Thomas Monjalon
2016-05-02 22:25 ` [dpdk-dev] [PATCH 11/16] vhost: hide internal structs/macros/functions Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 12/16] vhost: remove unnecessary fields Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 13/16] vhost: remove virtio-net.h Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 14/16] vhost: reserve few more space for future extension Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 15/16] vhost: per device vhost_hlen Yuanhan Liu
2016-05-02 22:25 ` [dpdk-dev] [PATCH 16/16] vhost: make buf vector for scatter Rx local Yuanhan Liu
2016-05-13  5:24 ` [dpdk-dev] [PATCH v2 00/19] vhost ABI/API refactoring Yuanhan Liu
2016-05-13  5:24   ` [dpdk-dev] [PATCH v2 01/19] vhost: declare backend with int type Yuanhan Liu
2016-05-13  5:24   ` [dpdk-dev] [PATCH v2 02/19] vhost: set/reset dev flags internally Yuanhan Liu
2016-05-13  5:24   ` [dpdk-dev] [PATCH v2 03/19] vhost: declare device fh as int Yuanhan Liu
2016-05-13  5:24   ` [dpdk-dev] [PATCH v2 04/19] examples/vhost: make a copy of virtio device id Yuanhan Liu
2016-05-13  5:24   ` [dpdk-dev] [PATCH v2 05/19] vhost: rename device fh to vid Yuanhan Liu
2016-05-13  5:24   ` [dpdk-dev] [PATCH v2 06/19] vhost: get device by vid only Yuanhan Liu
2016-05-13  5:24   ` [dpdk-dev] [PATCH v2 07/19] vhost: move vhost device ctx to cuse Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 08/19] vhost: introduce new API to export numa node Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 09/19] vhost: introduce new API to export number of queues Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 10/19] vhost: introduce new API to export ifname Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 11/19] vhost: introduce new API to export queue free entries Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 12/19] vhost: remove dependency on priv field Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 13/19] vhost: export vid as the only interface to applications Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 14/19] vhost: hide internal structs/macros/functions Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 15/19] vhost: remove unnecessary fields Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 16/19] vhost: remove virtio-net.h Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 17/19] vhost: reserve few more space for future extension Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 18/19] vhost: per device virtio net header len Yuanhan Liu
2016-05-13  5:25   ` [dpdk-dev] [PATCH v2 19/19] vhost: make buf vector for scatter Rx local Yuanhan Liu
2016-05-26 17:04   ` [dpdk-dev] [PATCH v2 00/19] vhost ABI/API refactoring Rich Lane
2016-05-27  1:36     ` Yuanhan Liu
2016-06-07  3:51   ` [dpdk-dev] [PATCH v3 00/20] " Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 01/20] vhost: declare backend with int type Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 02/20] vhost: set/reset dev flags internally Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 03/20] vhost: declare device fh as int Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 04/20] examples/vhost: make a copy of virtio device id Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 05/20] vhost: rename device fh to vid Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 06/20] vhost: get device by vid only Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 07/20] vhost: move vhost device ctx to cuse Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 08/20] vhost: introduce new API to export numa node Yuanhan Liu
2016-06-07 11:42       ` Panu Matilainen
2016-06-07 12:45         ` Yuanhan Liu
2016-06-08 21:51       ` Rich Lane
2016-06-09  4:45         ` Yuanhan Liu
2016-06-13 10:05           ` Yuanhan Liu
2016-06-07  3:51     ` [dpdk-dev] [PATCH v3 09/20] vhost: introduce new API to export number of queues Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 10/20] vhost: introduce new API to export ifname Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 11/20] vhost: introduce new API to export queue free entries Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 12/20] vhost: remove dependency on priv field Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 13/20] vhost: export vid as the only interface to applications Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 14/20] vhost: hide internal structs/macros/functions Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 15/20] vhost: remove unnecessary fields Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 16/20] vhost: remove virtio-net.h Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 17/20] vhost: reserve few more space for future extension Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 18/20] examples/tep_term: adapt to new vhost ABI/API changes Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 19/20] vhost: per device virtio net header len Yuanhan Liu
2016-06-07  3:52     ` [dpdk-dev] [PATCH v3 20/20] vhost: make buf vector for scatter Rx local Yuanhan Liu
2016-06-14 12:00     ` [dpdk-dev] [PATCH v3 00/20] vhost ABI/API refactoring Yuanhan Liu
2016-06-30  7:39     ` Panu Matilainen
2016-06-30  7:57       ` Yuanhan Liu
2016-06-30  9:05         ` Panu Matilainen
2016-06-30 11:15           ` Mcnamara, John [this message]
2016-06-30 11:40             ` 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=B27915DBBA3421428155699D51E4CFE2025896B8@IRSMSX103.ger.corp.intel.com \
    --to=john.mcnamara@intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=mukawa@igel.co.jp \
    --cc=pmatilai@redhat.com \
    --cc=rich.lane@bigswitch.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).