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 D97E2A034C for ; Mon, 8 Aug 2022 02:30:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC85940E25; Mon, 8 Aug 2022 02:30:13 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 8B5E9400D7 for ; Mon, 8 Aug 2022 02:30:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659918611; x=1691454611; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=0CBixuGXq/cyalK910lLv/duIGgC+aEsrexL4TYNpVw=; b=U1e2e16KNgTiVBm7xRKXrCUnDEU075cgwebhM2PYJuVrsiOvVJSWEaT+ 2jPZ21x8PXO35ZBkpyH58oTbWrvDmV2/dg5XIMzrybKKCyXObWWYRKXfN /kjBGORvUXk+N8tXdIJDE/6hUXmHuuVDwHzcpvxCCMAg/6g4QDqYqLYgG L7yHABc6KmiKKDSpQsQawOHIwxlndjHImsy2JfjolqoOY8eJ0RBSBs6C2 72V9w8rZ/mPDSAkT/tMW5TXxN+wZhw58sOt6pyUhxRlVB4d9+9z7/Cdn5 s4Ei8eWlDe8k7HKjEhS1U3+x1AJlo3Bd6vSN2rMDQ37VJnlWnrI8S2V6P w==; X-IronPort-AV: E=McAfee;i="6400,9594,10432"; a="273522206" X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="273522206" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2022 17:30:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="672276194" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga004.fm.intel.com with ESMTP; 07 Aug 2022 17:30:10 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX605.amr.corp.intel.com (10.22.229.18) 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:09 -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:09 -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:09 -0700 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+zjHcS2FqZs3VsSBRwlyGCUvP7Xomgte5WOHv3hSv87JHSE0GK+HX48x?= =?us-ascii?Q?2Qy7idWFaiHPZPxNilzhfffwPzNIpx9lt+0hsOiX6Drzge0GMN7eG5Xjbtec?= =?us-ascii?Q?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iL/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?= arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h1DgZ0B3J0MIjsZJyodreo1mRzDOwReFl1OnoKbg4EgEj6s1S6BJ8cuocb62EDbbrKWlMGdFd429wk2x9EVjk5D/8jfhZHLvY+ae4t4C207BYWFP3M6T7IRzzVOHq76gGFh+pO0oIrdQvZ/yoYtH5hhjimtE6OpymTYVihGip1zs/XUSiiyu/zB3uGA5ppDlkpIc4Xk8KYrvYu52cu1uh4MFYLbqr01ZSsGTwP7+3s0aCkPjTD4QQAxYSJrOBZ1dXu4GeUot/DxH52PtHw69rAg+i2vzu3QO2+ftr0ZED7W27Qyv6Y24pDo3XkNyIztTbwnTI6yKhaLuRC2ZLjZ6Gw== 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=dm3732dbl+OP1oWNX1/quOWXGK5bu+j74nORC/mbvjo=; b=hslQRdz1IbblG99smzS0J33aAhhU7bky7PcAqmtBI9odW9Vmkz2UaAL/c0UYP9CHCcUdTCfO/ZAm/8i6nZ4uVwPDPYwRr2X8B/CfZ06xytIMMI64SRiV3lOPNzYPADXBIY6cKxpSoAdDLL+oMJKFolVwbRZRrrpgbJFlnr7sv0Qo7ajkw4q8ukW52aHg37zvAOQFclH3+djNbMS7MZ91k2h1bLTuj3QJEqUcuyxPx0YnR0/tqCmhLvv/fIG0i9mWbaqzS65NhhOr4czTDxsaEHBbDduf+TIuLdAz5EO0JKTw6ZAh5H+r1XdroJRgXUh26VwIydlbFhfkzi9axQQ/Cw== 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 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 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 > > A segmentation fault occurs when testpmd exit. > > This is due to fetching the device name from PF, PF is freed firstly and = then VF > representor is called later. > > This commit fixes the bug by fetching the device name from VF representor > instead of PF. > > Fixes: e391a7b7f815 ("net/i40e: fix multi-process shared data") > Cc: stable@dpdk.org > > 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(-) > > 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; > > /* 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, > }; > > 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; > > -- > 2.25.1