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 EF11A41E21; Thu, 9 Mar 2023 20:09:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9659B40ED7; Thu, 9 Mar 2023 20:09:06 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 016DA40695 for ; Thu, 9 Mar 2023 20:09:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678388944; x=1709924944; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=bsgLJceAYXdOnC9sRI06p6AIPLm+Bz+7JgpAT4P+LRQ=; b=fU1Cqaw+9Gk81CXqJr6/KUimCcgpO7QtPwHVDndC1AWhNCDYrQjshm4h Rw/0s8w/PzPfiPSktkrQfWD9zrr+XMXnblsRr3o+YAsL3HeJYHXj3nTK2 kZPPUq1qPsqPGBMGHY7RSkuoFm9oEwgGFojYLvcFAa8DpTwlfIjNBGLli YsM55usLxKZprlzdoUgT9V7XtkAxc5GbwcKRXwkGNu1tv1eaRXq/Lni+3 dKg/UeB5upGX53csIYePpEfvZSZXVhpCq2vy3Z0RTohwYuWnfpBySaqoq 9qE4KtK0T/LAFUWpH+JD8yQDekop5b+G5vGiNdAf7vxsaDgbQ9Ig2fxfQ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10644"; a="334020731" X-IronPort-AV: E=Sophos;i="5.98,247,1673942400"; d="scan'208";a="334020731" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 11:08:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10644"; a="801278520" X-IronPort-AV: E=Sophos;i="5.98,247,1673942400"; d="scan'208";a="801278520" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga004.jf.intel.com with ESMTP; 09 Mar 2023 11:08:15 -0800 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.21; Thu, 9 Mar 2023 11:08:15 -0800 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.21; Thu, 9 Mar 2023 11:08:14 -0800 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.21 via Frontend Transport; Thu, 9 Mar 2023 11:08:14 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) 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.21; Thu, 9 Mar 2023 11:08:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dl2Op9EQSbv8M2tWFw7c+2tz3PUyMry9nfYabwDIrVDNo/UmVokhy62XnEesDplWq25lnK9puqoSxvKdrR3J9eNqjJXdtGDH8zG2iHXhMNyqrhFK7tJ4yq/9nAQegCuXQzUaWBF+045WzRLw+zbfPdy6FxvYb3z5KJ8O66rJ2jgFwufgTFA8xuOAVuP+YhqZA4i0CX16cOgvC66jW8ZMUMcfryQ2feNS6ZON3J9c2y9Ps3MmuCDxpEcgcohNMynh1GbQSchNO/lod4MKmZIlhA9lONnlXJlh+JjbVw/EPezybB2AfFyaRMxpLSE4W6Htms0mHmjRyZegq3hvKNVaSw== 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=szIq1QYFY1dUBxs+lB3hBZck7970CRF5/yr8SW/8mF8=; b=Lv/TNNrgYcguBaP4iVl48C8th8NMb3ul0dISHbyiu5pE4WLPrpSUoFqxYFY83i8SIoJHrixKBNpkDVoogA+BJWwDNMtqJ7hkX+ihcb99teLa52yGqalT/QULcDFV5EPuUnghS3HcX5yQRl/9hmbbYxAPcAfVrVgoruyDe5R1+JRb0JBJJaJYF11TxZJyYGfQCCm70mqIWIXVZ0nNxI5tNLZek/SR2YMEuEuNp9odYrNvU9vB3XSn7tBXrRLl5kN7BABoetc5SiALxql7VL11l2uUpUruBmVwKDOAtOaU5QbAQaqdgEwz8i/3j78NrrxQ2d7nfWKZEA14nQbNHUhrWg== 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 CH0PR11MB5724.namprd11.prod.outlook.com (2603:10b6:610:101::22) by IA1PR11MB6467.namprd11.prod.outlook.com (2603:10b6:208:3a5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.29; Thu, 9 Mar 2023 19:08:12 +0000 Received: from CH0PR11MB5724.namprd11.prod.outlook.com ([fe80::81e6:4df3:9629:7ed4]) by CH0PR11MB5724.namprd11.prod.outlook.com ([fe80::81e6:4df3:9629:7ed4%6]) with mapi id 15.20.6178.019; Thu, 9 Mar 2023 19:08:11 +0000 From: "Dumitrescu, Cristian" To: "Jangra, Yogesh" , "dev@dpdk.org" , "Singh, Aman Deep" , "Zhang, Yuying" CC: "R, Kamalakannan" , "Suresh Narayane, Harshad" Subject: RE: [PATCH] app/testpmd: fix closing softnic port before ethdev ports Thread-Topic: [PATCH] app/testpmd: fix closing softnic port before ethdev ports Thread-Index: AQHZUpWpARBX8L4J1EaVq7nwtdmnNa7yzyBw Date: Thu, 9 Mar 2023 19:08:11 +0000 Message-ID: References: <20230309144249.1199517-1-yogesh.jangra@intel.com> In-Reply-To: <20230309144249.1199517-1-yogesh.jangra@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: CH0PR11MB5724:EE_|IA1PR11MB6467:EE_ x-ms-office365-filtering-correlation-id: 3c7161d8-949b-459d-cfd7-08db20d1a0a2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dmQCOhi16ag6Nh0Wt5YInaT09zekUVXxE7nlDKU4aMmpUng75T0qMIyvmINB5moAhv3Eubpv4ngWKnGGo+BKdHpF/NfRMKm4y/Mx+oHWYRSpQ7ElqIdcO+jTWuV2U5wFwHvBvMjMYChFuuwjeY9qWuDPRtgaHvf1rEAvZudi+I5EbJn8JDN7Wf0rJIDLST6uK3VFvNuz2ANtAyLtHOHndtPRtcfmi9RYzXmkDYo3mlDrWEaKchJXhL1UWH7SW9PCW82Dy5Q3xo1GMFVehNYEHzYAsTQPA9k6HMzET/JHbZ87D3l9YsJ/WzRh3OSZQZErH6sUyRZmWb4bh2T/isZ/PJeKzogGrs3fz3TgRhi66JI3dcyMEVdesFnltdG9K9HJWmFospBom0kfLvnZ3facIuubogbc5b3sd3aFmqm3CvD99j2xol+4jEkpC23xYcY3hpSX8uK3Bei7hryyYAU847yj+ZlNl8ZlLbdB8FCHBTrDcQCc2Qxl8wmO/8CjV70y8UdvsNaHzJnGdgJD6T5/mJomGkoipVu5g2dGxi/WNZoGMPgZ2XtaG6ZM8ZeV4RtVQai5VKjQQeQn6MBwVGzOYPRFLUW7Eew6USfr7FyE5PW8Y5WbmbTtH6fMTsMvV1+BDLuUZIqldcXs1JkVsq6k/zHAyxfhB6L9UQ6A3+A4H/X/QuLltp2r/wYOAqlEExNavDMOsoSRVFmX26tWLYGN3A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR11MB5724.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(366004)(39860400002)(136003)(396003)(346002)(376002)(451199018)(107886003)(26005)(6506007)(33656002)(53546011)(82960400001)(38070700005)(83380400001)(86362001)(55016003)(122000001)(38100700002)(9686003)(186003)(7696005)(66476007)(8676002)(41300700001)(64756008)(66556008)(478600001)(2906002)(4326008)(8936002)(52536014)(76116006)(5660300002)(54906003)(71200400001)(66446008)(66946007)(316002)(110136005)(6636002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0J7kKyTtsFpFR1oaaPQWamcZZ018BOy8u0Z6tKeOJHAVTsERDzQ1UFkaK1T4?= =?us-ascii?Q?HnHUVB7ZaC+bHOF1QsJUdxts9r7ILjm5Al4hoWopMRVXG/uYDzqzDS4oJG0X?= =?us-ascii?Q?zyRbzYaqbDIXfI7BRsxqKAcWMbD2sCmEYlx4FlyRvASm438XDqHANJ4c8ekm?= =?us-ascii?Q?ft9e9rL2lqhE5UEg0iUVG4x4Xq3vn6u5XtiFkSJwGzS/mS9W2TNTQLMjW0l4?= =?us-ascii?Q?E28VgjGDzh/6PUU6Hl1CQUAKUYT4pOVFldyCClPEcihLH+jBwgIx95tjbj5J?= =?us-ascii?Q?TfiPRaMHxT7NgGttDASBODFGMgBZfTdq2NbLBUUim/UO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Q?DjGqWuT0ED9cPri8KW7DuHJWHGvg9RK3sOnkbonX6yMbZJKQ8fX0jPLVowyX?= =?us-ascii?Q?XqZqqBn334erQxow/5m1vciCDGjI0QX1/TyxziO231dgFr/AixkXtfjaA3US?= =?us-ascii?Q?S8CloaeFDghoFKd/MhTVXNaJ7wbZI6hDoE/cOtdWBeu2OqRbcy0Yt3dhTox4?= =?us-ascii?Q?6GG0Ro/HiizEDsTcqfnegVmT2HszGNm4ume/hlHKu0XxYMaCG8mMsfNjc5cU?= =?us-ascii?Q?TYghegQxuZ7FQshNv8NMJ3qm2GtSxLmNyRT86OgTY6QPmB5uZz9QaOc/a84o?= =?us-ascii?Q?SWxyILT4W2tHEzBrDy1aZWzsUkn/Ku3qjtTVecIJS48CfK8Dvi/+DN2ZMDWj?= =?us-ascii?Q?5TWeWbDbvlQ3HhUVwMPzHlZl2WntZ8EBVJE3chKi0RrKamWMzATw/s/amOzi?= =?us-ascii?Q?qA=3D=3D?= 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: CH0PR11MB5724.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c7161d8-949b-459d-cfd7-08db20d1a0a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2023 19:08:11.7710 (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: gf43k161BAYLNhEEqJ+UiQKejEQaSTSdC1XEO6XEd9WZi8HRbKRAw+XU99wecoyIIdf1Pt1Yru3PFmhuusOF3kdWFiphaulhm7D9354JKss= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6467 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: Jangra, Yogesh > Sent: Thursday, March 9, 2023 2:43 PM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian ; Jangra, Yogesh > ; R, Kamalakannan ; > Suresh Narayane, Harshad > Subject: [PATCH] app/testpmd: fix closing softnic port before ethdev port= s >=20 > SoftNIC runs on the sevice core, it uses the resources from the testpmd > application. When we run quit command, the testpmd application stops > ethdev ports first, SoftNIC will try to access the port and sometimes > that result in segmentation error.This fix will first close the SoftNIC p= ort. >=20 > Signed-off-by: Yogesh Jangra > Signed-off-by: Kamalakannan R > Acked-by: Cristian Dumitrescu > --- > app/test-pmd/testpmd.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 0032696608..aa831b2389 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -3767,6 +3767,21 @@ pmd_test_exit(void) > #endif > if (ports !=3D NULL) { > no_link_check =3D 1; > + > + /* > + * SoftNIC runs on the sevice core, it uses the resources from > + * the testpmd application. When we run quit command, the > testpmd > + * application stops ethdev ports first, SoftNIC will try to > + * access the port and sometimes that result in segmentation > + * error. So first closing the SoftNIC port. > + */ > + RTE_ETH_FOREACH_DEV(pt_id) { > + if (!strcmp(ports[pt_id].dev_info.driver_name, > "net_softnic")) { > + stop_port(pt_id); > + close_port(pt_id); > + } > + } > + > RTE_ETH_FOREACH_DEV(pt_id) { > printf("\nStopping port %d...\n", pt_id); > fflush(stdout); > -- > 2.25.1 Adding Aman and Yuying, the test-pmd maintainers. Aman and Yuying, can you please review this patch when you get a chance, th= ank you!