From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E5D1A054A; Tue, 6 Dec 2022 13:59:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E642F40687; Tue, 6 Dec 2022 13:59:23 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 394E14021D for ; Tue, 6 Dec 2022 13:59:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670331561; 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=k/aNFGsknN596sR8XjlTaDZ2jwDE/+3fuV3OJEWrN8U=; b=XsyQ0YBAclMvHaYsC6Qkt4r2BBP0/rRJ/wzkseMentvJUIIghR9MZyN7wdYOlGjNNPrMH6 vucQwhf0mO5gocMC9ArawCLhGSilCXvv9im8wfXJCeTSfH3VZuprvkJlXQhtXtK3zNIFfY Bzkfbhum0R1uMbDbSFvCEWL3gdS93aw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-l9RrzQhpP9e6s4md0wuuqw-1; Tue, 06 Dec 2022 07:58:31 -0500 X-MC-Unique: l9RrzQhpP9e6s4md0wuuqw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BD3B03815D2B; Tue, 6 Dec 2022 12:58:30 +0000 (UTC) Received: from [10.39.208.28] (unknown [10.39.208.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A08812024CBF; Tue, 6 Dec 2022 12:58:29 +0000 (UTC) Message-ID: <4ced62f4-3026-5f77-d80d-946f577b5fb2@redhat.com> Date: Tue, 6 Dec 2022 13:58:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v1 19/21] net/virtio-user: forward control messages to shadow queue To: Stephen Hemminger Cc: dev@dpdk.org, chenbo.xia@intel.com, david.marchand@redhat.com, eperezma@redhat.com References: <20221130155639.150553-1-maxime.coquelin@redhat.com> <20221130155639.150553-20-maxime.coquelin@redhat.com> <20221130085421.31ef0a2d@hermes.local> From: Maxime Coquelin In-Reply-To: <20221130085421.31ef0a2d@hermes.local> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 11/30/22 17:54, Stephen Hemminger wrote: > On Wed, 30 Nov 2022 16:56:37 +0100 > Maxime Coquelin wrote: > >> + if (status != 0 || !dev->scvq) >> + goto out; >> + >> + status = virtio_send_command(&dev->scvq->cq, (struct virtio_pmd_ctrl *)hdr, dlen, nb_dlen); >> +out: > > Maybe I am looking at the diff only, and not seeing something but. > > This looks like just an if statement, why the goto here? > The code was a bit more complex initially, but now it has been simplified, I agree the goto does not make sense anymore. I will rework it in v2. Thanks, Maxime