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 E8D3C42C3E for ; Tue, 6 Jun 2023 11:08:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D65A04113F; Tue, 6 Jun 2023 11:08:31 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2076.outbound.protection.outlook.com [40.107.92.76]) by mails.dpdk.org (Postfix) with ESMTP id 95F2B40697; Tue, 6 Jun 2023 11:08:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B4TYwew1qgy5KOPIJQJ35lh2aAkeVsgeGTkvkMpbyRuwkbiLfiDKugz2DhoIlb+qHPVObWEtMqCJuARqfiNVA7751MrDC82NDdQL+6VDeFj84Abdz+irAANzFNV7AzzlbrbUYLUJfEwU4LiUy01nOYLwM8kvkiy66/bUhk3Hnky+/4AqKRZANPc1J9rkpXNLTLfKDofFJOKB6n0hX2w3+MuF0fXeOyUg4QLO2AU1Dnb9aWgjU/EhFNtMNsOwTev8+AGWwcsDGW3D9li+pDaU54BFN/+zANHJUqU5RVo3m00Hl2RXd5U30Cn20gLYqs7XQmmlzcIYzh+GAVDcilkhbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OIo8gYTwfS0iZcmaqLUBm/9rPwX35tL/FPK1qgv3mh0=; b=eMZQaPHWO1ngFeV1u4tR9B4ZIN49ADU+cQ9f7bxY2q96lE7GaRK0zZnq8z/vPN7GAt5Z8yLac3kMa9k3WtwARuyAOX8E9HGNAL+DBxPYWTL0eiEg0Sbq6Yr0iaREvm1YqHyCfHikuYWlvciGR7AOk2X/ZoAp93FVLYxKQNlmN3acaPlL+l1hUY5YRrbZ5hj/LR3r0YtMMNXHHmhjwItfVzxYPz6JzSqWJrhL+CC6QEEBfbCJkbT+UBFWYtymG4RUqQ63avn6m4BBfEL21B3MBMtmx19YDj/Mwc4vJpOV2ok9ejy+8F/m8bxm0czhPbkaM5xciifgWou8vFbFZB3YBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OIo8gYTwfS0iZcmaqLUBm/9rPwX35tL/FPK1qgv3mh0=; b=2YRHp33dkAlHrS2mrEv7MW5u9OhgiGds5yiORTPNgpMgRo0wikS2ItuyhbBQnMfl2QJ0QaSSSSyItZ9zJru9/JeN/cjZw2WMeMrCRYo69sEJqaDicpkpZa4KYLdZXzzVGyVX+LNx/qrFG4tT0YjvRs62IXRFEZlMHS9LWRx/8F0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SN7PR12MB6931.namprd12.prod.outlook.com (2603:10b6:806:261::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 09:08:27 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::cf07:30f7:a92a:c53b]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::cf07:30f7:a92a:c53b%4]) with mapi id 15.20.6455.030; Tue, 6 Jun 2023 09:08:27 +0000 Message-ID: <3515fc61-74a0-0d33-dada-498251ba84b5@amd.com> Date: Tue, 6 Jun 2023 10:08:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v2] net/vmxnet3: fix return code in initializing Content-Language: en-US To: Kaijun Zeng , dev@dpdk.org Cc: stable@dpdk.org, Jochen Behrens , Bruce Richardson References: <20230528143734.145326-1-user@sklga> <20230602164438.45939-1-corezeng@gmail.com> From: Ferruh Yigit In-Reply-To: <20230602164438.45939-1-corezeng@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0170.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18a::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SN7PR12MB6931:EE_ X-MS-Office365-Filtering-Correlation-Id: 46285ba2-adc6-41d5-c3a5-08db666d970c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Ub4BR/JJvoSNl2j0uy3i/It8az8qWGxOBiF41Mw5OSWL1A+swXsECC4W76JKj4oEilE+T1/yA1b61HAIh0Xr3iT5dtoFOe7VWvqnWfPCmSH5YNQPcP3y91BiXGaBO2fwWiwkC8RdetkjkMEfgP1NkLUj9U6WP8sGjMbx3WW1a3rRrz2i03ltHwK88JWG4sFctgdAuB0q6OykDk5Pya22l2p7Ewa5A9cE1X6/ChtoRkPLy/dsveJDJQhETKg6FeeWaN55naILqnnHKjXtw0pceUf06ET0ly5VC1LZEAyAaTq4Wz4K1ViyTGWIkxzvjo5e7eoP4sE8BD7ep20/yIt+1vYZDBitx7PB0cqGFzIG6rMU2q94YmZVf4+37qr5tFyR5jlluaKPYoGn/4uIfYHibIQYLsJkHN1CyCh6HqEsWdjqJFWvfDWJZkbRN/MRGYrYCg09ZpUx7E1DMexN9NW7EF1FLmwxqFE5xda7OWH4NDxL/nZkoL65BJk1SBN7uKdsbYBA5RwJ4r6VLi4N8dqiYGonUt12rBnVNVB8rejuPBBhEYr7Sb8VvsCbxdAfufaf1HP8VNx+yJRDYjxZ0rv5J6nXX2YkUvzSdT1JwJJVEH+HYXAOK1W7qqCgoQfLqId/kd2plMX4j25DzV5NfI7QQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(366004)(396003)(39860400002)(136003)(346002)(451199021)(6512007)(53546011)(6506007)(2616005)(38100700002)(41300700001)(26005)(31686004)(186003)(6486002)(6666004)(83380400001)(478600001)(54906003)(4326008)(66556008)(66476007)(66946007)(316002)(8676002)(5660300002)(8936002)(44832011)(2906002)(86362001)(31696002)(36756003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eHFnMCtzVGlOYWFNaTIzVDlHTnpWZVdleXJsbk9HcDNKQkM3ZDVSZDg2MU5p?= =?utf-8?B?Ni9HSk1uUnFHd1hwQzlkNnV3c2E4SzFNaFFBVkxoeEw5ZFFTL05uakxUZVkx?= =?utf-8?B?aDlpeXpvUXRXLy9OTDhHa1A0b2dkUklETTFVMFIxWEtiMFA3ekpZSzVnUGZN?= =?utf-8?B?MzYzSzNZbWFDZ2ZkM2hWQktQMm1rbnVNYTAxLyt0Q3AzWkRESWp0Q2drODJ4?= =?utf-8?B?K0UzeVIvdGE1WktGMmVyYjFFZ1RIMWg4UW81anE0Y2o1RW1ROE1DSlhMRmFr?= =?utf-8?B?bWZVZ1lOaGk4dzBoWTVPUjhEZWdkT1V3TS9wSkhJc1RNYlZwNVFRQXJQK0V5?= =?utf-8?B?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riginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46285ba2-adc6-41d5-c3a5-08db666d970c X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 09:08:27.6619 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nsfBLzhgbj0d0GrYjAPyyxsfYFQjj9QSl7BdqAGVNCJ20I8g6q4DPD5Pwnab4OLC X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6931 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 6/2/2023 5:44 PM, Kaijun Zeng wrote: > Improve error handling > > Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation") > Cc: stable@dpdk.org > > Signed-off-by: Kaijun Zeng > --- > drivers/net/vmxnet3/vmxnet3_rxtx.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c > index 73ec1e4727..e615d40d09 100644 > --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c > +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c > @@ -1311,7 +1311,17 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev) > for (j = 0; j < VMXNET3_RX_CMDRING_SIZE; j++) { > /* Passing 0 as alloc_num will allocate full ring */ > ret = vmxnet3_post_rx_bufs(rxq, j); > - if (ret <= 0) { > + > + /* Zero number of descriptors in the configuration of the RX queue */ > + if (ret == 0) { > + PMD_INIT_LOG(ERR, > + "ERROR: Zero descriptor requirement in Rx queue: %d," > + "buffers ring: %d\n", > + i, j); > + return -EINVAL; > + } > + /* Return the errno */ > + if (ret < 0) { > PMD_INIT_LOG(ERR, > "ERROR: Posting Rxq: %d buffers ring: %d", > i, j); Looks good to me, @Jochen any objection?