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 A61FDA09D3; Thu, 12 Nov 2020 18:00:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AD6245AB3; Thu, 12 Nov 2020 18:00:30 +0100 (CET) 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 2195056A3 for ; Thu, 12 Nov 2020 18:00:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605200426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vuDwmHcyXVwvGRgwrEDDyOvwtBmj5i/YKEmoCP9IH2c=; b=GlFd75GurroFWwC3l3IYdVvW/218djc64i9DX0AGITlgqQj8wRLRlG/yMc2iWiEz1xT1da rxMeM9150F6F6UlGkwnLk6kLabui0DnE7V2OzC+J8OpHyfnYLMlx9WQ1TYL2c+XLcqnAXv u7CbofC0FVlV4AILBajQZ7nI5nH0Q1o= 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-380-ku1A4vAnNOGXjkFdyx6fCQ-1; Thu, 12 Nov 2020 12:00:24 -0500 X-MC-Unique: ku1A4vAnNOGXjkFdyx6fCQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1CEB71084D81; Thu, 12 Nov 2020 17:00:22 +0000 (UTC) Received: from [10.36.110.32] (unknown [10.36.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06EFB5B4B9; Thu, 12 Nov 2020 17:00:19 +0000 (UTC) To: "Xueming(Steven) Li" , "dev@dpdk.org" , "xuan.ding@intel.com" , "stephen@networkplumber.org" , NBU-Contact-Thomas Monjalon , "stable@dpdk.org" , "chenbo.xia@intel.com" References: <20201109121630.251603-1-maxime.coquelin@redhat.com> <20201109121630.251603-2-maxime.coquelin@redhat.com> From: Maxime Coquelin Message-ID: <03e3a2db-98da-c561-bf13-47c7f1cb6646@redhat.com> Date: Thu, 12 Nov 2020 18:00:18 +0100 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: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 v3 1/3] vhost: fix error path when setting memory tables 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 11/11/20 7:06 AM, Xueming(Steven) Li wrote: >> @@ -1012,16 +1018,13 @@ vhost_user_set_mem_table(struct virtio_net >> **pdev, struct VhostUserMsg *msg, >> if (memory->nregions > VHOST_MEMORY_MAX_NREGIONS) { >> VHOST_LOG_CONFIG(ERR, >> "too many memory regions (%u)\n", memory- >>> nregions); >> - return RTE_VHOST_MSG_RESULT_ERR; >> + goto close_msg_fds; >> } >> >> if (dev->mem && !vhost_memory_changed(memory, dev->mem)) { >> VHOST_LOG_CONFIG(INFO, >> "(%d) memory regions not changed\n", dev->vid); >> - >> - close_msg_fds(msg); >> - >> - return RTE_VHOST_MSG_RESULT_OK; >> + goto close_msg_fds; > Return code will be changed to RTE_VHOST_MSG_RESULT_ERR, is this ok? > Good catch, that is not OK to return RTE_VHOST_MSG_RESULT_ERR here. Will fix in v3. Thanks! Maxime