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 A2B4842C08 for ; Thu, 1 Jun 2023 22:01:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92BFC42D35; Thu, 1 Jun 2023 22:01:43 +0200 (CEST) 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 EEC6F42D12 for ; Thu, 1 Jun 2023 22:01:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685649701; 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=ZZ92PF9aOPSacVJ2TZTnyH2W8s8h4Cyob8pRLN1EaEk=; b=OUXFZAaMcMP4Lcrldxhsc8nEwkNRUP0a3jHwRBcvt/8reWVP4k2+DbFzAjOOK+Hv+Uy587 67YBVBmreDgGlU7HCohosz1HDL4+aeQr4GVdNP3mR5ryCqvNOfP4mT8E1agU7ZBOfWTVJm qZlYQyYMnrw30L6SClkEzc4b0lpiBdw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-96-QgYI1Ju3PR-RiNJssSTqXA-1; Thu, 01 Jun 2023 16:01:36 -0400 X-MC-Unique: QgYI1Ju3PR-RiNJssSTqXA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BB3F811E7C; Thu, 1 Jun 2023 20:01:35 +0000 (UTC) Received: from [10.39.208.25] (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACA85492B00; Thu, 1 Jun 2023 20:01:33 +0000 (UTC) Message-ID: Date: Thu, 1 Jun 2023 22:01:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 1/2] net/virtio: propagate return value of called function To: Boleslav Stankevich , dev@dpdk.org Cc: stable@dpdk.org, Andrew Rybchenko , Chenbo Xia , David Marchand , Hyong Youb Kim , Harman Kalra References: <20230322102325.1739053-1-boleslav.stankevich@oktetlabs.ru> From: Maxime Coquelin In-Reply-To: <20230322102325.1739053-1-boleslav.stankevich@oktetlabs.ru> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 3/22/23 11:23, Boleslav Stankevich wrote: > rte_intr_vec_list_alloc() may fail because of different reasons which > are indicated by different negative errno values. > > Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") > Cc: stable@dpdk.org > > Signed-off-by: Boleslav Stankevich > Signed-off-by: Andrew Rybchenko > --- > drivers/net/virtio/virtio_ethdev.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index ae84d313be..5c8b7b95e9 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -1390,6 +1390,7 @@ static int > virtio_configure_intr(struct rte_eth_dev *dev) > { > struct virtio_hw *hw = dev->data->dev_private; > + int ret; > > if (!rte_intr_cap_multiple(dev->intr_handle)) { > PMD_INIT_LOG(ERR, "Multiple intr vector not supported"); > @@ -1401,11 +1402,12 @@ virtio_configure_intr(struct rte_eth_dev *dev) > return -1; > } > > - if (rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec", > - hw->max_queue_pairs)) { > + ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec", > + hw->max_queue_pairs); > + if (ret < 0) { > PMD_INIT_LOG(ERR, "Failed to allocate %u rxq vectors", > hw->max_queue_pairs); > - return -ENOMEM; > + return ret; > } > > if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) { Applied to dpdk-next-virtio/main. Thanks, Maxime