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 D20C8A0580; Tue, 22 Nov 2022 10:25:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF8FC42D5B; Tue, 22 Nov 2022 10:25:51 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id A5E47427EB; Tue, 22 Nov 2022 10:25:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669109149; x=1700645149; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WHH8o4pAIieODw2CWg8yHVAKqVdC/5uJpLDp3Gm54BI=; b=J0TRLZ13T+71fRXEWwrlsqgyZzBdl7YDJGaFoL6pAWYxqNzXmQy9ZmFj FRZHMvyevhK5hlLDkNQQK/U5SWazlBqlqIdhlU29mBc4Ok1GbxmjEYJuF lmn77Rn/DHA9O3CkqGFkdZ3DqN+Ja5n4G+EBiECYdeqdZ0WRLZkaEYXjU MYoWJAGZX/sGE4U4w8PF9imRAxlu+oTAclzLq5akGiwS0z8IohJQVkA/m fg8e2Dw5DmDHI4qjmA6PK1pbfSfZ9OkrgSAmkL3xqBQT6sY8xNtYaE8uD neI2r4IO5YyRWajuHTkN4VaIrePmJAwGwReOaUhrHsuY8e7voro5aKml9 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="314923222" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="314923222" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 01:25:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="635481631" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="635481631" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP; 22 Nov 2022 01:25:36 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2375.31; Tue, 22 Nov 2022 01:25:36 -0800 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.2375.31 via Frontend Transport; Tue, 22 Nov 2022 01:25:36 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) 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.2375.31; Tue, 22 Nov 2022 01:25:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fCTolN0NtdXeoZaCQ/lYhQJBSNPa1gr0YT3MYS/aIVzsrLTEF5eNyaTLzJypy6D9ju3DLY1xbswHQXSlklTEPbcyeDnB74+qHsWiIarU0+qjwMZRp8tUBJYTU6W7QifrncbfDuAAxG27ub+9vjJBjtjLG31POQP+4T1YFnr3jcg80Yh5sBntIKbRL+J6O7hjBTjP26UBuhL8AfqXMjKoB6m6R5Jf7kbIdDSHhtXINxR8Y9lxdYB5okclTAKumff0zCuzBnOFd+vAowKp6N30GKODFc0Xq3kpJfUQ6xR4yhsp7sZCJUjsSn7Kqsn1D5rn1iXeVeH8SOmjzjSqRM3Pwg== 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=dqnZ7kTCP6ctkOoiz/Rpwpu7Ml2Rdvq8s9ntofV4QWM=; b=E7/tKozs4EcUeMAwKKya98FQMbOTzSvWIDYEK9fD9Jbdy2ny97VIFrhMxXxmn7VN/t6Ys8h4Lwyqz982onXyaUfrIgCmNEWUfkUQ7CdrnrotdBBPv3rBomLwiwF8ceGbZrpz34U3hPkfXKuobmUrvLeT8IoaYp+YSB+pZfCWLoSFe4Jt/S40Cjcbk7ASJkSRhBFPN6zTw5CiHK/zTvdoslbo1N7x3D2wthZab4RG1vlsiu6Xcg06c3YhRgZK9PkxAjlTD3RqjwF97C0qoS6euEC2qJGccgEEqSNlJbd8QJGgIDpoB2rvQLOl6zuEipmG9CqshJ0Ra0yEdul5XFgukQ== 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 DM5PR1101MB2107.namprd11.prod.outlook.com (2603:10b6:4:5a::19) by MW4PR11MB6690.namprd11.prod.outlook.com (2603:10b6:303:1e8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 09:25:34 +0000 Received: from DM5PR1101MB2107.namprd11.prod.outlook.com ([fe80::b961:c069:9d46:cf45]) by DM5PR1101MB2107.namprd11.prod.outlook.com ([fe80::b961:c069:9d46:cf45%9]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 09:25:33 +0000 From: "Zhou, YidingX" To: "ferruh.yigit@amd.com" CC: "dev@dpdk.org" , "Burakov, Anatoly" , "He, Xingguang" , "stable@dpdk.org" , Stephen Hemminger Subject: RE: [PATCH v2] net/pcap: fix timeout of stopping device Thread-Topic: [PATCH v2] net/pcap: fix timeout of stopping device Thread-Index: AQHYwcctL9bFJ76KRUKNwgs+pLJ9gK3SfnOAgBcQh8CAYZCroA== Date: Tue, 22 Nov 2022 09:25:33 +0000 Message-ID: References: <20220825072041.10768-1-yidingx.zhou@intel.com> <20220906080511.46088-1-yidingx.zhou@intel.com> <20220906075737.2fb429a5@hermes.local> In-Reply-To: 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: DM5PR1101MB2107:EE_|MW4PR11MB6690:EE_ x-ms-office365-filtering-correlation-id: 279a1e8c-6dbc-4738-93e8-08dacc6b81a3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sZ7ZZsS068A3YayLyhqIU4bvXNBeo28gJ9YMXoxHK8fVNb5TchsreKybyJj5/wBSVRhBE1ycbb9v2rJX3KbfeRknheF8o4fy8U+e+gzRC6j2so2YBqi7aCOA9KzKsPJ9GcK0Vw3pHy2nDXujmq4AcgVYmXx9yTw5u3zBJk8R5M29O1cCgu1BVBro5RiP1if0KAm+CLvQbn3m/VSWj1NMigEUXLBW90fSKn5rngXzjM1uc+jDmX4zpmyEICumgiCan0vfmNO4wmARVGMY/0wjaKXYJ/ywlNRK8BzpahcS1nvQTLcb+TKdlJ7324gRh+dUzA7XKzi482dxcxBwY9AjnnhlYPcKnktd81PfBBLeFVNe3Ekf0eSvYV9YgD/rEtE83gjUrtkqzSXbNOW3vplsCa6jFRq67WOxelKkqrUSlWYTVojwLPFcdkJzjt0kQ/T9aJlLTQyJ7Nsw85azBPMeIN+yS5ieYaoYKCcI5e4ApGOxc5Mb5FJDqT4K2jIDVZvFxGExceWP6jqDQrAilTr4Oq89KNRgs6tVGWDkHd15XIsqrsH8MlmOthWC/1fGzbGTyDvmZi36//Z11TIVHExblhb+pPam0rYBkQOV8qufJ9SM7WhI67s6MEVAfsjbqIael1gUWy/gYKzgGO7dU65ur7uxqlUH1rEPMWYuRam/psDA+VZKA9/KM/1QIE1UVU6PoPhMUFcWn0V+fS9K+rChcQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR1101MB2107.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(136003)(346002)(396003)(39860400002)(366004)(451199015)(86362001)(66946007)(55016003)(66556008)(33656002)(41300700001)(186003)(66476007)(76116006)(64756008)(66446008)(4326008)(52536014)(8676002)(5660300002)(8936002)(71200400001)(478600001)(26005)(316002)(9686003)(7696005)(6916009)(54906003)(6506007)(53546011)(82960400001)(38070700005)(38100700002)(122000001)(83380400001)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wwMZ6JaE9vueyXFlR7YWqVR7boNx9G+iMABs5d3I3/+Ny2kQFDo/3g+8isj+?= =?us-ascii?Q?kIFsw6kcrcrtc9tCsA6ICJIYpC9v2rxr34HETa0U/naClccCVtVyTic1nAht?= =?us-ascii?Q?3M0eM8Bgu/qm1P1lrTIGXVn86SzhM6BTVS5feVIgjfpB02PNy/Qe9gKG1LhN?= =?us-ascii?Q?I0WIaQ9tNJL9QeIPmAuWhSxMVkebTE1yutBBisCUNK1hfolnDNvGq7gIKXnu?= =?us-ascii?Q?gV3jvkv0wZF8ezssCK5z+Nwwa5rwklAIpnLRJURaeH8VoXqKXdphNVYqwkEi?= =?us-ascii?Q?MK5GgdDbnTXYL/5pIJ/qr9csj5doQc9MkpZV1BgFeMznJgDzyBkhR7KiNNKm?= =?us-ascii?Q?E30yu/lwuWgsyRe+2ibvEcjDAAwJEdQ0694Z1EQgIr3Z3oCWQqddcNe3EKG/?= =?us-ascii?Q?JS6BvdN46TIEfsj/ADgCLksaCeqFcW8M2Vwpn4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5khG1QtYBm5t0Cugce8XKZ6MITX6rdw8h8vTpz5l0SvxJIyDX6a?= =?us-ascii?Q?wUfhliSVuLQ8nmZsfMhyxSrMD/0pq1KgBJsN+jDTaXKNQ5EuvhiEundgXCSn?= =?us-ascii?Q?37YhVvFxUJIauiJeuXffTOus3hEPZLA1kBXOd5J95QvlyqAGBb5UTs2vX5+T?= =?us-ascii?Q?z6cq41FEUVs6dNsYWd7JTPGSid5DxAcFKg7vb1P71fBqHDySNc6BlOYutlrx?= =?us-ascii?Q?BNe5O34FOm+y2Tt/vObXhvwhgKWPPbAqE8UjcV8r?= 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: DM5PR1101MB2107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 279a1e8c-6dbc-4738-93e8-08dacc6b81a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2022 09:25:33.4425 (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: eqN0+BX/sUXzYuF0TOA+OI4n57pk6tZxZXgeCAXM6XORAZ8ms2Puacc4T5xcoDpMM2rEcNRHGzTae24kGQeW5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6690 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: Zhou, YidingX > Sent: Wednesday, September 21, 2022 3:15 PM > To: Stephen Hemminger ; Zhang, Qi Z > > Cc: dev@dpdk.org; Burakov, Anatoly ; He, > Xingguang ; stable@dpdk.org > Subject: RE: [PATCH v2] net/pcap: fix timeout of stopping device >=20 >=20 >=20 > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Tuesday, September 6, 2022 10:58 PM > > To: Zhou, YidingX > > Cc: mailto:dev@dpdk.org; Zhang, Qi Z ; Bur= akov, Anatoly > > ; He, Xingguang ; > > mailto:stable@dpdk.org > > Subject: Re: [PATCH v2] net/pcap: fix timeout of stopping device > > > > On Tue, 6 Sep 2022 16:05:11 +0800 > > Yiding Zhou wrote: > > > > > The pcap file will be synchronized to the disk when stopping the devi= ce. > > > It takes a long time if the file is large that would cause the > > > 'detach sync request' timeout when the device is closed under > > > multi-process scenario. > > > > > > This commit fixes the issue by using alarm handler to release dumper. > > > > > > Fixes: 0ecfb6c04d54 ("net/pcap: move handler to process private") > > > Cc: mailto:stable@dpdk.org > > > > > > Signed-off-by: Yiding Zhou > > > > > > I think you need to redesign the handshake if this the case. > > Forcing 30 second delay at the end of all uses of pcap is not acceptabl= e. >=20 > @Zhang, Qi Z Do we need to redesign the handshake to fix this? Hi, Ferruh Sorry for the late reply. I did not receive your email on Oct 6, I got your comments from patchwork. "Can you please provide more details on multi-process communication and=20 call trace, to help us think about a solution to address this issue in a=20 more generic way (not just for pcap but for any case device close takes=20 more than multi-process timeout)?" I try to explain this issue with a sequence diagram, hope it can be display= ed correctly in the mail. thread intr thread intr th= read thread of secondary of secondary of primary = of primary | | = | | | | = | | rte_eal_hotplug_remove rte_dev_remove eal_dev_hotplug_request_to_primary rte_mp_request_sync -------------------------------------------------------= >| = | = handle_secondary_request = |<-----------------| = | __handle= _secondary_request eal_dev_hotplug_r= equest_to_secondary |<------------------------------------- rte_mp_request_sync | handle_primary_request--------->| | __handle_primary_request local_dev_remove(this will take long time) rte_mp_reply ------------------= -------------->| =20 = | = local_dev_remove |<------------------------------------------------- rte_mp_reply The marked 'local_dev_remove()' in the secondary process will perform a pca= p file synchronization operation. When the pcap file is too large, it will take a lot of time (according to m= y test 100G takes 20+ seconds). This caused the processing of hot_plug message to time out.