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 4B23E4584A; Thu, 22 Aug 2024 19:16:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3644042F47; Thu, 22 Aug 2024 19:16:27 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mails.dpdk.org (Postfix) with ESMTP id CD43B42F07; Thu, 22 Aug 2024 19:16:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724346985; x=1755882985; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=XdWwzw7aU/KkKpyz6uPSXt7+vlLZ10qqlgnwSnaHUvM=; b=hY6YDdaWrjKUJAWBM419tJZY3e24TXwvGRa/1w+5EsJC5Cbbh0Je6/uv ZlAzgYRrkdYv4YHMv/5plbPFC8kp7s9m2EgwJurjvA9hmTW8on5NsLSR5 MALm3TMixnbbPlMXc0+tf2I/VddC0gGBlOe6py9So4av2MvQ0MLo08qIT mbA9AcwmKXu32oSzEV1jqQcGvb1U/8ZQ7NiYPrQyStV2XYj5Umg4CZi83 aaeAw/gCkCGYiHaBbZceWqkzmrFa7Ey8Hym2hScZwZbSu3InAJuDO4Psa FaxSqyxzrqt6OHVx5Njqq0yRKOku8L9gNb8rEJwj0qiRIum+YvcUIZ4vm w==; X-CSE-ConnectionGUID: 3nVMi1gcTdeOSyH3TlhJQQ== X-CSE-MsgGUID: p0bxnPXPTcy7WFo4kRVazQ== X-IronPort-AV: E=McAfee;i="6700,10204,11172"; a="26531198" X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="26531198" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2024 10:16:24 -0700 X-CSE-ConnectionGUID: T3I9Oq7uTuulIcQNeJkUcQ== X-CSE-MsgGUID: BnLXCZqITxKvmildosCklw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="65856581" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 Aug 2024 10:16:24 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 22 Aug 2024 10:16:23 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 22 Aug 2024 10:16:23 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.170) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 22 Aug 2024 10:16:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DfwGgqrSoeVIlifnpG2R5XwYav8H9hBviXXDCHNz6oCY9cTWrMPGUBGszy1vBqhgXTqZOL29l+4oRKeL5lLlZFgzXX7GKKMLxkpMnfGFw9OLu2feK1x1wLC9OcUCgqfkIfmylKHfnObzg+KcRvqy/C18W1DvaTeG4afdPt/eXOxUQQ/UxuGCg8/MK3nLgiBF/9gXouzbIC08roxNyHOJgiJEghd4md0lX+wbXkI7WD4z29oNg/ZmL4GFVvXzMOHDIvIgBks5Myw7uOUTH0RySgad28ynRQZXJ5v+PxRqgbjWmr1MhLuPYvVMA6BbdiNEoh3JMHkfbo1CjXAsOB+T6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=FL9RPgYGPJeD03TWTwEFXV6Uh8xQvO7j21KOKNOLqi8=; b=CZ1NsOFp1xT4ijbsJWGMlJx0uLb7ivvvzbxqzowEOVe47dwL0Ag8iCUVCc6hFh5P73iph/NQ+OfUv2wq6T7WrvgY5mz6N5+7NwrmcL0NbSCSEsK8CACChyF+RQQIHEcJIm4BY2SpNmDiKK/PQS+LXDC8tK+wrOTTLXh+fz0Ky/5UQw0W/7LS23ui5dibP/AzrEY9yw6BDJ+8MEXRC0cji40LeAW9q96z66QVmGRrr6zEruqkXa8y9HCxgxP3DYF98WtwlWdaygAwarQlWiit9oSIjMPG3wG2glyPx6Yo7BoTgM2eE2JXxwzYKz6m8Ex1zpeiqGUwR+h16sOKNPNp0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CY5PR11MB6464.namprd11.prod.outlook.com (2603:10b6:930:30::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.20; Thu, 22 Aug 2024 17:16:19 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%2]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 17:16:19 +0000 Date: Thu, 22 Aug 2024 18:16:14 +0100 From: Bruce Richardson To: Kaiwen Deng CC: , Subject: Re: [PATCH] net/iavf: fix core dump when the link is unstable Message-ID: References: <20240806003527.2901320-1-kaiwenx.deng@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: DU2PR04CA0360.eurprd04.prod.outlook.com (2603:10a6:10:2b4::28) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CY5PR11MB6464:EE_ X-MS-Office365-Filtering-Correlation-Id: bee4c003-6589-4064-5545-08dcc2ce234d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?vEK53lZNDmcGjN5lY80MzlJr9iAHalMhrV095wyR5broXotrz+LSRdokZdCQ?= =?us-ascii?Q?0fJ5eXaMXipYgXXxutq4UWk2C5IyChq4N3APRBnFlQXSDmtuGEBArYs/D/9/?= =?us-ascii?Q?kkyfL2M+LIqgp/ayTOpNXAgEAv8HG7uOEiqf7y4z3GjCmdvqJ2QiNO113iAw?= =?us-ascii?Q?sXriy7itEm9iY1aMg0sp17CuGn2h1X74N6kjIt6QPB53pNiPtkodJ/flMfKq?= =?us-ascii?Q?XOCD+IcI3AywSPVTw6PjVv/gzCCJyhzE82iOqaKRK6yvWlktR7QIl/HmAEjz?= =?us-ascii?Q?FUZW+XkVLegDBGnxAwucKNUegKiltSer5q7GHyi0Yr9ZSl9s4AqmvvqW9efj?= =?us-ascii?Q?WN9VvWLSIUWG0kvfd7q1xVJCpUFOHqZ7+hmCRmVMenGXnwZxKwgu9CODMi+k?= =?us-ascii?Q?18NpZ36JKy9gWQQqde9o5g0F5iRaBZu1hebMGw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q?AQYSefKfW7z/9+mLEBADOY7JXwToexu0jUXuzr1sO+9vBg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?uukS27AiipBPvwr4WImaVHSaOKW5dRZcjl5Fa4lTlrhCd2npWWACBr8uw6Qx?= =?us-ascii?Q?JScFlSsPItXQiA3iSwqTAah6tb/+DZJdGcmc5yTAPPdx2XRiov3mtZDButx0?= =?us-ascii?Q?4eJR9q8ULo0EfB9w8GNhIu8kCC+QEAJxrKr/I6UJx5SU61Xqf/4MAnU8v0x8?= =?us-ascii?Q?WI8YJ7WbXFGqyvcI+20tvSDk2kozLIAr/YkWik07J+GYtKVWzSR5cGnfCxgK?= =?us-ascii?Q?cnOEPiwgPqmONeY2AxMbHwbQo+KYBsjYF2/MM5AwBcSE6QKqcpD92jtIpdX6?= =?us-ascii?Q?jll9Pps2+0ovSvvuYifomOh+8JNWTB2blE5XMb2wV43Sl7uB5u6jYbViBjwV?= =?us-ascii?Q?/yB9tAbZiwHLNrs+9vvBXWna8ZeGsC9avfhUSykea2WfbR8BKc1zP7vhDkZb?= =?us-ascii?Q?fvVqWW78P9ydaZtksFDzJ6zpqrEQzomIj9VLD3FPIRUIdI6gWq/c9+rviecq?= =?us-ascii?Q?9jHPUmY5u74tUjaBUpgPgMwNZZhj4JP9hTkxmMui3h8TyikjMR6dZC6KHHt5?= =?us-ascii?Q?3GTLZgMyp408vU5vIGVEYyuu25XibDViiRzbqI/nG8RZ/PP4nB9re+K9DKWy?= =?us-ascii?Q?YGZrD1IHwMsn/plMykNMGmRXE6QnwBymKFQ2+FlH1ixSPaGnRL42Y55XbTv9?= =?us-ascii?Q?TVJQjZzkN+QoddkfQP0tXHPA27EykHavvGFKCHkc3ACszhROIOBQGAXIiyiC?= =?us-ascii?Q?azBfXRokxe//MuisRPzoUdVi7nddJagNNzW2mR50ZFtpzrFoVy2oRwld4fam?= =?us-ascii?Q?tZAEGh11vjNJWkNp+iU6o2VDr9R77WShzzXZry3opxapt6jtjoPheTjRdY15?= =?us-ascii?Q?EcbJ3AeSZP0l4PykOoxgoXvD2Z+iU72v2IpT9pOUt+siCXwWKIjwGo9bghYs?= =?us-ascii?Q?OyCoUQEQMuR78Z03zALpIDm4w2yzBwmf39rdjytmVUAmFu0jZx33GOjct7yK?= =?us-ascii?Q?ARcRZuHXsz6V+6yYvTSw2voujam2GZJPAFAXDcryXYTb/tzO90W5EzJY8Xut?= =?us-ascii?Q?xxmFe0TavaGm+N60qejR9Gcwwqfj8Fg4pplk2bGSRkSlk6M4KsYtoHA/WB4a?= =?us-ascii?Q?sXZnk0NCb1O404+zGfF6093e37Tv5DwVlMdAc169dgUB54zsVd+byJJRvpz8?= =?us-ascii?Q?KBH0FBSF57M2ZC7zObfil5gBtVyorMmOEZPdT9LqYYQcLAZznoZBsqLysElg?= =?us-ascii?Q?4VhXXO7wYeJwjRN0+9b+qM4jfr9WrOzh+lnMI890S8QHBrtXuDR/iH8+am3i?= =?us-ascii?Q?6fW749DXZ1JVs4QYVFFmkJ4tOvM2QSKU8vMkj+ibqkQArfHZhxXvArEFOQJc?= =?us-ascii?Q?rL2jEitjq9fDMJa8cWHFElQmG8EBDJHlPNBzkp/AgQTIGCWmiatNp+n4KO50?= =?us-ascii?Q?hS9ERTxweQ75E9IlobU0uhAmuE6gMx9ZdEL6+hPZOzVXFo77Hng5WONY+u9+?= =?us-ascii?Q?VKQ4xkP9VppBREt98dUxLXtNlHiV5VBiTgRdvwBWFwnFUhTwBCgxvLbskM+o?= =?us-ascii?Q?bE0hbR8oPAfMAApuvum6LeSHrWDUw6m2BIrk8gHioOCdyJM4cqluoc1+VmwS?= =?us-ascii?Q?ik+CAvIAVNJnquFdO1lbVnGKoLHRRwXn5lS0Cudim455yxuigxrVspNBtrEz?= =?us-ascii?Q?iw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bee4c003-6589-4064-5545-08dcc2ce234d X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 17:16:19.3147 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 19CILwWs/1L0avo7CmGfLILff+7qxjcW8Rh+FvAiSixk+Z/CD6sV10feNxIAouOQOGciZUxCl81eLaI98iMFs5OqPVfBbV9tWUWDOCy9bQA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6464 X-OriginatorOrg: intel.com 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 Thu, Aug 22, 2024 at 06:06:39PM +0100, Bruce Richardson wrote: > On Tue, Aug 06, 2024 at 08:35:27AM +0800, Kaiwen Deng wrote: > > Physical link instability may cause a core dump. > > Unstable physical links can result in a large number of link > > change events.Link change events captured by vf before vf > > resources are allocated will result in a core dump. > > > > This commit will check if vf_res is invalid before calling it. > > > > Fixes: 5e03e316c753 ("net/iavf: handle virtchnl event message without interrupt") > > Cc: stable@dpdk.org > > > > Signed-off-by: Kaiwen Deng > Acked-by: Bruce Richardson > > > --- > > drivers/net/iavf/iavf_vchnl.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c > > index 6d5969f084..b85debd40d 100644 > > --- a/drivers/net/iavf/iavf_vchnl.c > > +++ b/drivers/net/iavf/iavf_vchnl.c > > @@ -255,7 +255,7 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len, > > case VIRTCHNL_EVENT_LINK_CHANGE: > > vf->link_up = > > vpe->event_data.link_event.link_status; > > - if (vf->vf_res->vf_cap_flags & > > + if (vf->vf_res != NULL && vf->vf_res->vf_cap_flags & > > VIRTCHNL_VF_CAP_ADV_LINK_SPEED) { > > Since we are adjusting the conditional, we might as well fix the > indentation of it while we are at it. We can use up to 100 columns in DPDK > code, so there is no need to split the flags comparison across two lines. > Also the line continuation should not use a single tab indent - that makes > it look part of the body of the "if" statement, not part of the conditional > itself. > Will fix this on apply. > Patch applied to dpdk-next-net-intel /Bruce