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 2A6C8A034C; Mon, 8 Aug 2022 02:30:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3F3241156; Mon, 8 Aug 2022 02:30:14 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 379E7400D7 for ; Mon, 8 Aug 2022 02:30:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659918613; x=1691454613; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ZLO/7b+uTyU71246e1/7TWOn13GwehiZSzBOUkpqM3c=; b=VtM8vif2/4SemJjKOS4Sy2pRXEjuHNKEtUgoD5g+gCTAPSZkrI+pjeDv sFjPsnZh0+YjjfcB2GOqkVYHsI2dLC8pDGWG/gGeliYW1MDlf3jwyrzR1 Q+S5RYRJ7EbTYsVy8DXzVKkmuT/dwxosz8uWN8k0AABFwPeK2fnfuF5W4 kA5plasXeKtK62+86dvq5XlK80JkuRXdgRa2TmdWBNB0njw4Qoq7Wqanl Pi+amnRM6tZZRGE4aqOmVmbSEApqc8HomJ2LjmO4BgO/SYk6FG1j2BYU6 9mvPPvx//Q16eHPdotegJkjq2LICFYQcPda8DbP0OatTlLkNJb3KYxpa9 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10432"; a="291703553" X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="291703553" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2022 17:30:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="607669642" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga007.fm.intel.com with ESMTP; 07 Aug 2022 17:30:11 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.2375.28; Sun, 7 Aug 2022 17:30:11 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sun, 7 Aug 2022 17:30:10 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Sun, 7 Aug 2022 17:30:10 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Sun, 7 Aug 2022 17:30:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QrgOBh8ZaKr4XyEnv+hj9yBGf2n+x8x33IPUDI8asUUKW+LJv/s0DQTo+QU0MsFynd4tjCHqc4nYbeCkp5asZhGWIgkoQsL9DfMVWdfbokG/3ScbewGGybyw0N2YyAoSzRc5g+x5OmDZ/Gb496Gah+D7mr2d/BCdEk8SV3XDmSh1PS3yqZBK7MNC/GgSSiYtNywxnKhYwSexj9KHj1qD+hTYt5NLbkyQgyDmCz2Ql37CuyK3TBnPBCegcqxHsV9LNMB+MmP4Z/u2FMLRVplw1YLte91UfS0tH87hXD4Ram9hEQM7G81TzxDOLXQrcEwU38tO/zBOGzvr0yG6AcPPBw== 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=cSqk3rtbb3dOGJHmtxghEXE1orVFUKP9rck1KK4V30I=; b=gw24N9uPYLDDVFLAacjRixrO2VOhj24Q9zo3fHtIDYbf2ZkUGI6GIjZ2WqLP267DWAwspKELICo2M4V+0ryOZwXw5zs1sigZKZvIT6XS4q0s8e4fTNRavwmGMjKopI3Z4oA+98Tir/kMhjPmoQ7769/fatkRhBnKTXZ5JZfn9SFpmZjFeqKJySVwje1MfHuM1Q807fGxIdilQu/Rb6UfgHL8VRTDLkhnbl2XXRrlX/QCrYjQtewyNB8LNUXiley1J4uLCtglc0uFGW4HRMTQ3SYb3KJVCR5GsbqdaoERIsqIPr4tL5JYAhf+eC9aA51ScbpS/CXFDIinvj4ZLIy6eg== 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 BL1PR11MB5286.namprd11.prod.outlook.com (2603:10b6:208:312::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Mon, 8 Aug 2022 00:30:04 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::dd15:c17:27dd:47f8]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::dd15:c17:27dd:47f8%5]) with mapi id 15.20.5504.020; Mon, 8 Aug 2022 00:30:03 +0000 From: "Zhang, Qi Z" To: "Zhang, Ke1X" , "Xing, Beilei" , "Zhang, Yuying" , "dev@dpdk.org" CC: "Zhang, Ke1X" , "stable@dpdk.org" Subject: RE: [PATCH v5] net/i40e: fix the issue caused by PF and VF release order Thread-Topic: [PATCH v5] net/i40e: fix the issue caused by PF and VF release order Thread-Index: AQHYp+jm4IDX3jP5EUOeDkJkgkKjm62kK+gA Date: Mon, 8 Aug 2022 00:30:03 +0000 Message-ID: References: <20220715090359.76538-1-ke1x.zhang@intel.com> <20220804095003.406115-1-ke1x.zhang@intel.com> In-Reply-To: <20220804095003.406115-1-ke1x.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2c96024d-dc2f-4e33-7ef8-08da78d522d4 x-ms-traffictypediagnostic: BL1PR11MB5286:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NzJs/OgpMmUstINlTsYcEsjzjQ73XRoD5g8cCPr1+g4U1NnV5eYNMaB3nA7nDu4Qp8JeRgvB4PpOhiiKV/O3MxqqgYf26Nutc+Q2pTu9xksbfWFvuaisf8jOOrWM/3/YxlB5ux8QeHNq1Xj5FcZxBP9ZnUk+RhEuYqWRdAMLu+EPE5Zp5klSyYowGwO24QVIAywVSVYoz4732nsqZw0Tov6ttY1nNTzfQ9psYEbo3cXP6262FDmRs4h/8KbbETP0/Q+Pr6cTtqTIPLjcce4OlsoXEjIMIgAs0wOCJN5VDFxOGUGX/gRBbrevZEN4z8UgD2K0XACv4HfBFN7fy4hhPQpSFNca86hNiqTfb4/9gTW2PYSJ+zGvcKCl+QR5FCQq9ahjhwndsfk18yzTTvjhIusMD9ZjC5ZIjpxarDnvAH4taE6p4bhAWmIeyFje5gaphtMVwtuy95z1Nu5iBqMCUW2Dy4cvNGGn3AulKlQYjDGoeroFm7AUZPzyHKAKhOQqynMnTvuJv5HbrS8RhL4yZJPgoLE58OqwjCopBDAuqirujSdatcU3JF4A3KOe/2TENEHeIHSgf7XlZ7c0jxK2AixtlznhO4Y3ZzyPYV8a21JYtuIve32WByAS8mZCYECBuPN02bTb3m18k5iOHE8aAfICtuDprT1blv+xd85ljBK+le77YS1FB6hUax7me5lvmDY/kyod/fP1YcIbCKRNc9IAqn/27DJWjmL/5iDzeZflhnjRqerT2zdh+x+tv3lAItfqfpJEEC3VeyPgM1ZvQCsWICWCHPycLF6/9ev/l0McpVjSeZCqcIDsFHjGeK+g 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:(13230016)(39860400002)(396003)(376002)(346002)(366004)(136003)(6506007)(7696005)(53546011)(2906002)(41300700001)(83380400001)(38100700002)(122000001)(33656002)(186003)(38070700005)(9686003)(26005)(82960400001)(86362001)(71200400001)(64756008)(4326008)(8676002)(66446008)(66476007)(450100002)(66946007)(76116006)(110136005)(54906003)(66556008)(316002)(8936002)(52536014)(478600001)(55016003)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v9jN+MYSuoLQJuI7oo/paXkhUx2BrMbXhpKDWrd7t5TNCDPe/Xgg+BDdpgcS?= =?us-ascii?Q?KtwfOrA5epyOhCx5YnOw/8Au5cNPBs+Tuw3rJsIO7ggtD4TuL2pU2+gP0Sgw?= =?us-ascii?Q?pfdtFDu7yz83WqBdQxHugYDOy937hdXymKrESz0QRCOjNlPotCxyLeo6L7cY?= =?us-ascii?Q?RSyx0nzuAHJ9fS1MjN2esnIyTASsv7Yn4PUpUqCxaiRJgPc11mXTrteuq6E2?= =?us-ascii?Q?zTJC+zjHcS2FqZs3VsSBRw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ZE+GCO?= =?us-ascii?Q?ihgx9IRwi5Kdu2sRad+jcZ0oTiOrlalZ0HrnSyjD+Q/41QhiefMBQ/Q7rW+g?= =?us-ascii?Q?Th6pBvcqkHzFGKb8fgss16zxpMiL/jKo/HezZn5btymp9hUUQp0NdPklt5FX?= =?us-ascii?Q?vPtGY9o7S4VzEiKRWkYbx00YcWb03q6QiUG9Qyx+kpkchCGVmSqGZQ3juzKz?= =?us-ascii?Q?yAQ8GgToxuJtNIlFuO+m/RydqRXstPV6k44F9yM1XS3CDD4slw+iKe6XkbAE?= =?us-ascii?Q?OgUkun/larED014BHrS3P4MlHLYl+IYLJDFA3quUkjDV4omnTJrs3rCpwH73?= =?us-ascii?Q?GyJelsYgSm6Pujo+WMbTbK+wnDlnorGqZ0DeosN0tSes66c0dJ/x0KhgEnOn?= =?us-ascii?Q?9F2SMoWm/qz/cM1+iSIKhZHiPPxtLt2IIZGS7Wesg/H2GoDdVBj56wqdfecJ?= =?us-ascii?Q?2USVvbwZEY9GWkjkknyVslRLsDiukfFn7tQsFYdt?= 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: 2c96024d-dc2f-4e33-7ef8-08da78d522d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2022 00:30:03.3596 (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: kXgkcu36j1YS/8eP8o1OEgTwqr8WeXpsr9a59bP3gv8CO2fAw5JGzI88XiJNsLdBdvPCUGob/miBfxWvATJpCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5286 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 > -----Original Message----- > From: Ke Zhang > Sent: Thursday, August 4, 2022 5:50 PM > To: Xing, Beilei ; Zhang, Yuying > ; dev@dpdk.org > Cc: Zhang, Ke1X ; stable@dpdk.org > Subject: [PATCH v5] net/i40e: fix the issue caused by PF and VF release o= rder >=20 > A segmentation fault occurs when testpmd exit. >=20 > This is due to fetching the device name from PF, PF is freed firstly and = then VF > representor is called later. >=20 > This commit fixes the bug by fetching the device name from VF representor > instead of PF. >=20 > Fixes: e391a7b7f815 ("net/i40e: fix multi-process shared data") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ke Zhang > Acked-by: Yuying Zhang Applied to dpdk-next-net-intel. Thanks Qi > --- > v5: Update the commit log > v4: Update the commit log > v3: Change the design and fix code in driver > v2: Change the testpmd code to fix this issue > --- > --- > drivers/net/i40e/i40e_vf_representor.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_vf_representor.c > b/drivers/net/i40e/i40e_vf_representor.c > index 7f8e81858e..bcd445bcdd 100644 > --- a/drivers/net/i40e/i40e_vf_representor.c > +++ b/drivers/net/i40e/i40e_vf_representor.c > @@ -29,8 +29,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev > *ethdev, > struct rte_eth_dev_info *dev_info) > { > struct i40e_vf_representor *representor =3D ethdev->data- > >dev_private; > - struct rte_eth_dev_data *pf_dev_data =3D > - representor->adapter->pf.dev_data; >=20 > /* get dev info for the vdev */ > dev_info->device =3D ethdev->device; > @@ -104,7 +102,7 @@ i40e_vf_representor_dev_infos_get(struct > rte_eth_dev *ethdev, > }; >=20 > dev_info->switch_info.name =3D > - rte_eth_devices[pf_dev_data->port_id].device->name; > + rte_eth_devices[ethdev->data->port_id].device->name; > dev_info->switch_info.domain_id =3D representor->switch_domain_id; > dev_info->switch_info.port_id =3D representor->vf_id; >=20 > -- > 2.25.1