From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B41B2A09E4; Mon, 4 Jan 2021 06:12:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31E951606C7; Mon, 4 Jan 2021 06:12:48 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id DC96B1606C6 for ; Mon, 4 Jan 2021 06:12:46 +0100 (CET) IronPort-SDR: 8FESmiB46AAcr+Xg9A6NB8B8gyAagFQOrUTUyGZAOsVy3dv/HeKXmi49v3YE8ZgVKDNtmeIfQE /NmJ22FjBEwg== X-IronPort-AV: E=McAfee;i="6000,8403,9853"; a="240995342" X-IronPort-AV: E=Sophos;i="5.78,473,1599548400"; d="scan'208";a="240995342" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2021 21:12:45 -0800 IronPort-SDR: LTuKyyy71/fyTLeNvFrGuLRgn2h1LX+K3Pts4juhrXdhj4qOR+0qmJslv9lLSrfyMpo6jeRLsr IEOVz9DUsROA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,473,1599548400"; d="scan'208";a="345786013" Received: from dpdk_jiangcheng.sh.intel.com ([10.67.119.112]) by orsmga003.jf.intel.com with ESMTP; 03 Jan 2021 21:12:43 -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: Mon, 4 Jan 2021 04:57:51 +0000 Message-Id: <20210104045753.62487-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 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 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. --- 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 | 22 +++-- examples/vhost/ioat.h | 2 +- examples/vhost/main.c | 214 ++++++++++++++++++++++++++++++++---------- examples/vhost/main.h | 7 +- 4 files changed, 179 insertions(+), 66 deletions(-) -- 2.29.2