From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0FB782BE6 for ; Tue, 3 May 2016 00:22:05 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 02 May 2016 15:22:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,569,1455004800"; d="scan'208";a="95911008" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga004.fm.intel.com with ESMTP; 02 May 2016 15:22:03 -0700 From: Yuanhan Liu To: dev@dpdk.org Cc: huawei.xie@intel.com, Thomas Monjalon , Panu Matilainen , Tetsuya Mukawa , Traynor Kevin , Yuanhan Liu Date: Mon, 2 May 2016 15:25:11 -0700 Message-Id: <1462227927-22853-1-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 Subject: [dpdk-dev] [PATCH 00/16] vhost ABI/API refactoring 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: Mon, 02 May 2016 22:22:06 -0000 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, thefeore, 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. The last bit of this patch set is some cleanups, including the one from Ilya. Note that this refactoring breaks the tep_termination example. Well, it's just another copy of the original messy vhost example, and I have no interest to cleanup it again. Therefore, I might consider to remove that example later, and add the vxlan bits into vhost example. Few more TODOs: update release note, update lib version, update version.map Thanks. --yliu --- Ilya Maximets (1): vhost: make buf vector for scatter Rx local Yuanhan Liu (15): vhost: declare backend with int type vhost: set/reset dev flags internally vhost: declare device_fh as int example/vhost: make a copy of virtio device id vhost: rename device_fh to vid vhost: get device by vid only vhost: move vhost_device_ctx to cuse vhost: query pmd internal by vid vhost: add few more functions vhost: export vid as the only interface to applications vhost: hide internal structs/macros/functions vhost: remove unnecessary fields vhost: remove virtio-net.h vhost: reserve few more space for future extension vhost: per device vhost_hlen drivers/net/vhost/rte_eth_vhost.c | 86 ++++------- examples/vhost/main.c | 126 ++++++++------- examples/vhost/main.h | 1 + lib/librte_vhost/rte_virtio_net.h | 197 ++++++------------------ lib/librte_vhost/vhost-net.h | 195 +++++++++++++++++++---- lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 83 +++++----- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 30 ++-- lib/librte_vhost/vhost_cuse/virtio-net-cdev.h | 12 +- lib/librte_vhost/vhost_rxtx.c | 133 ++++++++-------- lib/librte_vhost/vhost_user/vhost-net-user.c | 53 +++---- lib/librte_vhost/vhost_user/virtio-net-user.c | 64 ++++---- lib/librte_vhost/vhost_user/virtio-net-user.h | 18 +-- lib/librte_vhost/virtio-net.c | 213 ++++++++++++++++---------- lib/librte_vhost/virtio-net.h | 43 ------ 14 files changed, 644 insertions(+), 610 deletions(-) delete mode 100644 lib/librte_vhost/virtio-net.h -- 1.9.0