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 7CCCEA00C4 for ; Wed, 4 Jan 2023 03:03:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D06242B8E; Wed, 4 Jan 2023 03:03:00 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id C30C240697; Wed, 4 Jan 2023 03:02:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672797778; x=1704333778; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5O7X1JMnzUfsEzLORKKc3KUlLKOCSHtbIPT4LtMvNyU=; b=OyghXfzJI99Rf0MmAG8341k5bY4Dm7sG02ThDFmmwFrlIP9jpWiDPWrC 1VfWOHCyRAHDLp4qnk7/Uw7NsDiu1I66gyIXEkc5S7vDiAryc+/BwVX6l aOqZNYNL7IlX7FDo20Vcpx+cGpF3UGehoukxsrv+ukNLXywKTKx+kUMBY fWPS9keXMIm+craVz36d1wNhfHswGX97VTDdf9T6R04C/iDmjxDPKuY7w G34ltZFmoNXaLsb5ujnM6evJZEyEjj3gZ/dLOk6BWxuuu/tPZaAIhgYhR Dia8kEMamZBy2Xd4i3BkOT/eqxzhuTGaeBzz3qhkRBnqh2lDZ1/XzQ21Y A==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="323044000" X-IronPort-AV: E=Sophos;i="5.96,297,1665471600"; d="scan'208";a="323044000" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 18:02:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="743684461" X-IronPort-AV: E=Sophos;i="5.96,297,1665471600"; d="scan'208";a="743684461" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jan 2023 18:02:15 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 3 Jan 2023 18:02:14 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) 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.16; Tue, 3 Jan 2023 18:02:14 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 3 Jan 2023 18:02:14 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) 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.2507.16; Tue, 3 Jan 2023 18:02:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wr/qVIiiYdWgI7ArJJMYaw5QbGU0V9/j1f5ZDM1JSQylgha6+KPfGLmOxWUteWeFAagsdCGu0UHR8U68XNnT0h5+2FinRcC1TgYwxXdAlf1TkLE6EhQxpt/mChogDuUJKFnEXyWVjEWWKJYcxKGXomZgGVMyrPmmg+gnKKmnBzWUHTtHRDFWr6pKaikkaQ1uUsDJUMDLGWHKDQ9Mu+/cqRBjBFnWODNjfZTCoig2KaSrQ9DZnU3DEJvNxdccVJg+5uCT/Wtn1Vvdm0x9Z9yDpJ+2P57pq78teTvgUQzLb/zCkinRfviY/+sXh1rWSYYFWOZihBlusSJDblFnJS2ZBA== 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=5O7X1JMnzUfsEzLORKKc3KUlLKOCSHtbIPT4LtMvNyU=; b=b2KA1IYnnqiY/FThAcizJFK6/VW7ZEG/jPor5AJBQ8Yu6FaujMTPeq1z1IrvWkKaH00GW2I1Smt1bvS94s9Wfz4mKH3vXZYj0BSNPV8GGGs9bGDLjXMFAEu9lQNGvBAWZiwWC6xKrTir6ujVGmLzpIfkaB27nvFgjdrSxiQZ07F8UargAHNIbKRM1p2Q+5i+9CM76+gIdAPORjXL7uRjrWhkpnGkndxPkrOkkL13T3pg2tiA+qNFKto8yLx3qO4rVdtDLzp5ShjPRG1fW8ZZQ+R9gzPldl4SQ/N8BSE/5GpVZHv2DkyLlNmvpjWOaaUpZ2unSlcLe0i9eITTAo+6KA== 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 DM6PR11MB3946.namprd11.prod.outlook.com (2603:10b6:5:19d::13) by SJ0PR11MB5182.namprd11.prod.outlook.com (2603:10b6:a03:2ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Wed, 4 Jan 2023 02:02:11 +0000 Received: from DM6PR11MB3946.namprd11.prod.outlook.com ([fe80::4aa8:cc71:3dea:699a]) by DM6PR11MB3946.namprd11.prod.outlook.com ([fe80::4aa8:cc71:3dea:699a%3]) with mapi id 15.20.5944.019; Wed, 4 Jan 2023 02:02:10 +0000 From: "He, ShiyangX" To: Stephen Hemminger CC: "dev@dpdk.org" , "Zhou, YidingX" , "stable@dpdk.org" , "Singh, Aman Deep" , "Zhang, Yuying" , "Burakov, Anatoly" , "Li, Xiaoyun" , Alvin Zhang Subject: RE: [PATCH] app/testpmd: fix secondary process not forwarding Thread-Topic: [PATCH] app/testpmd: fix secondary process not forwarding Thread-Index: AQHZHCWTalLPgfv2HUKGzEeM/yyAlK6GrpSAgAWkPjA= Date: Wed, 4 Jan 2023 02:02:10 +0000 Message-ID: References: <20221230075554.25244-1-shiyangx.he@intel.com> <20221230092331.4a82c5f8@hermes.local> In-Reply-To: <20221230092331.4a82c5f8@hermes.local> 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: DM6PR11MB3946:EE_|SJ0PR11MB5182:EE_ x-ms-office365-filtering-correlation-id: 51af060a-bb96-4c82-cc9e-08daedf7b104 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HGzaHGo5njShZvHcdU6d82KHn9nqTxmnhgtTrJdPk0qY7q41b05DwYFGjEoBhBq+3aSQu156Z75TwjSto28bPiI2BTmpvmUK2cXlNDK+aU38eCJ9QEd79+pss+3rDrczNdFf8ubUWyEk+JwkGBRpDd+n8xF+wB1Z085Ig8RjOm/ZwrfrffK4DeCFubqbI0roA3bUgSGVUiKc9jsa5uZaw1ekdQrO+piHTnlEfY0z3Flyv0BfKI3TMAIuW+YRlZzzNnmh8gv2Vvr8POzZ+q8iG065HA2zjE9RVhNzmz8hKbNLaRUYc0cVZjXbDkDMPtpLqXCdu4S9Mwh+ORUMVIGtz1y7b3HCDUkEJe/fBfhdP2BOJsnz3Gmoj9Xcuya9L//x1AqcridhE1wXpsSQOavlkzfMU/Lo8zPFkpN5HmmrOYHY0JwqK141dCWNtURKcxFwdzA/PZcdI6jC7Tikt+rE7H4z7Xwpv30F/mUX1ao9mQFrDpp1piyGj9fS6tySFGoc55yaEJNsHFkplQbyX9rJMXYmmXAjk3OtkACJDtULrPgvbQggLq+cb6IwTzMCDZWd9AG6FtDJU0XCs9UkcAi5rsajmL5PHqC1jlA/oSKwy7/9XoAnfm+7MFWlU1s/nW3p2A5+8QUTEmzWoM5rfd1/7/f7ieNoMuPTn/+wPcqTQKM3PTdhYO0SlAQPPhwTPlLRtNsp5mSY9llckVn5jaufuA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3946.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(376002)(366004)(396003)(136003)(346002)(451199015)(8676002)(76116006)(4326008)(64756008)(66476007)(66556008)(66446008)(66946007)(38070700005)(41300700001)(82960400001)(316002)(54906003)(6916009)(86362001)(2906002)(122000001)(5660300002)(38100700002)(4744005)(33656002)(83380400001)(55016003)(6506007)(478600001)(7696005)(8936002)(186003)(9686003)(107886003)(26005)(71200400001)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TUv353IOpFEJYmxSG9bXit3j5tR2Tdz++QqSKv3Lj94KUHzS81+H8PC2lCoQ?= =?us-ascii?Q?anqJTkIAOzn1LqULqdI2aVwpUcLktqDAsj1C+nxpsX2gCl4tnCiw/mYYj+4Q?= =?us-ascii?Q?+63QGvraNFdipBWZVJVoRlfuPkpx1aOdURAaG03LBXxjpdUjSwc18iwLZpNu?= =?us-ascii?Q?aDxI8nfuskFKzbqQ4VYGQDtd1cdz7HyX9KKO/6RRErCLkB+kJPIpRojFcsk3?= =?us-ascii?Q?JLR5qekMJbSaEOhxYvkA40orJQOHsfZjcCMgZjOnHUNxOK44u6p+qY+2YKHa?= =?us-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EY8BmoTMrYDp9woQz5AdNGNBir?= =?us-ascii?Q?k2VbgBmfuqjPKfQo63lvEYH7Ys1p96Z6mooMhC6fNqF/GHuKdJ8b0y0bFOya?= =?us-ascii?Q?ht42oGiK86bhXjEkXMt99+Ss0qCOulMX2j0dfN9tLd9fK3+PtFq9z5kWATvs?= =?us-ascii?Q?JZmBgLAoKwWAmDH/eXofBuOLdlqKStYKAv9FtVjuPN/JjhBZGjlQp14I9Bto?= =?us-ascii?Q?Xg6iQUClwuY2e9rofAIx2r41kulIjrTxmjGbIS8AFzts3xr54n+h5SK0vJq5?= =?us-ascii?Q?p8NtyDxiba3NiS7RQE7iw4Whjgf2FFziaNdLFicX1v3/pvIyq+SOujnxVUMZ?= =?us-ascii?Q?TWZAKDuSCG2EKaG7br1cEtQ+5ALjsG3P4uu+XmB65PKoyuwqzC+61dlU4xAk?= =?us-ascii?Q?1XbaUyCk+Yk8iCNKTJ/VT8oSuM1UQ99QxSdMeMXc?= 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: DM6PR11MB3946.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51af060a-bb96-4c82-cc9e-08daedf7b104 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2023 02:02:10.8464 (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: giYm0sZNRUZl1kNdg00IwKc/5ySofQk5s9mCu2QMdwwhFK+Jd9Dq3RqNch9dOAI4YxRuz0q+4vBqISWEuYBUYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5182 X-OriginatorOrg: intel.com 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 >> 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 > >Would it be possible to fix this the initialization of ports variable, rat= her than >doing a per-state fixup here? In multi-process scenario, the secondary process does not initialize the qu= eue state in the 'ports' variable, and the ethdev's queue state may be changed = by any other process, which causes 'ports' queue state of per-process and ethd= ev's=20 queue state are inconsistent. Therefore, getting the queue state from ethde= v is a feasible way which I can think of.