From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3532A04B7; Wed, 14 Oct 2020 11:31:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0417E1DDB6; Wed, 14 Oct 2020 11:31:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id CD5821DD8C for ; Wed, 14 Oct 2020 11:31:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602667863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yIzb352s0c+I7g7WmGkyTWlSyOcaWDVqRvOLsjeaWbc=; b=HDGe+eDXEUBA69bRtp2OxkJcv2IMpxXMgo0Yx8rteh/GpXYX2a8Dd64KO28F+aJqfXAf/5 CY+N/AgFM9y9NezKG0Ngzx9mrLRpcJgTzaz9ed8TCzLIiFbCrsfg+w96aFeZORfgxRGdhb sWBraPnrhYIsYsQOwOswvCCO+sLx5SQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-596-_-60t6b_PwGM9WqaBWyZzA-1; Wed, 14 Oct 2020 05:31:00 -0400 X-MC-Unique: _-60t6b_PwGM9WqaBWyZzA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 29CD664089; Wed, 14 Oct 2020 09:30:59 +0000 (UTC) Received: from [10.36.110.38] (unknown [10.36.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D73BC19C71; Wed, 14 Oct 2020 09:30:57 +0000 (UTC) To: Patrick Fu , dev@dpdk.org, chenbo.xia@intel.com Cc: zhihong.wang@intel.com, cheng1.jiang@intel.com References: <20200911015316.1903181-1-patrick.fu@intel.com> <20201013014546.2896162-1-patrick.fu@intel.com> <20201013014546.2896162-3-patrick.fu@intel.com> From: Maxime Coquelin Message-ID: Date: Wed, 14 Oct 2020 11:30:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201013014546.2896162-3-patrick.fu@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 2/4] vhost: dynamically allocate async memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On 10/13/20 3:45 AM, Patrick Fu wrote: > Allocate async internal memory buffer by rte_malloc(), replacing array > declaration inside vq structure. Dynamic allocation can help to save > memory footprint when async path is not registered. > > Signed-off-by: Patrick Fu > --- > lib/librte_vhost/vhost.c | 69 ++++++++++++++++++++++++++-------------- > lib/librte_vhost/vhost.h | 4 +-- > 2 files changed, 47 insertions(+), 26 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime