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 9E0FB4408A for ; Tue, 21 May 2024 16:50:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E64740395; Tue, 21 May 2024 16:50:19 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mails.dpdk.org (Postfix) with ESMTP id AEC734025C; Tue, 21 May 2024 16:50:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716303016; x=1747839016; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=RT38Fsc10PUVwskvrP+c3KQMbxcTzb1Bd2rsviUj++M=; b=b6rMj/6MBcNoKDNmD9O3QdQYBgpOuOMF6FIYCK2Gzr1McS9MMvG1cRxa eG5s/9tWHakyqLLld4Hrztje1DfsLY4ODYeHfynw3DA7Q0FNOtqOgYAp+ E8SxglJ0EgLDMd5P2Q6roWy+fOTluepL81l3jhBUOXSfR90p1VIauOf5x oQpMoYfaz00HeGgh2LWhEOkzmjUy75IZr7T8S+16zPtpnaOZelQ2wV721 B5rdwYltZLUpz/Hteo+slSBFa7SjE/+k9IudQEjmctAu014BfCu7nAtMV nYGaeDjbr8eMcgOtDhtcf5I2JY+brk/vpMayYrUMjqHbkz0U9QuBtPMcg A==; X-CSE-ConnectionGUID: cuucK7sXT7qpJ4rTG+3kqg== X-CSE-MsgGUID: jyYIlcGaQCKcCZbK2QeN9w== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12349302" X-IronPort-AV: E=Sophos;i="6.08,178,1712646000"; d="scan'208";a="12349302" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 07:50:14 -0700 X-CSE-ConnectionGUID: I9dHjtbGSumzGChKbMhIdw== X-CSE-MsgGUID: 9+yENusiR+K5WUjFp4tI3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,178,1712646000"; d="scan'208";a="37447311" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 21 May 2024 07:50:13 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 21 May 2024 07:50:12 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 21 May 2024 07:50:12 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.40) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 21 May 2024 07:50:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UqZBNNn2FLlzJPcKsY3NFO1ji9koBPvXdmNqT2h/8nDke2iE+nOZKz/CJsxSR5ZqAmZ87MvTTKV5AH+T6Rk8dJ5E/EZuMeyX6MwW6eO7UIU8vXQV9glrHyBvGAxM5S6RZRE0M1SBc7J79TZJOPQU+rlZ6FMEK2rU+M5KhYJlcIJpfaKlWE8ure5EianGeyp9jADrLLVfCzb7txxHBxh7N4g6PnyecbP3i2wpYwH6PsALS/8cYcKYpV9XMV3FYV7dVQf0zRbWNq3ksZyJZAoPOoQvFgdiAMngei17Rms+axSx1+WDAr/WD44M7jfzqOD0+ppJCY+VQiik7T84NO1y8A== 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=GkWQjr+dt3JNkdCslEuiIna5iSW5wmq6GPEQMAtlnGw=; b=H0R3l1CLwqa4EQaSLTINDU6dO7d0Vo4glC2dEHrkmAzUmtpKkq3F7JWAuAC3KIqVXtgn5xQA1ZgDIu+i3XUnPu9g2+KEXO1/kRTSUknkFCstzIoSM5PypkChii9N0TiNa4HWTfuwWpoBHQ1haAYuXgPkxSerZH7Y5Pd/WgSqojVG6zO5dLv1NDHE8NSz7mRt41xRT5bMkycwyKqhC+2TmvmSgwQ/hnRu8k/NFkgVmwdrgL/P/Q5Q1Gxk/HSFGPTZvU6w4o1JsT152FVl2Yy6eJDRi/0hl6D5BHc3jVRu3IU5o0KbqhUmAQO7N+aE5t/ir8Louk1n92krNh1Ug+KlEQ== 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 DM4PR11MB6549.namprd11.prod.outlook.com (2603:10b6:8:8e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Tue, 21 May 2024 14:50:07 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::69f8:59bf:3efd:9ee6]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::69f8:59bf:3efd:9ee6%3]) with mapi id 15.20.7587.035; Tue, 21 May 2024 14:50:07 +0000 Date: Tue, 21 May 2024 15:50:02 +0100 From: Bruce Richardson To: "Burakov, Anatoly" CC: , , , Subject: Re: [PATCH] net/ixgbe: don't create a delayed interrupt handler if one already exists Message-ID: References: <20240418135307.3270094-1-edwin.brossette@6wind.com> <9d70fe94-c1c1-4d78-beb7-0ee6278cb843@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <9d70fe94-c1c1-4d78-beb7-0ee6278cb843@intel.com> X-ClientProxiedBy: DUZPR01CA0238.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::9) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB6549:EE_ X-MS-Office365-Filtering-Correlation-Id: 3793dae2-42ad-4835-bae1-08dc79a54e76 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3PEXQtlFbBdLGtgOxxmpDfZLbvpFhGGLpC0nGUQ9ROfwTK9SWx82iHfzNoYm?= =?us-ascii?Q?ymkxBzgn2EsGgKVl+2qGQbcnHfTntVHo19M5iM4cUf7oirsccbna53Rpp5w+?= =?us-ascii?Q?ZJZcNC7fjEd4DRUSczYOVbwdnjsTyM6wBnc4TVNhF1onWD4s/CighVrPFuyS?= =?us-ascii?Q?riBIEkaZRjG/k3M+SOyW2JWyjTvGTemrLgWULsIyLGHVhtBfjalLp1Iwj40k?= =?us-ascii?Q?YFofNMtB4Lha1Mn0zQlneczdb5/8hqEEi8izO0ugcdeYfSMtJIYRqHIy+jB7?= =?us-ascii?Q?MyKAbCZED2Ldi7uSIXQjSN4EBA8Wu+byWAKuVEv1Rex8kuWuRP921wqQFnLn?= =?us-ascii?Q?6qUeW83S+YoqSToK71HbPYEB/fUxU9mNzg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ii?Q?AeC6UjPMF5hGLMWNqYLXEXujuVic1VuChsQd3QMB7g=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:(13230031)(376005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zfKWUByJM343MfBYzkaAepn7q1VKEpMuhm3tbZcjlepR+kTqLEjZEAlnL58n?= =?us-ascii?Q?psci8zNSY7oAYniDCK2HWo/VGdOrQe+pjq4na0WK2VTMzVVPynr7ea8D+CQb?= =?us-ascii?Q?PL79AsRGkIxgeqEWzttChNJpyo/8H0rfDfLYOtHxr3W3Zi+5e0Nci2zt5gmw?= =?us-ascii?Q?1VZIuufhjuuso8QwD9rkk95hqvXMNI/Tbk4lNhm1aIaYNWbXheNg4ziLqL9R?= =?us-ascii?Q?2hp+gQFyfE3AKplPXP7Yt+EnsdLqs0+04TG8V98rr/5aUt/aAz4egoceT0Ui?= =?us-ascii?Q?0HM9MagCwheHVgms5dPAOyksN4lTvU26qnrxAhBKBdhLSiQqCJ3ppTdNftLN?= =?us-ascii?Q?Qrr2gtRDX71y1TFTtIxefUbFXNon4IL+m0+VXY54a09vgJ14imh8NUTOa1tf?= =?us-ascii?Q?9a38/jfddygFnlhuQFmDS5H5hTq8fDAMdQr3k6YdIo7/TbdyOi1kns4wBSpD?= =?us-ascii?Q?2hNX+H9Riyc1TfcT/7tjba1NBw6Qzd2O+O1aeW0piArVY40a+YQe5mVVcsCs?= =?us-ascii?Q?wI/0Enxct1RbRaoVxao9Z2mU76QXJeyMPS8I0ONYvuP/Qcnc9t3QDw03qZek?= =?us-ascii?Q?C5mPBR72KjEbEsOXwNrHZh2d3s/gF+fzZEaSNgmK9g1u8yuODUGeEp6FchcZ?= =?us-ascii?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3+ytwEK1ywyeN3igHWRg97X83VwBPcc?= =?us-ascii?Q?Ht4krcca4QpoVXqC/yOz6V9OYFiPwShyj7h4/7QOsMiNu7kzLUq0oE5kRQqH?= =?us-ascii?Q?GA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 3793dae2-42ad-4835-bae1-08dc79a54e76 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 14:50:07.5142 (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: oOBCb0ngNXIZt+Zj0EWj2tk5Q8k67J0kVRVQV3hYkQjX6HHOffyvhhdYX01Qpptl2Jq1kr5JkcRqwX0Jwl6zY8JNQqDy1/Caar/WqOwm+QM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6549 X-OriginatorOrg: intel.com 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 Thu, May 16, 2024 at 01:41:22PM +0200, Burakov, Anatoly wrote: > On 4/18/2024 3:53 PM, edwin.brossette@6wind.com wrote: > > From: Edwin Brossette > > > > Since link state may need some time to stabilize after a link state > > change, we cannot update the link state right after one occurs. So link > > state change interrupts (lsc) are handled after a delay. To do this, an > > alarm to call a delayed handler is programmed. This delayed handler is > > tasked with updating the link after a variable delay of one to four > > seconds which should be enough time for the link state to become stable > > again. > > > > However, a problem can occur with some models of network cards. For > > example, ixgbe_mac_X550EM_x may trigger this interrupt twice because > > another interrupt signal is received on the General Purpose Interrupt > > pin SPD0, which has the same interrupt handler. In such a case, the > > delayed interrupt handler would be programmed to be executed twice. > > > > Since we save the original interrupt mask value to restore it after the > > delayed handler is done with its work, we end up overwritting its value > > after the second alarm is programmed. Even worse: when restoring it the > > first time, the saved original mask variable is reset to 0, so we end up > > completely disabling all interrupts when trying to restore this mask > > after the second time the delayed handler is executed. > > > > Add a check on the interrupt mask value when programming the alarm for > > the delayed handler. If the bit for lsc interrupts is unset, it means an > > alarm was already programmed for the delayed handler. In this case, skip > > the alarm creation. > > > > Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts") > > Cc: stable@dpdk.org > > > > Signed-off-by: Edwin Brossette > > --- > Reviewed-by: Anatoly Burakov > Applied to dpdk-next-net-intel Thanks, /Bruce