From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 1D5A4A0032;
	Fri, 30 Dec 2022 18:23:37 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id B66AC42D39;
	Fri, 30 Dec 2022 18:23:36 +0100 (CET)
Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com
 [209.85.214.174])
 by mails.dpdk.org (Postfix) with ESMTP id 099B9410D0
 for <dev@dpdk.org>; Fri, 30 Dec 2022 18:23:34 +0100 (CET)
Received: by mail-pl1-f174.google.com with SMTP id d9so5724949pll.9
 for <dev@dpdk.org>; Fri, 30 Dec 2022 09:23:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 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=RuYkijLnYMAodY6Y3q+J6ZUKUhStThlCk9MZoSDybyI=;
 b=Vg/kdMEtSjA1ycUzkQqcChDcGNGbWHVloonoHwVvByE2dgTc+SQQr7UjhUiZeMooLV
 2iHVVtZVV73rycrUT25SrcziygPtNQKBsOqHczQIYWjs7QslB5q3tXwpFWDN8jMUHEoH
 tY3/pAeNugfFv7/O6UNr8h3lVl6Vx1vlp64tVcU6LV4HVn2FFCdJBmOKXFxQC/DshbAb
 iaBfKNOBdokNqlQY+MUnxwn4hrPYV2r6xp9Y1Qd/MSaV+iYEO1Q7DvDlu2XF7/xvkM3U
 tWvVcnJSv3GXZDGeEaXcoOOd+rCh0xLHP8YOpoSZMgRQ6PE8tdN2Y3v6/lJLdRomiziD
 dsnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 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=RuYkijLnYMAodY6Y3q+J6ZUKUhStThlCk9MZoSDybyI=;
 b=09mjAl19RmLLrdxt0OriBg9t8SujIqT6f0yoLuKdCxUlAXLdDXVVh71SAWEsY3IpRV
 YwfJZyvuQii7TXkPRuSHX/4bBOGQOvhNalKUhXmXsmiZxb6GyWkGvcVrErkaYQKKQ4Fp
 d2vVdXxRLjXDQYAewFmH2oicXKqzak4QFC6AwdZlLJSvqekQpoGOMLCB8SP7ymT1R7Kz
 a4l0278Z1QwO9s2ksw0WPJw7VIiF6bEXR/Q//6zK/ki3WDxPHK0FQEVp9NA39IhkzMox
 fTdEys8PzJPvuf07Ro5Sjrz2avmodOvFrGlVOaj9yxFG30+sP3p21VNmSeKMcxra+vZ7
 LMzg==
X-Gm-Message-State: AFqh2kq5fwfKuhhaB9lrGElAZdQdTktP6KjrXq4hxoSRzGNNucJADjmo
 UaUJiKt++TCQunNLdpWdtzbseQ==
X-Google-Smtp-Source: AMrXdXvImQH7EaWxAIu9RfNaBk2xv0CBOZGx5W4sb+7hxv4trxHb5A6sd1hG5UicMkpyk+D99V1Sxw==
X-Received: by 2002:a17:903:2ca:b0:189:efe8:1f with SMTP id
 s10-20020a17090302ca00b00189efe8001fmr55791236plk.13.1672421014056; 
 Fri, 30 Dec 2022 09:23:34 -0800 (PST)
Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])
 by smtp.gmail.com with ESMTPSA id
 2-20020a170902c20200b00178aaf6247bsm15248655pll.21.2022.12.30.09.23.33
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 30 Dec 2022 09:23:33 -0800 (PST)
Date: Fri, 30 Dec 2022 09:23:31 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Shiyang He <shiyangx.he@intel.com>
Cc: dev@dpdk.org, yidingx.zhou@intel.com, stable@dpdk.org, Aman Singh
 <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>, Anatoly
 Burakov <anatoly.burakov@intel.com>, Xiaoyun Li <xiaoyun.li@intel.com>,
 Alvin Zhang <alvinx.zhang@intel.com>
Subject: Re: [PATCH] app/testpmd: fix secondary process not forwarding
Message-ID: <20221230092331.4a82c5f8@hermes.local>
In-Reply-To: <20221230075554.25244-1-shiyangx.he@intel.com>
References: <20221230075554.25244-1-shiyangx.he@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, 30 Dec 2022 07:55:53 +0000
Shiyang He <shiyangx.he@intel.com> wrote:

> Under multi-process scenario, the secondary process gets queue state
> from the wrong location (the global variable 'ports'). Therefore, the
> secondary process can not forward since "stream_init" is not called.
> 
> This commit fixes the issue by calling 'rte_eth_rx/tx_queue_info_get'
> to get queue state from shared memory.
> 
> Fixes: a78040c990cb ("app/testpmd: update forward engine beginning")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shiyang He <shiyangx.he@intel.com>

Would it be possible to fix this the initialization
of ports variable, rather than doing a per-state fixup here?