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 89EEC42AC7 for ; Wed, 10 May 2023 11:51:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7DF7342D56; Wed, 10 May 2023 11:51:13 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9375C40697; Wed, 10 May 2023 11:34:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683711286; x=1715247286; h=from:to:cc:subject:date:message-id:mime-version; bh=7uvwPHQLCzCBMEsry3Pln04HNpyOkzOjFyDQGk2cafM=; b=MKWyw5/Bo+h898lNGFRNtTe/3jakncPOibqLB2HYlcv2raD0nS6SIPhd jOROJozbAvtPSh5Kbk5hTwsW99cEtosCQVrhUYkiLchNMcGvBqIhEdfu6 +ybLKBB3QZlTC5eb2yWP27OC4zvjVn/LWIP5UxPlhA0thafSh0EMfx4tS lWzAhLtjMebL9IcwWnPESOB4EVNCwn7JapQoEpuwUoK1eTj+F9cNQz25H sO2V9BzDpNwb2agPPrxvZK4vSkTlyveTRpMSCCR25uhn7P9W+3NnNgpJl mw9dIX6NJWBWj0pIqU29pGKQ1bmKQi3JCfwi8p5NBaUxqarq+kMMUjKSK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="352360827" X-IronPort-AV: E=Sophos;i="5.99,264,1677571200"; d="scan'208,217";a="352360827" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2023 02:34:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="788859535" X-IronPort-AV: E=Sophos;i="5.99,264,1677571200"; d="scan'208,217";a="788859535" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by FMSMGA003.fm.intel.com with ESMTP; 10 May 2023 02:34:42 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.23; Wed, 10 May 2023 02:34:41 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 10 May 2023 02:34:41 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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; Wed, 10 May 2023 02:34:41 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Wed, 10 May 2023 02:34:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jxOMCJzR0povZWRAe8rKhR5EU7mmP6lnqCfX/8t7esFyBXoc9A/VXaB1cBUWmGdLRqu2SGYcDOYg11tUhl/mqbdRJzYBZhDiaCJ+Dszcvyyf1oAsvPaFLsIZIrYkdzSF1zPx7slYpgJdZ44SakenisDcjDjbAISa6lm6pCzQWhfxGZE7qzd62OBrSUCGQqu9gt5PAp+Ub0ivyAxKgct6sRpAHUwj1kytIILjZeEBHnQLPuZUw6tstYYbreA7IdpnEpCnOe2olhyUjkRYt0bkGLpKWW9ERFLLrVjyC9ZNxCa2cTBKXZ4niGCw/u8pjImeqHLNzt4sW/EgmdRs0A1Ziw== 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=zwoMHKDJBP7ZxKuL5D3lOiXoYoAr0DOlgPz16Ae1Hk0=; b=GR+iSja3gLENgHWmIhkZHnPzbwuiS8dyPF398qA7TB6TYt84Cp139imaBo2UJR2tAgxfW17rFpGkkNyn7n3NYhhfBSfbmvlPYRMbru4ZKPwW40knEzGE+CWViIxjx5v3xBDgho8KspqtqN7SpR6zHmvWfJK/UogTLwNjhN+MrfYWKk8ZoplUmVUWfgdH+x+ayj1bE2apAeWPfA+MsfEQfMNI8LdJB5faFqwz4mT7+nRZQjBzY5lvnfQVUBJB3JyxEO/Gt5KR1nnUjiRk7fABNza7Kun2coN6Rt5QCSooGgKr+tXr5lpKqaanszVWu5e2G0BEhUo4KbIgwgH9dtGLZg== 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 PH7PR11MB6859.namprd11.prod.outlook.com (2603:10b6:510:1ef::11) by PH8PR11MB6561.namprd11.prod.outlook.com (2603:10b6:510:1c0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Wed, 10 May 2023 09:34:39 +0000 Received: from PH7PR11MB6859.namprd11.prod.outlook.com ([fe80::97fe:6f11:1bbb:26af]) by PH7PR11MB6859.namprd11.prod.outlook.com ([fe80::97fe:6f11:1bbb:26af%7]) with mapi id 15.20.6387.020; Wed, 10 May 2023 09:34:39 +0000 From: "Liao, TingtingX" To: "Ye, MingjinX" , "dev@dpdk.org" CC: "Yang, Qiming" , "stable@dpdk.org" , "Zhou, YidingX" , "Ye, MingjinX" , "Zhang, Qi Z" , "Liao, TingtingX" Subject: RE: [PATCH v7] net/ice: fix ice dcf control thread crash Thread-Topic: RE: [PATCH v7] net/ice: fix ice dcf control thread crash Thread-Index: AdmBjA7mxMEUjs7MTxecN/PoKZcTMA== Date: Wed, 10 May 2023 09:34:39 +0000 Message-ID: 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: PH7PR11MB6859:EE_|PH8PR11MB6561:EE_ x-ms-office365-filtering-correlation-id: a8c2e213-f6df-48c7-f58e-08db5139c69f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FS03uOhKMg6VvVPeRSG1CUSxqcHOvLTz9Gu2dC12wcqKRUB35hyl6qPmx87KWdjP0xt7txxbicR4WuneCx4dpJtTDv+vt/SQwG1q8JYCDYaCJJp2L42t8agO5CKCaR5iMXV6S1uoLdDGzx2aYjHsBN2c95rOfzy7jWlNnG4gCCUZmBJNYitrTLczoN2dFedAmLIfGRPnpPInSZj3VL0lTEn8Tbn04IQhGA2vD33giyJKlGqMJ7tGvVlZGLX7YRXhwgGmYAqw9IwhbnP4znDN6E9ymlRFDVSkA8bKTf1a3Qz/m6tEqhQrw3ms/ItrFyAXEkMkoQuCj0+fMsYtInVgFyftRm1Gs9Iif4HklgNGfHYoKfifTz0JMsp8Qv8XfLhptSUOjFZ8sebHLZv7eIv/3ADsvySrdiIBW6dgMarOXg2oAsp7S11dunsa4y3+Kiq8M7zSkjL2IAjtyop0vemQZWF8PJBRBVufcxnu/Fd59uyQFzcuUJdNWoejdqHhvOVSorNXYXh9tGJX4NcxLgAmIa6NHhoZRjmyUkELBFkukV35mhwkGezEgC/hsiCYBwjUjukIOj6ekBPC18Axo5Rdj8lSLbZxcBBib6lpEl1oCOIROoX1gQKjamdEMijKWflx x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6859.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(396003)(136003)(376002)(346002)(39860400002)(451199021)(2906002)(86362001)(83380400001)(38070700005)(186003)(4326008)(66476007)(66946007)(76116006)(64756008)(450100002)(66446008)(66556008)(6506007)(9686003)(26005)(53546011)(107886003)(41300700001)(5660300002)(33656002)(38100700002)(7696005)(52536014)(71200400001)(55016003)(122000001)(54906003)(110136005)(82960400001)(316002)(8676002)(8936002)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sse65Xorb7RBgGh/ZVdze31NE6m/HK4EE7dZ0spO5cBJ2/Dc9kwUI2Fz3x/w?= =?us-ascii?Q?YUAei0XFEbXtVIXx1Q5IQoAqlM2q9nzKuzcvIAJXA4YJnGHPf9khfLRZQK6m?= =?us-ascii?Q?S/wrOGIar4E0UjFv31EGWuywoV0HDElooT7UOz0aSnZkmCaxjIPkcBJrQ71j?= =?us-ascii?Q?6Ivbswu1iaDhyCs59D2VrccBPI2pCWoh1ehWqo79qyLHDdC2Skc+Ajs+mAzQ?= =?us-ascii?Q?wXGKofKNNpAwUQPuxO3n/rocZ16UUE5u1e+LoJYUjR/j/ZWKVjUv4wYMGJLv?= =?us-ascii?Q?n/3EuirBaKYHyQr0eq2QYLE7P5L/IMaSOFqg99cHXD5FpltfK2nTf64V7MNK?= =?us-ascii?Q?ttj09fWCwMcQar9rH/O1t07CR1SiFJ9bjZgzvFqC+otZabPzxOKq7jEIyFrj?= =?us-ascii?Q?LC5tQUy6INEfO2+UqV5s1LYJqhvnpLU0rwKa8lPrEViYdpqJ3ET5nhPsgxB/?= =?us-ascii?Q?sTPvlI3ViP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KPCQAmdWodfvjp?= =?us-ascii?Q?lBXDWtRp+G408eE5ZJ+oCIRkEdHHYhdfSt+Bzo52PuxgZohCmUqdmHYAbm1/?= =?us-ascii?Q?+DW4aXn97jEfaARSoGToHge9BRG2UR27Q/PpLk+F9XI2IRbOrwl3TOm0wvCt?= =?us-ascii?Q?0exwzZI1BqW1IsnOkLHN+C92KAAv7BFteK4sQlG/j1/9JbT1udPpDO9JTq/m?= =?us-ascii?Q?p2f95JjaQlun4MjBi1BudrMkv7PifKsOzPrNcoIW?= Content-Type: multipart/alternative; boundary="_000_PH7PR11MB6859066E0BA05BF4FF2DE1A892779PH7PR11MB6859namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6859.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8c2e213-f6df-48c7-f58e-08db5139c69f X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2023 09:34:39.0346 (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: b4W/YqGa+njXbvhCGxFCOVo0VxUGafn2H2pj1F2fqDqB0OfX9GHZwKGJO3bZbT9WpG5iRd7hAaVmK3r1vtsg3l+jERl92FgKhO6YNdb3tKw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6561 X-OriginatorOrg: intel.com X-Mailman-Approved-At: Wed, 10 May 2023 11:51:12 +0200 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 --_000_PH7PR11MB6859066E0BA05BF4FF2DE1A892779PH7PR11MB6859namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Mingjin Ye > > Sent: Tuesday, April 11, 2023 10:09 AM > To: dev@dpdk.org > Cc: Yang, Qiming >; s= table@dpdk.org; Zhou, YidingX >; Ye, MingjinX >; Zhang, Ke1X >; Zhang, Qi Z > > Subject: [PATCH v7] net/ice: fix ice dcf control thread crash > > The control thread accesses the hardware resources after the resources we= re released, which results in a segment error. > > The 'ice-reset' threads are detached, so thread resources cannot be recla= imed by `pthread_join` calls. > > This commit synchronizes the number of "ice-reset" threads by adding a va= riable ("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 t= he resources. > > 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 > > Signed-off-by: Ke Zhang > > Signed-off-by: Mingjin Ye > Tested-by: Tingting Liao > --_000_PH7PR11MB6859066E0BA05BF4FF2DE1A892779PH7PR11MB6859namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

> -----Original Message-----<= /span>

> From: Mingjin Ye <mingjinx.ye@intel.com>

> Sent: Tuesday, April 11= , 2023 10:09 AM

> To: dev@dpdk.org

> Cc: Yang, Qiming <qiming.yang@intel.com>; stable@dpdk.org; Zhou, YidingX <<= a href=3D"mailto:yidingx.zhou@intel.com">yidingx.zhou@intel.com>; Ye= , MingjinX <mingjinx.ye@intel.c= om>; Zhang, Ke1X <ke1x.zh= ang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.c= om>

> Subject: [PATCH v7] net= /ice: fix ice dcf control thread crash

> =

> The control thread acce= sses the hardware resources after the resources were released, which result= s in a segment error.

> =

> The 'ice-reset' threads= are detached, so thread resources cannot be reclaimed by `pthread_join` ca= lls.

> =

> This commit synchronize= s the number of "ice-reset" threads by adding a variable ("v= si_update_thread_num") to the "struct ice_dcf_hw" and perfor= ming 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.

> =

> Fixes: c7e1a1a3bfeb (&q= uot;net/ice: refactor DCF VLAN handling")

> Fixes: 3b3757bda3c3 (&q= uot;net/ice: get VF hardware index in DCF")

> Fixes: 7564d5509611 (&q= uot;net/ice: add DCF hardware initialization")

> Fixes: 0b02c9519432 (&q= uot;net/ice: handle PF initialization by DCF")

> Cc: stable@dpdk.org

> =

> Signed-off-by: Ke Zhang= <ke1x.zhang@intel.com>

> Signed-off-by: Mingjin = Ye <mingjinx.ye@intel.com&g= t;

 

Tested-by: Tingting Liao <tingtingx.liao@intel.com>

 

 

--_000_PH7PR11MB6859066E0BA05BF4FF2DE1A892779PH7PR11MB6859namp_--