From patchwork Tue Jan 12 04:38:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang, Cheng1" X-Patchwork-Id: 86364 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D0FAA04B5; Tue, 12 Jan 2021 05:49:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB95D140D0A; Tue, 12 Jan 2021 05:49:40 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id CD5BD140D09 for ; Tue, 12 Jan 2021 05:49:39 +0100 (CET) IronPort-SDR: nTiGn5MSe6MFKrdpnH3gtF0Mntjw9FVsTaf3/RCp7HREVg4mtXlWN6dlGEtDp7uM5ePzCmVIBH tl8rTgF4RMig== X-IronPort-AV: E=McAfee;i="6000,8403,9861"; a="196599684" X-IronPort-AV: E=Sophos;i="5.79,340,1602572400"; d="scan'208";a="196599684" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 20:49:38 -0800 IronPort-SDR: JM3Cy7deu9WelpskBXy5KL7VHVVRX43jKbc4VHeTNp6+vxKst1Go4L6QlYFGl6E3t+uS43AYX2 0n9FQlwt3K5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,340,1602572400"; d="scan'208";a="351768103" Received: from dpdk_jiangcheng.sh.intel.com ([10.67.119.112]) by orsmga006.jf.intel.com with ESMTP; 11 Jan 2021 20:49:36 -0800 From: Cheng Jiang To: maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: dev@dpdk.org, Jiayu.Hu@intel.com, YvonneX.Yang@intel.com, yinan.wang@intel.com, Cheng Jiang Date: Tue, 12 Jan 2021 04:38:55 +0000 Message-Id: <20210112043857.19826-1-Cheng1.jiang@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201218113327.70528-1-Cheng1.jiang@intel.com> References: <20201218113327.70528-1-Cheng1.jiang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 0/2] examples/vhost: sample code refactor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Refactor the vhost sample code. Add ioat ring space count and check in ioat callback, optimize vhost data path for batch enqueue, replace rte_atomicNN_xxx to __atomic_XXX and refactor vhost async data path. --- v9: * migrated atomic_XXX to __atomic_XXX and updated git log v8: * rebased codes v7: * fixed rte_ioat_completed_ops() fail handler issue v6: * adjusted the value of MAX_ENQUEUED_SIZE in ioat.h v5: * added vhost enqueue buffer free when destroy a vhost device * added rte_ioat_completed_ops() fail handler * changed the behavior of drain_vhost_table() function * changed some variable names * changed some variable definition * added rte_zmalloc() fail handler * added some comments * fixed some typos v4: * improved code structure * improved vhost enqueue buffer memory allocation * cleaned some codes v3: * added some variable initiation * cleaned some codes v2: * optimized patch structure * optimized git log * replaced rte_atomicNN_xxx to atomic_XXX Cheng Jiang (2): examples/vhost: add ioat ring space count and check examples/vhost: refactor vhost data path examples/vhost/ioat.c | 24 +++-- examples/vhost/ioat.h | 2 +- examples/vhost/main.c | 238 ++++++++++++++++++++++++++++++------------ examples/vhost/main.h | 6 +- 4 files changed, 191 insertions(+), 79 deletions(-) -- 2.29.2