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 65FD042B10 for ; Mon, 15 May 2023 08:29:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 624A6410F9; Mon, 15 May 2023 08:29:01 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id CA01A40395; Mon, 15 May 2023 08:28:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684132139; x=1715668139; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=1CG1XaW4hvP2yPglMMxWL7UqEcEwomSCOY/iDuuKZk4=; b=bC+m1beaOClQLXKvFQw5jgizHDzOaSrcGYTLwl7aP7OW7S3esnUBQaqF Ywa0+1maiJoBnCA+ZEslrZ1tMnqPCctiTsBg3Atv3eZxmmYhj7NhwT8mG Ehu7F3FzZYRjTSfPs8OqiQxMTgew/ytF9GBiZ22di6GjyKxELgk3Chfqq 4AecHUinfwmZWEpl5wPSltjv2LzDZT8waFYQ+AMDKgf40+c6XsTA55P5d RQwKMg94pRejsZQdxZfcxOxAD7s+h4qRq+pcMVWrHokrUCmrNOUmMWhUn SnukCAg8zy14OfI9gKtUIkIwz8P4KdPo+w3ZzHNSgcXoszgGkY3V86cRf g==; X-IronPort-AV: E=McAfee;i="6600,9927,10710"; a="354281287" X-IronPort-AV: E=Sophos;i="5.99,275,1677571200"; d="scan'208";a="354281287" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2023 23:28:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10710"; a="845118805" X-IronPort-AV: E=Sophos;i="5.99,275,1677571200"; d="scan'208";a="845118805" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 14 May 2023 23:28:57 -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.23; Sun, 14 May 2023 23:28:56 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.23 via Frontend Transport; Sun, 14 May 2023 23:28:56 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) 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.23; Sun, 14 May 2023 23:28:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YHuh7+Psj/yeBtrliQ90q/0qCiEN2MsfECDsx8vTveG8WCUjRuIynbQqHomundwANLA6GUiBXNMHcOTvNfh0NkYKYffsaPuC2jd2z70/KDBk+mUV2lguPVWLbKPdnhgSkrua0I1OttSq2Tf0LTmQVHDb8VJsfqIztryohCNidfK/4g9vN6MrT1JSUcLBg+0NjcTExggNuQc3vNSGdRFshuQd4RrtzLb0qp4QOevPPXxp4N1ILbjOn+l1fEGRj8ktdWVUZpPpRGUkZ+U7wdRMi1dHAZhpxilqqxdy/ybexA92JAqgCuLozo50bHxwwxAE/vee0VHwjdceznZXYVsomA== 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=1CG1XaW4hvP2yPglMMxWL7UqEcEwomSCOY/iDuuKZk4=; b=hLiWyjXRN2WPnsi+8Ohwoqw7XlKpOwJcDUQFOrASuOCRMImnzVFiJ6Y7PjdYm/izOTzmXJQ1ZcLHYdJjs1h8OoUuo5iVP7FKFtr52uKF00a6OjB9n3qfxLEWO+TvQv0LL6S0frZDibIH2Z7qm4o4hDsRKBScqc7lEOuCgvpTJkhpKKlo8lZ3cpTuNvdFd3VsUXFNq2/Asaw/ODRMtF+9/o9uej5UNep8OJA3Km10lShElbyNevcA1jwbM7FW+0kIqN3bNNsXdW1OMZpe9oEE60/iB/9hjTUHNb0gUFuuX+e5QDcBEmEY7ji76M/o5ZFfz/b+J/yScP9jtWl3RDpPYg== 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 Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by PH0PR11MB5127.namprd11.prod.outlook.com (2603:10b6:510:3c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.29; Mon, 15 May 2023 06:28:54 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::e570:d9a7:df1b:1589]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::e570:d9a7:df1b:1589%6]) with mapi id 15.20.6387.030; Mon, 15 May 2023 06:28:53 +0000 From: "Zhang, Qi Z" To: "Ye, MingjinX" , "dev@dpdk.org" CC: "Yang, Qiming" , "stable@dpdk.org" , "Zhou, YidingX" , "Zhang, Ke1X" Subject: RE: [PATCH v7] net/ice: fix ice dcf control thread crash Thread-Topic: [PATCH v7] net/ice: fix ice dcf control thread crash Thread-Index: AQHZbBtJGIssDIlsm06m8gP/V7R6vK9bFKzw Date: Mon, 15 May 2023 06:28:53 +0000 Message-ID: References: <20230322055606.84874-1-mingjinx.ye@intel.com> <20230411020855.314971-1-mingjinx.ye@intel.com> In-Reply-To: <20230411020855.314971-1-mingjinx.ye@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|PH0PR11MB5127:EE_ x-ms-office365-filtering-correlation-id: bfbdd696-7927-415b-c97e-08db550da76f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: skMsVL1oi3mRHwxCOH6uBQXnSQlkz0KmNAyPpAxg6uvaFJu+TjQ51bYoRRjL+tPvjti90x/iIx+wPI8AplDAJQWdCoudmRBB53IRxqNWFbco4QSVaNfbpKNrjNDAre/8j5AuVv4EIvzDFwyBsmqEjKV/CaGjedrNbVRf1I7KzGu9/1U9dsknGAwkr0/3hCY1L8sO2UWGC2Vd7fGip/23yN82AzUhxg4tqE9y2pIkrQHTrvNjjKe4VhxgE0tkxQCw8TicluGfDbXUY5KqgQV6pdkD0fhuMPX3ePdAqs6fCTkuKkXk7/0zAwZiEo5juNFI1OuJCTwO3CJ84j5+CxV7Fo6w60b46gOKDoPNI/SlXSlcW1Gus/LKbGPBCrPXofdNMly5rkD5UcWP0hzxBtPkRiZG9k7TZrrAR3C16YCPMwjkFDJVvy4LwxzD7uI798xLTt3XrzLuF+AczfkmNBvHEcrDBad4mbDf12RDSzYmlq2imfp8WsOI2bFPc/eHpWwtPCCL69hUeGodIGhzlNw92tyJlGsXE+qeyqCU8BSeEp2bQmecurj61hcSxd79Gcyn/NQ14zSHHWSII4vxoVcGQbWZ9lL0JYE9btiaYxmJchxzZ297kRSVvf26pEZ/KsH8 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(376002)(136003)(366004)(39860400002)(346002)(396003)(451199021)(83380400001)(55016003)(107886003)(2906002)(7696005)(450100002)(76116006)(66946007)(66476007)(64756008)(66556008)(66446008)(478600001)(110136005)(54906003)(8936002)(8676002)(52536014)(9686003)(26005)(53546011)(186003)(4326008)(316002)(41300700001)(5660300002)(71200400001)(6506007)(82960400001)(86362001)(38070700005)(122000001)(38100700002)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XwFlZbIqesivUwA30QhGIdTTthkPIyvNPKL47bVwNcPXfjcGxUTJTYWdhJ3e?= =?us-ascii?Q?VNz11H8gLnBjYS0+Cu2GsZZeJRO8FoCVBGDJrDkmuaR3MZ4r5hkHCKyHo6kf?= =?us-ascii?Q?BcTpwYtMvb0c33q9iVwXLe9pNkasY9eIAO5K5u3P26wkY8628ajsdu6LcWE2?= =?us-ascii?Q?O8rNc8YCUERxFyrLlWGoVkS3Pix3J7dRANC8JgVkWQNzrI8C0ajY96ZKY0cr?= =?us-ascii?Q?GIbUgiGkjRVxSNlfmb1IoUrv44Hf71a43u7qeoS7U4KR0HOlSBun6yuYlbWR?= =?us-ascii?Q?nk4qG0QVa/KEUFoADr41YxGGj+zH0CZTyc/p2gLvoDXdwsej+u80KIHu0dou?= =?us-ascii?Q?uT1Gn7Zq/BHVoVq1IQAZNjTWioUpxzLMTd6n03rmAJklozSR7q96tkNiOgwj?= =?us-ascii?Q?+BHf/mNwhpLzaneIuxPsis8mBwILcvR5qubmJruAEOAOcTNpHXqbf1oJwCmB?= =?us-ascii?Q?F/qLb+QA1YkjvFNsQyxfTZpDCtBJVgudSBAmTWG4i4+Wy9bKbCE4Dlkl5w1t?= =?us-ascii?Q?1ikXaWPmILGxsv8sfFzRWi4hPvRihF3VKvJWy4sIaoEJr1Z/bMFY7+r48NMq?= =?us-ascii?Q?g4CdVx1EL8eCAF2NGyaoBM16O7aTAm5EYm06s0ZX4ONl9uYEXdZHADtI3HHf?= =?us-ascii?Q?Sb0VP1d4ygQFnfL4jh432I06sqRyorz98rc+WOeInnwpxR7tAPJqczLvIbIS?= =?us-ascii?Q?aqdty7Xn36Egu74kBqZaMft66dQDPybrRRWHApcalJBXROiiKIXPAIz1Easn?= =?us-ascii?Q?5q8xmMvd+Hk2D44hg3uJ5JbWKixcqORTs2x/jIl5GIm+FyhsnVq2wFG8sag3?= =?us-ascii?Q?mS0icu9HqX8vAz/8ECQeWl/E/I6Krs0AiOcwGXByLAW2FBlrNz888FE+jZGF?= =?us-ascii?Q?I7AzgascaKQnLiplQOkFHJU38AZbi+aAcL5oK0ZCuGDXiJVFExUhOTVPrPpq?= =?us-ascii?Q?vFNA8hoHfhJK94aZh6I1a6FdR5cbrEo2tLlHdIuOXVjceRmyMasSnu82C4sV?= =?us-ascii?Q?xO/Y6OqcUP/+nw4fuuUINNrWJ3PMKxHBBVvjRft84ShaWJLhhnThe2NMZlEh?= =?us-ascii?Q?gk76bcuiLp2Oexg4UPjymlD/UAfc8wUma+DnvbDjUuyarKknyMtAinFo+dEz?= =?us-ascii?Q?O2DJAUIyOnu174pummKdG/UB7ac2EN89idfOPB5W3LwdRToRMepTEz9OQGZ/?= =?us-ascii?Q?TAbjgzB7K8UG7QAHPkm9NOa7tr8wgKbVsui1tc5h2ftnKTdgTzcK7bGFzYh+?= =?us-ascii?Q?vB+FDv4YWujzElJXRop16KXNMaHXVj75MjnkqScMNB75AP/Fv9OI4cScGXT4?= =?us-ascii?Q?7sSISVzmO3OmUkP5nPBdZCt4uYlfGPztM6gg2jSrA9xTY3p93v6sDAYzNi/6?= =?us-ascii?Q?Rpbeq5QdF0JfDAiri/fHDCUheow/lRBkCUur6r23xa830DV3+vhQEYkbwqVP?= =?us-ascii?Q?xCZgK+cpOagHAy19Jz7wPCsCDnygnAtc8afJO1gCePMcgUbde81kjhyhzOuN?= =?us-ascii?Q?QXEeuMCVHB16A6RSv8QZyMk0msrwZEpvJb+l1E/M7BEoHEpY5YACevS6MPAr?= =?us-ascii?Q?NhfHbHMo3vN2mcuiZAmWfHOWvW3XqBGXUmiUSJR3?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfbdd696-7927-415b-c97e-08db550da76f X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2023 06:28:53.4758 (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: RpZbdS3rUVlHQeum3W12qN7muhbUJxymgHxKuUHIyNcy8cezRNWkgx3c7OnA7Szlp+RC5cgnXCUlqWUO8tc9Zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5127 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 > -----Original Message----- > From: Ye, MingjinX > Sent: Tuesday, April 11, 2023 10:09 AM > To: dev@dpdk.org > Cc: Yang, Qiming ; stable@dpdk.org; Zhou, YidingX > ; Ye, MingjinX ; Zhang, > Ke1X ; Zhang, Qi Z > Subject: [PATCH v7] net/ice: fix ice dcf control thread crash >=20 > The control thread accesses the hardware resources after the resources we= re > released, which results in a segment error. >=20 > The 'ice-reset' threads are detached, so thread resources cannot be > reclaimed by `pthread_join` calls. >=20 > This commit synchronizes the number of "ice-reset" threads by adding a > variable ("vsi_update_thread_num") to the "struct ice_dcf_hw" and > performing an atomic operation on this variable. When releasing HW > resources, we wait for the number of "ice-reset" threads to be reduced to= 0 > before releasing the resources. >=20 > Fixes: c7e1a1a3bfeb ("net/ice: refactor DCF VLAN handling") > Fixes: 3b3757bda3c3 ("net/ice: get VF hardware index in DCF") > Fixes: 7564d5509611 ("net/ice: add DCF hardware initialization") > Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ke Zhang > Signed-off-by: Mingjin Ye Acked-by: Qi Zhang Applied to dpdk-next-net-intel. Thanks Qi