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 F12C3A00C4; Mon, 30 May 2022 14:04:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3F7C42B75; Mon, 30 May 2022 14:04:37 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2044.outbound.protection.outlook.com [40.107.102.44]) by mails.dpdk.org (Postfix) with ESMTP id 1CD7E400D6; Mon, 30 May 2022 14:04:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kc9GwEOSzOvXASuQM8jKRX0wQzkMO/YZI018hWvCvtJYnmMwB+ubIMkriQqMC/qkNPKChrW+CvHX/dNMYn7+I1j0lL9aVXfQDB0TxjAbFnl9MICpQenWXX0E9TViMVbW+VCE5eI4/ls6Ce2fYjSnTQERe9BK9rPA9CmUP/XqWxt+t2QqvFdxs329X10XJ5WenNLyYbYvIkfxtO785MetpAQtRz8RWV8DifplOlfScERqPrWrovEDYzexvMFWkGBaprktCtJhHpAuw0Vxnix6896vNSEDf1t/ephLhFcFr6pDzhme6pcFQpWE2hzwl30jODBQWMIFd77C63kmeskKiA== 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=dUeW9dQDK2EIlrFgAxn3N61gLv04zXLz4IjYlrozBC4=; b=EmbEb9XbFtmsZ56eFUbtr8drYqHIxADYJUHMQJwAd/QM7O5aTTC7EopwgnauwR9IVkLxQ4iLjXcu0vog8UlMnvBueGAlz1NiUYKKLEJgCU4Cb4ehQxRDyMx75aV5/4JeRANG9FTTT/yEkXPjh4yGItq5NJHuGGwo/SWefMTkGWsNP5EeyNZuHkMgKy+9oHAAFXTjPxeeMPekhsWlMRQssE1GRyxf1wyDogoUjDh5v+X2ir5S3atxN4L9nvs5TTe3AKFs2DwebhIXlIExfhtVxGx90VO9S6ExRfjpALViO1IloYXl5fnekFD/+lOrGXFQNlHrQvcoFhX60tSMjJFsvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=monjalon.net smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dUeW9dQDK2EIlrFgAxn3N61gLv04zXLz4IjYlrozBC4=; b=GHlxOhMXnGyy03efcla9omIszFwSkinI1WjPsD+MmYZPglbtt5AKyQUHfSVOcbmWoBnhm0WbKrTuCE1gIKkNuJHV5FNmFlYoR0eeGJ4p3573aOlZeYjHhZ5z2IQc/jeuixaV9o6rK4xdd4QBskn+hMsUskDgi6rb5FUet+4NVuQ= Received: from DM6PR08CA0014.namprd08.prod.outlook.com (2603:10b6:5:80::27) by BL0PR02MB5474.namprd02.prod.outlook.com (2603:10b6:208:36::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Mon, 30 May 2022 12:04:34 +0000 Received: from DM3NAM02FT035.eop-nam02.prod.protection.outlook.com (2603:10b6:5:80:cafe::ab) by DM6PR08CA0014.outlook.office365.com (2603:10b6:5:80::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13 via Frontend Transport; Mon, 30 May 2022 12:04:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by DM3NAM02FT035.mail.protection.outlook.com (10.13.4.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5293.13 via Frontend Transport; Mon, 30 May 2022 12:04:33 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 30 May 2022 13:04:32 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 30 May 2022 13:04:32 +0100 Envelope-to: thomas@monjalon.net, humin29@huawei.com, andrew.rybchenko@oktetlabs.ru, stable@dpdk.org, ivan.ilchenko@oktetlabs.ru, dev@dpdk.org Received: from [10.71.118.132] (port=64065) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nve8O-0007Mb-0S; Mon, 30 May 2022 13:04:32 +0100 Message-ID: Date: Mon, 30 May 2022 13:04:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 5/5] ethdev: fix dev state when stop Content-Language: en-US To: Thomas Monjalon , "Min Hu (Connor)" , Andrew Rybchenko CC: , Ivan Ilchenko , References: <20220324030036.4761-1-humin29@huawei.com> <20220503100217.46203-6-humin29@huawei.com> <2404827.KokGdZ0ToA@thomas> From: Ferruh Yigit In-Reply-To: <2404827.KokGdZ0ToA@thomas> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e613efc-4b09-4f3b-76da-08da42348f60 X-MS-TrafficTypeDiagnostic: BL0PR02MB5474:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j7vgjt4sFRUBKwdaIxDK6bNeTGfzEYd/CQGiVL5H71q1xUj/J6kj7G2eAQ4oG/00IIzaGyOBfEiw8vvc5aKV5Wmww36kqjOxOzmyKGTEyYQfFx9xV1zhVLCTin1nGjs3g9TWZX2uy/ownRw2OLyA9+/jVygG1xdV0Bdys4OEEAA/6yV1n7bDRj31/lrSS5EKJZGjNuF59g6Rsn4cFiNiOS4fsJpb++ZbLSdmrROLxwNK1CQWEsJzx7JyotzgzRwTWyZi6DxnP+hbc5JIuSA4XnStMCIIoARhkc4uPzSmnO+jqqkcDqMAlm5ORkWBPbfnHpvigjw84xwt1x/Fs5lk8Y17AhCiO9Dp1Zmn8/C5jyIOKA9/gP7uCuko2ABjaElyahKM1eqsxZ/ngBT4nBr6WOsQqaLjgF/akqegXGUf3oX1te8sxBX2r7wWTBUnTWw6UzoHaVSj93z0AMEbgsZUHr0i6VJ8KMJ2OXTBPbA13Z/v9hu/b5vaaziR86LJ/lcsnZCRpWoJZYkWAIr93u7ekDg7S+TaTqJskxYlmEDrlDx2aWGiPMoIORAHp8/ha0y7nzFLJb/Uvw+BOnUM/gXq7izfZuf5XaXn9+6Rr5lbNpNN8deJB4CO4M1a6uYXrtXeFRHaXer8JBBbFoeughwUSdBlQWHfsN3lvX2/K48u3RNx46RAqrpJA9qm+7U2qt47zD1bVcEGBsgh2jGMQ93DV7xQcSpVqbZTIxJ+Fx9NBy8= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(316002)(110136005)(54906003)(4326008)(8676002)(47076005)(70206006)(40460700003)(26005)(70586007)(53546011)(2906002)(31696002)(83380400001)(82310400005)(36860700001)(5660300002)(36756003)(9786002)(2616005)(31686004)(8936002)(508600001)(426003)(356005)(7636003)(336012)(44832011)(186003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2022 12:04:33.5511 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e613efc-4b09-4f3b-76da-08da42348f60 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT035.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB5474 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 5/26/2022 11:21 AM, Thomas Monjalon wrote: > [CAUTION: External Email] > > 25/05/2022 19:44, Ferruh Yigit: >> On 5/3/2022 11:02 AM, Min Hu (Connor) wrote: >>> Currently, 'dev_started' is always set to be 0 when dev stop, whether >>> it succeeded or failed. This is unreasonable and this patch fixed it. >>> >>> Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Min Hu (Connor) >>> --- >>> lib/ethdev/rte_ethdev.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c >>> index 29a3d80466..e0011372aa 100644 >>> --- a/lib/ethdev/rte_ethdev.c >>> +++ b/lib/ethdev/rte_ethdev.c >>> @@ -1533,8 +1533,9 @@ rte_eth_dev_stop(uint16_t port_id) >>> /* point fast-path functions to dummy ones */ >>> eth_dev_fp_ops_reset(rte_eth_fp_ops + port_id); >>> >>> - dev->data->dev_started = 0; >>> ret = (*dev->dev_ops->dev_stop)(dev); >>> + if (ret == 0) >>> + dev->data->dev_started = 0; >>> rte_ethdev_trace_stop(port_id, ret); >>> >>> return ret; >> >> Change looks good to me, I checked for possible unexpected side effect >> but I did not see any. >> >> @Andrew, @Thomas, if you also don't see/remember any issue related >> change, I will push it soon. > > Acked-by: Thomas Monjalon > Acked-by: Ferruh Yigit Applied to dpdk-next-net/main, thanks.