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 498F946ED0 for ; Fri, 12 Sep 2025 01:51:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B88740655; Fri, 12 Sep 2025 01:51:07 +0200 (CEST) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mails.dpdk.org (Postfix) with ESMTP id 5FBC040299 for ; Fri, 12 Sep 2025 01:51:04 +0200 (CEST) Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-816ac9f9507so267880885a.1 for ; Thu, 11 Sep 2025 16:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1757634663; x=1758239463; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=a0HvjaY50yTyrrFbagIWTTjUJwCRMW8tAJG6zfxrOj8=; b=Jv/lTfRLV3325kxSs7h2ggb1cZJN1yYqW22oyBLoHXiKAsyZD6GwnfgTq7LjGRwZoj ZX3+elk+ciPl5DbRZUGHQfx37pPL9MMxaudFPAdQLvgZEKS0Gf7vomDHuIhZvOI5BGP/ ppcJ2EBxmOPwV6xjNqFDpLglOqhli13hzMDo85mSFdsLg5qkTMK7tLq9HYzgjtYO8mWD 4nVpt5f9WEQOR70HIGd5j3/9Jj/8MzV0Z08iXOHl1AoIUxyoGlQt5MgS6FRausAROriq kNZ1VLFFzQhT1s6jPg8oVjMw36pq2myKFK6nMC9/yUY85/KSc57prGOPl6QVECTXRANk hL1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757634663; x=1758239463; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a0HvjaY50yTyrrFbagIWTTjUJwCRMW8tAJG6zfxrOj8=; b=Nn5rYK/Zt/zwQMcJD0Xv4CEunZoZG7SauT/eNo+XxSGwtLjmiKvDULlFlgUgS01hUD MG9SkRfbPLsKZpP9DmhIPC9eopWWccIA76IIVl965bnmLP8YfQjtbGAMXTauGfBFVM/W qoQooP3LdJUL7LZ0tOrAR1JHoB4qewAFrVY/OIIKJtW8h2E6Ih4stHrOEiyzzdGbiCgo Nrj/Utnclf6oMpguDAIu5gaZpSNUpQo8sa/H9qqG3uGgiIr1jT0/wOcbNPpHFPjdj69l zH3TL/H7rZWYG7Vh9P5DjHyy+uDHSfGesMcmF8uXTYFluXNjEtBDyBOiB7BmskBV7ibA z7Hw== X-Forwarded-Encrypted: i=1; AJvYcCWIMv6MVmWWSIC8YavF7MNeGrKqU1pbuNCcejsjVhz3uhljlbCJskzWZs+RUcnE8n6b9oyNvUc=@dpdk.org X-Gm-Message-State: AOJu0YwYzArXjzzRe82EEGtcm7hDEHfyZOIEL50iouwuDt+4ygCn7M9j dZnNyExXARWVVeUWd/C/reqxKU05QSb/ij0PUxSrWBf2PpcvN7rbElF7x18ruH27/1I= X-Gm-Gg: ASbGnctGNLJNBXY+W89t08JEkvPHkhQjqCG3TWNfcIYBflMOUoueV2sclNer6v2K8hw QmHeq8embgZwLPwWUtHBbe1EAH/9Ph4+bvB5q6a3b+26oUP5fhVgviBhedpZobWe0st7+InDC19 GxLhdcqJSjOUKqlsdJK01wdHX+3KLw07hacfUeDZ8DKICeZFdOFql5C6clydn2P1Cxfqg6R8t/2 efRAZlpOU84X1E72YO0lg7FbL3bHG/W+YM0aeQ/3W+/6V4saoBdTyFmDxoro5KCljmrlrMlywLp 1ChjR99RzAX8O+AQp/utAF6tR9L9Nm3xQSxoTf57knEZ6JoGuB2sPvTh8fXuxnEy9vnUYcfHHFT siudB9IAH4IuvDw3CK0Ni+reOJBSVyLH7gwjfr/Vm8HHWjU7WIrmhPMc5waqjCLHI9ABKCxsEUH /8pLbUrU5kog== X-Google-Smtp-Source: AGHT+IESHec/Gwj+UBGQBC97IgvRZj0gXHYrJ7sVgdV1FSNpJ5uRwmiNrtwNEc8chmNLm+xqVQQ59g== X-Received: by 2002:a05:620a:4044:b0:81c:b2d7:9d55 with SMTP id af79cd13be357-81ff5c558cemr598883085a.22.1757634663380; Thu, 11 Sep 2025 16:51:03 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id af79cd13be357-820cd701434sm180380485a.42.2025.09.11.16.51.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Sep 2025 16:51:03 -0700 (PDT) Date: Thu, 11 Sep 2025 16:50:58 -0700 From: Stephen Hemminger To: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> Cc: Aman Singh , Anatoly Burakov , Ajit Khaparde , Lijun Ou , Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org, stable@dpdk.org Subject: Re: [PATCH v2] app/testpmd: stop secondary process fwd_lcores during primary teardown Message-ID: <20250911165058.31fd0101@hermes.local> In-Reply-To: <20250911102501.473167-1-14pwcse1224@uetpeshawar.edu.pk> References: <20250910110237.460825-1-14pwcse1224@uetpeshawar.edu.pk> <20250911102501.473167-1-14pwcse1224@uetpeshawar.edu.pk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 11 Sep 2025 03:25:01 -0700 Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> wrote: > When the secondary process testpmd application running any fwd_engine > and after that primary has exited will cause a crash. > > This patch forces secondary process forwarding lcores > in fwd_engine to stop before the primary process exits. > > Fixes: a550baf24af90f ("app/testpmd: support multi-process") > Cc: stable@dpdk.org > > Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> Ok, the Windows #ifdef was confusing me then looked more closely. This patch is adding a set of rings so that primary and secondary can communicate, the adding one command. The idea is good, but there is a better way to handle this. There already exists a way for primary and secondary to communicate through the mp service. This is used for hotplug and pdump and probably other things as well. The communication can be either way, for example I proposed patches to pdump so that primary can tell secondary to participate. https://patchwork.dpdk.org/project/dpdk/patch/20250814165307.12786-7-stephen@networkplumber.org/ This of testpmd can be done in similar way. The handler in secondary should be able to act same as when SIGINT is received. Set the flag f_exit which will cause the main loop to exit. This can then happen immediately, and the proc monitor alarm function is only then needed to handle when primary process crashes.