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 209D94247D; Tue, 24 Jan 2023 19:14:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15B0540223; Tue, 24 Jan 2023 19:14:25 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 59D6D40150 for ; Tue, 24 Jan 2023 19:14:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hZy5OKAwRL7FMPM+OgyIYxXLGc00trMoQsjGTonopByriFRBTlvDyhS64sdocvZcGscWIbPHLsdcioZFUFrY1IUuuTbQt+xa/tOX97qTnX5qrkZEibw4VTUG6mBIqIffTFLD9Zlzqwotj2PVs3npJmTNZOienVbYTMVXH9BFG+3ot75BPCd/fPBCMLbLU25jZVTVl/bPN5s7ryoNNesEM5mi6625uVDBTfFvmP1XBZn31yiBmJhLNsEvJlXcahp613w1zd0EJPjyaOXhpCXMNC3edC6OcWMuRN1o//2rfPpvROnOjG9tJyAaXttbqAgL7UUZsj14QFKKbf1YXosHzA== 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=318JAdiFdLJkd6CRfhynQI+utySqhiaK59cOlD5WCFs=; b=hY1XssuzJOVTNLs9NqoFRjx9RjImRLrQ/+n6VHPljLybPF82KqpDxpEMP646lV374PFtlE7b+Ux2PsYeNjAasaVIS2G8KKEExeJNZelmPSc/zKSZYJWOg4jbK8X+74aVFIQA8mfoWKrSdgA2psrab/NPVZHEegc2v5h6EWblVwBwcRwUvzTbYUHF0nr7Pz62eJg6hVuwND/KlVEYpW053izgfRcGlXLxjbdflr16yq4vWYq6Hwr0cBRP0qV5AoKw9rCWLgM/zLiLY23P3a9tm/v8mJu3/IKoSNTap+ztNFTIg/CnAlr4Sy0rjlI4Dh1rUzh3ubAmnJfPx69KJQv78A== 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=318JAdiFdLJkd6CRfhynQI+utySqhiaK59cOlD5WCFs=; b=KpKFYE37bufmymUpHSZRgP0K6MO80QrcTP8j4Z/Io39M/hEN6Jh6DAFoX6LKm0yNSJR2Lby+BKFh+0zp34FxMCiQGhWGgQcVRYPpmBGLD7+iBpFl229kWxg9GoJIcIXcj3+4r6FeuLAJm8fAaY3t4TprwTCCQVuIjv7d1SK1Uco= 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 SJ2PR12MB8183.namprd12.prod.outlook.com (2603:10b6:a03:4f4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 18:14:21 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%7]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 18:14:21 +0000 Message-ID: <211b3dc8-3d00-c1f3-12b5-8f30d7bbb108@amd.com> Date: Tue, 24 Jan 2023 18:14:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v5 1/2] ethdev: fix ethdev configuration state on reset Content-Language: en-US To: Thomas Monjalon , Hanumanth Pothula Cc: Andrew Rybchenko , dev@dpdk.org, viacheslavo@nvidia.com, jerinj@marvell.com, ndabilpuram@marvell.com References: <20221220200250.2413443-1-hpothula@marvell.com> <20221221020713.2803232-1-hpothula@marvell.com> <2578112.bcXerOTE6V@thomas> From: Ferruh Yigit In-Reply-To: <2578112.bcXerOTE6V@thomas> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0088.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:138::21) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ2PR12MB8183:EE_ X-MS-Office365-Filtering-Correlation-Id: a8dd4d54-acc9-400f-e7a4-08dafe36d093 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: if34JS5VZyts0kQ1BeHoiH0qTn5XUemgJptCAnrwUXapPEkzOrNV3St0J9ce6zKLNQb8WtpEA0PoYBuSYdN7mD3kI2uM3sQO4gnBz2DdLSupB+Mfe/XSupBDvqzKxxcthJ5Xu08EkmvgQRKiBDIALTMvyM4SpuZSlm3hihe3Qr1kFAGCv1DY2t05N9mUCMsMod/TsRWC3eKe38GQrNLLcShGEz2ObASOCQlyrRPMjKgvaHBSYTVKkE98AE7Bbb+eO05PL/KjITYlr1G5Vgw6RV5TpQpoKPQRxKe+aYwNBu4sob5Zj05oZJZ0vEVhrfIEwzCb3nxDmOl1jf+BVX17NY0a1der6t9HYd1FsNL3vR4AhOc3jKlATm0xa1MjHI0SxL/QEj0Q+UTuYOdDeUs6PT6b/5/1k//PuX/6ILs2o9kH2QGGitUCQlF+1aN/VBo4PZM85PDOa0ToRa/mw4BNmU0VB1oAFxQ2K3qYAe4KW58AeKessmxAmFSXZoTl1MAlBsKJtnhdi9htX/sDdeI4gd544Ohs/NTu1fS8k0ZTzFr6JyACsJun6Tf8NrNTbxjwykMytFg8Yv8K8Yd4a8/LG6JKJ3WcaT6rKwTD7D8E/If6gsFY8jFm/vPppP1hv8VHN0hanizczALKHRLQ9zI0BoEoENiI3U7CQddNrynrO6o0s9yUVvReDPOqCNKbzrXlEnIafKBtH7FH26a8w/umJtKoW7f1vWVzFUPcIRxwga0= 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:(13230022)(4636009)(366004)(396003)(346002)(136003)(39860400002)(376002)(451199015)(38100700002)(83380400001)(41300700001)(86362001)(5660300002)(44832011)(2906002)(8936002)(4326008)(316002)(6666004)(6512007)(6506007)(26005)(53546011)(8676002)(186003)(66476007)(66556008)(2616005)(478600001)(110136005)(6486002)(66946007)(31686004)(31696002)(36756003)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T2s0dWpaQzlRZlR3WXlEQWNBUFZYdVZWVXFrMXhlUVJVODJRL2FmSGtmK09a?= =?utf-8?B?dFc5WHVBdHEwdzRyODFINmdhd2w0dFhydHZ4a0NpclFmOFd0cm9GYktkSzRH?= =?utf-8?B?VmpLNURUWWNqTVpUdHF3NUI1MjdVc0JmWkI0VTVzZjJ3VU81QTBPb1lHUGlG?= =?utf-8?B?bHR6NkhWb2NzNXpJWlVnUTNQNEErN0VIVWFyRkRBWDFoTGJ4OEh2YnRTNUFE?= =?utf-8?B?YlI3K2M4WkNKYkhPVjZDMUVvTnFFNDVyaFoyNVM4W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hReUYzQmdRR3BTd25Da1FjeWFvdW9HVjg4?= =?utf-8?Q?Dhe4zV9U5lxyvpqQeYGbx7fnj?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8dd4d54-acc9-400f-e7a4-08dafe36d093 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 18:14:20.9420 (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: pX0upHPh8SS4yH4Jf/a7v31LScfE8Gia9nFo0xK7bmmtfbDBUJjKw3CZVaq6iOwP X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8183 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 1/18/2023 10:29 AM, Thomas Monjalon wrote: > 21/12/2022 03:07, Hanumanth Pothula: >> Presently, on device reset, ethdev configuration state, >> dev_configured, is not reset. >> >> On device reset, reset ethdev configuration state to make >> sure device reconfiguration happens cleanly. >> >> Signed-off-by: Hanumanth Pothula > > A "Fixes" line is missing to show the root cause and help backports. > It should be following, that is when 'dev_configured' flag is introduced but not updated in 'rte_eth_dev_reset()': Fixes: 02edbfab1e7d ("ethdev: add dev configured flag") Cc: stable@dpdk.org Cc: lihuisong@huawei.com @Hanumanth, can you please send a new version with above fixes line and below syntax fix? >> --- a/lib/ethdev/rte_ethdev.c >> +++ b/lib/ethdev/rte_ethdev.c >> @@ -1629,6 +1629,8 @@ rte_eth_dev_reset(uint16_t port_id) >> port_id, rte_strerror(-ret)); >> } >> ret = dev->dev_ops->dev_reset(dev); >> + if (!ret) > > Should be if (ret == 0) > >> + dev->data->dev_configured = 0; > > >