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 81B1643FF8 for ; Thu, 16 May 2024 13:41:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57AFD402C2; Thu, 16 May 2024 13:41:33 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mails.dpdk.org (Postfix) with ESMTP id 2B8904025C; Thu, 16 May 2024 13:41:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715859691; x=1747395691; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=XA0goHhfsja6eMi7F39/MEuXpjdEi2ACDcn9I6Cuw/I=; b=BNxA54fu2cCeWC9oc/oYaLTIrqUH7s/NSyUE1BUVZbjCuWQGN6O4YP2/ mJ1/TJH+iNVPJV2Mnt0cUIisqMyeLxTxNOAzryZlotCTU3TcQhBPHw8D/ GKVELSq++S6ypCo6Re0LfU6irGmZqdqg9A4JGArnX7NMyVig6RDyG2Bv9 EzCq0CE002FpOWwjen5yIT3ajIAsJKe5htupHUa7w/kWVoYxlX0/aGu1w 1PgfMSkXDvijyje6ZInu3DqeVVX1YUnW4RROb/gzWXHZevT9rguK805To pHwaw4p9EHcpXrvBG4yStJNjcmojzl4P3Gx0fCtgUcOX3mgGYN/o4mcLf w==; X-CSE-ConnectionGUID: n375XBpxQL2kTBoMoLgk7g== X-CSE-MsgGUID: Shh59p2sRv+FkBfpNXURLA== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="23365314" X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="23365314" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 04:41:29 -0700 X-CSE-ConnectionGUID: Nc0IYv9xRM6ntsBwOc+gEw== X-CSE-MsgGUID: Ubj90Q8ZS3Se1jeH2u7rhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="62611619" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 16 May 2024 04:41:30 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 16 May 2024 04:41:29 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 16 May 2024 04:41:28 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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, 16 May 2024 04:41:28 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.41) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 16 May 2024 04:41:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mDumf/TSxcHY1dk/S54oolMsPMain24q4vCTkDeh7wePVAd8+JzE3UCXge6nZ2T6HCH/SfWSp22Bnblfx0R1lonr9IEteg0EFP/SO4OmWRlWYA78i0XAxDvWPWi6ZriHR/aQ46ExsaatSHMvw8VJ4qX+N6u08lQ0rHif8PUF6eYO5tJC2gTxP3f9VdRdVWvTEiCAbivF1VwbuUzydHgkGAfEvfYVHUqne8k8Pm5GJZlb41A0V8oh6esjq5dBsvDYq0KcXwrd/hadOTzoufD/PbeupH0XCSgs0+gEavY4qBG2C+rRcW74m9JcTO2kf4n6Lz/uETYOf6IBHWYNU+3DvQ== 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=pXbx4VFYSO1InO6exJBNJBdQwU116cjjKhZoS11lHLU=; b=SiL5lbKfFdMehZo+RtBDw/h47nsOxtcfHpIIPc//uc0tXPdj4FPCINs75EOOvfCt/qfa6bC6sOaC6V8ymPrD459VL3tUIOalL17kGLQNfedfJ7/cFfsTw8YGwWkDb/2+mTyXH2YULjEFqrzwvxxHDnAcNX4xjq5UQ/thmRPnsgtoHHOks/KKXGInF5YM6RCMC/DQF/GMut9kvp5KyxH3tiuPVwfMOvCwULiPsZMFEh+VWcyXKeeyyZnXyZ2SiSYm31aV+Uk1lyA90VF85Sx4HMUh1PVLtRq+GB8ovUZ0cWEpCm+wMZxrz/i5aJn9Rr3iuN3mjk5QJY3bvGLX3viWdg== 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 DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by SA2PR11MB5194.namprd11.prod.outlook.com (2603:10b6:806:118::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.30; Thu, 16 May 2024 11:41:26 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::8f9b:ae2f:a206:6ea]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::8f9b:ae2f:a206:6ea%5]) with mapi id 15.20.7587.025; Thu, 16 May 2024 11:41:26 +0000 Message-ID: <9d70fe94-c1c1-4d78-beb7-0ee6278cb843@intel.com> Date: Thu, 16 May 2024 13:41:22 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/ixgbe: don't create a delayed interrupt handler if one already exists To: , CC: , References: <20240418135307.3270094-1-edwin.brossette@6wind.com> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: <20240418135307.3270094-1-edwin.brossette@6wind.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB9PR02CA0002.eurprd02.prod.outlook.com (2603:10a6:10:1d9::7) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|SA2PR11MB5194:EE_ X-MS-Office365-Filtering-Correlation-Id: c0fef744-9e8f-413a-8a50-08dc759d1ec5 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: =?utf-8?B?OHk1cGhIY2pqMVp4T3dnaFB3NHp6ZVUySllOcjhWVXJQaEVqL1c4L255LzBS?= =?utf-8?B?VXV1VElCanlnbkI3ZzB2YjVsb0JUZWZCTmxRVXBvaWxReGRyVy8rdVBXYkZ5?= =?utf-8?B?UmozWGpLaHcxT1NyYmhBSUNjWElrTTJsaXRCZkVBR2did3I2MlVsbEU3L0lz?= =?utf-8?B?QkZXQ0F4MFNKUWNNR3VWUUhtdzdHVHozL0YrZjZJcjZvcHk3eWxzZWtXRkJv?= =?utf-8?B?K1hKUzdhbTZuc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?cmxHZ25qeDdYQkdMbmVPeFlSV3JWTVJlQXJWbC9sZDFFTDE4TXBDOXprb2hq?= =?utf-8?B?QnNqcFJ3TTdhYlVtcjk5NlVJcklKMTFBMFdmZmk1bG15TlRuSFEvQVNzWlFp?= =?utf-8?B?bDNzcmRkV1JNVWRIc1BqWnp5N0xTVlFCeVlndk11cFN1Y1IzUnI5YnJ2cFFZ?= =?utf-8?B?RXN2Zms4NzJ4S3hqYWp3cUhicnlBQk1oV0FwWVRzMkI4ZC9IQVV6WDhnS1pk?= =?utf-8?B?dUt5cEpWSC9PTXJmWExDTmdYRTU5T3dEWlRUYjNoeit2eWY0UVZZMTFDai9v?= =?utf-8?B?bVVaUkdicEpoZGJtdk04dnpYWnB2OElabFBXNGFjT3N4R2FGL21UcG8zbWFB?= =?utf-8?B?S3FyT3NyRTl2Z3VxaE96UEdBNzZpZnlkMnFtTGgvV21YS1JGZEg0TjF1UjB3?= =?utf-8?B?bUx6dUNDQmRTMnRXUEQ1QStRSmRNdVVpUWdXWEFqM04zb0REeEFBa0dWVW9t?= =?utf-8?B?Qm5OcW1WMFFOU3JEaldUZGtLYnIxbWFHUmwwWDJBcjFBcHBBZituUDBBWDRK?= =?utf-8?B?MFpmOTg1THBhVjYwZmVFS09PbWxackptaGFHNmNmMTBuMXF1Zy9LNzBnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.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: =?utf-8?B?cmtXNWYzL0xqTllEaVRLeFY1OHJMc1gvdmpUZXNhOWZVMnFIWjFiZjBJUkhq?= =?utf-8?B?NXpZNFF3d3l5bWw5U0tZY05DWUpDRjJFUkcvMXdIcmNZcnJVc2Y5RjF1Z01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wOFgwZVRSTXVXRjJqOWpwOTROYzk3OFdFSm40WVh0ZTAxMTFNWWkw?= =?utf-8?B?MFdOcFJ0OFV4OXNtNFg5YkJPQVEvNjVXK3haTjV4bDcvWURxbG5qUElqT05z?= =?utf-8?B?U09jZWZ0Lys5THcrL3ZUd2hhMnRpdWtwZm9zVDFlZjlnTHhBVjdWLzk5K054?= =?utf-8?B?UjRnL29wNG9uTm0vUy9QV2JRaDdiWUZ3cFBhbGVaQzdGaW5jaW9sRWkxTUUv?= =?utf-8?B?THVLQnpybG9mTmYvdHg1YkRaSDVoOHplMUJVOGw4WlhrcmpyZFlnTTU4ZmJi?= =?utf-8?B?Y0E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: c0fef744-9e8f-413a-8a50-08dc759d1ec5 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2024 11:41:26.7600 (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: J7k+K6MYkyoC0gqsaWDWUQoh19+Ib+MBLWQhqfuIgd26LqyYwVI3f7FZ6x2BQ1nJYRltvMAi6XinhrbLAyj/0P+Fz1fJ+6FliAZHXPstuDc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5194 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 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 -- Thanks, Anatoly