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 584AE423C1 for ; Fri, 13 Jan 2023 10:07:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F4FE410EF; Fri, 13 Jan 2023 10:07:52 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 03669410D4; Fri, 13 Jan 2023 10:07:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673600870; x=1705136870; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=u+nVIbfsgJtAjg4lMVpb0+sQuH5/GQVeCu4UbWNMOyY=; b=i9QsDDpxu8sv2lVtsfox3BvlaohPpRtyfCpsHOkCDEHzvNySbgRKZ58e eI9MjbNMS6+U9mt5DRsjMa/QlR/1aqC8CgSviMdUcZI6onhC+zoyb2kld GMy4LRdfkrl8quZmG7Mdp49ub8UcC6ye9VQgbe1S2wGl/WidMYDF6sPLO 1oEQ0WSDoYORkt78FCMIGf2EhO0K7D5njI4sjTyGJiO+bpK4PQyO72tDn 9o2yE1YDOi60L1UUaMDs8sFsBfAUwjyO82Yu+ZOJ4XsLWz05ynvCxVf/W X5sf/IPay1b/eWdqSuaehBMmoBPYioG5Bri5KMhxD5NNuwckSFRDNltIz Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="322652133" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="322652133" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 01:07:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="986928570" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="986928570" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP; 13 Jan 2023 01:07:48 -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; Fri, 13 Jan 2023 01:07:48 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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 via Frontend Transport; Fri, 13 Jan 2023 01:07:48 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 13 Jan 2023 01:07:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iUP/8eL1YSr/ppftUqubpdm8A6l6/R2MgXHxGrzVM9ZG3kGKvziM+yIDIQIVGKFTboRZN8AvUDiE6ySRV1yu5PRJ3v8OAuC9wezOepml8qlcE0SpuYwh9xvmtiku5ZKfE6Qh/agX0BZyi/8qRDAgpgpK46ZwiTVJKeRKz/RpXwHdNL9F74W6GEMVZsLK+x/4sMsms6+jr/p/ZTsMh24rTZGk0CxuPnr2J06A2hiaGj12yQBRwJuALN9VcpmfB05c8UGdl4gC8bGxRwBqlpAKZoiQLM5vvLYq7UAKuMg8mQCPDFN1GTc3wxpuWmI/dKEl44peHhEuuIhw7avhSNGh/g== 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=u+nVIbfsgJtAjg4lMVpb0+sQuH5/GQVeCu4UbWNMOyY=; b=UHGjXeKQSkvoH3cbPXxIQmWKr7kzMtLFJtbAZ6s78leCdSejXQK1q6XXt3GACKL6BVq+kmNbTwIeb0deLAxdk4cMOLT7U3WBtA6yhvjibgoWSztNrv9KvOpbvApDmY+xIJ5T+37OntkI8umh0xWBhqAOGbly3ldSzGGIfQjAd8ToN7Vvmh83EH2QI94Dar1FNPrDHoW0F73kbrMls1iB/fauQjBEz3b6m94bXEotdO5GP6r3Cf/kCXqoSM4kxUr2wNZ/V1DD3wYgBaDUUSnw4lgf9ak1ydIshjtES/KFkwpSdYXSs11SAw14fzzYVrGmHCwfsDLgLSJ8QNhI+pc/FQ== 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 DS7PR11MB7833.namprd11.prod.outlook.com (2603:10b6:8:ea::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Fri, 13 Jan 2023 09:07:46 +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.5986.018; Fri, 13 Jan 2023 09:07:46 +0000 From: "He, ShiyangX" To: "He, ShiyangX" , "Zhang, Yuying" CC: "dev@dpdk.org" , "Zhou, YidingX" , "stable@dpdk.org" , "Singh, Aman Deep" , "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/yyAlK6GrpSAgAWkPjCAD7wToA== Date: Fri, 13 Jan 2023 09:07:45 +0000 Message-ID: References: <20221230075554.25244-1-shiyangx.he@intel.com> <20221230092331.4a82c5f8@hermes.local> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-Mentions: yuying.zhang@intel.com 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_|DS7PR11MB7833:EE_ x-ms-office365-filtering-correlation-id: 3ec03447-138c-4729-ef9c-08daf545a2c3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +w6nrJO0nsviyTLT2rZTMpLdqzFrKkKTey8bLmJMsdgfbBwfhp/xwIdgXsKfLcwoMbfIblGC3CbXCyuJdDnPTGqNX7ZvLzDpZiht5tAI/BDuOD7a7iNCl5VWuaMjz8PHb5igHDIqxtcuU9TletFzJyOSXkbeX3IjHFstOT2wVL4GicHlq6/0/okbgr5IqR5wbnJSoN88PxtXZHeqCApNN/3sHasojPpPfN1hTMtzI9HTElBAb/TTGZ1KQMtymC2Oy30TWn1hQGTd71Zd3F47ldL/jk4WGbPTB/mhror8DQ+uhXlQwHtsFR73bc0aB7UcoksL7JBCsbTBUBJ6SZdQdgOa47MRi1vTfJVtXoFe/MFY5EF83wRsBq2BDW6ifgdAz0X4ksX+fiEEGZgtQGCwNv+h4WcDdGX2WgdEQozTnMF+1kxAXlA9/kLsNSY6DmpoT9YYGqvNp0cshwbZKWw/o5oKYUnX+2M8DJeBhfuziI5oyWDk9+XXf8TYUirUmjhroliwMXxbPiriHwVt1N1GclXtslQJtXJlCHPJeZ2y8FZEmM1Nk8t32PMMQ02BiPtToF9OjqHOE/+UAnEjKA6/AtyhRMEJfPV57GpbB3MvkeX+PVMmc/kuCU4vpVDgGBDh6YUSrSy47JH+gvkLE6awRml1X0u/tcMtjyjpZXtMpVoYL4i/j0v2xE2JDPhO/Rhz 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)(366004)(376002)(136003)(39860400002)(396003)(346002)(451199015)(110136005)(33656002)(66476007)(71200400001)(7696005)(54906003)(83380400001)(66946007)(8676002)(6636002)(2906002)(64756008)(478600001)(66446008)(316002)(66556008)(450100002)(55016003)(76116006)(4326008)(38070700005)(82960400001)(86362001)(122000001)(38100700002)(186003)(9686003)(6506007)(107886003)(26005)(52536014)(5660300002)(8936002)(41300700001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0ZIMr2KOLzyapW5H4kPd8z3o61imzx69wNiZiGTNUTgNtJJV49Z+KrdJznSP?= =?us-ascii?Q?o3ryNoHGN5i1w+h3hMlZpObv6O6SVNc/zPe5dIPnn/xhACoSxvnpIbquzVfg?= =?us-ascii?Q?0/kkoky4I2up+Aca1q3iLs8CtxH+BMlilIdgf/Co8ID7lH4dKbQcGI7L/6x5?= =?us-ascii?Q?0fD9tEcOzCTcg5ndH8GsP3gqdmo1Dajdo1GyyN64sQ6WOcckOJzyrphT+Fei?= =?us-ascii?Q?rA4PZml1bG/tA07PaTp8cj3Sbu7Ep2gRiZyz59Gb+H/iKO5v2kS+PO7O1wG9?= =?us-ascii?Q?44dn0nwz31KiGVqlf11MlGYNIaG7EAfQfwgSs8B1icOiqxleQ5UwWpj3ejOo?= =?us-ascii?Q?JqKTFyP8CJNDyaKJnZjAYcSjqE8tl+Hlh950oj0De2PRwVY+3b531IjWHXkd?= =?us-ascii?Q?G4mDWUcAvAlnn/JjiePv6qWAdopo26yBkEU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GeqJ8/a0qt/mZlePqbijfj1P+0Fn2Kj9zuRLlP0?= =?us-ascii?Q?Y7yhUGIeuHvKnqcFPrCQRa+iK3NFpBPfugutvOI5wZKpUzeFjMeTbkLzLmYC?= =?us-ascii?Q?qxeZSZM6mQKphILQTQuqbVEWktzsTyjPtqcxQE9H7QC02zGqqR2aTz8w8Zdp?= =?us-ascii?Q?4r4tHCaQwyJGOrg9lrj28HIvcXtlrRncBm/9QTZFlqhECiHF72+t1dV/uvNF?= =?us-ascii?Q?29YmCabvQUGPI48I0pMu9AVTkRtm7vs9MvNrmdfI?= 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: 3ec03447-138c-4729-ef9c-08daf545a2c3 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2023 09:07:45.8488 (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: smuH95EXY968dQ2Klha4fWDrUY5kn1vR8+WfjHfg2hnvKESSZ7gv+tyW17dWDL7Iga2sSkL1LPuJyTt5KiwRew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7833 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 @Zhang, Yuying Hi, please take a look at this patch! Are there any comments= ? >-----Original Message----- >From: He, ShiyangX >Sent: Wednesday, January 4, 2023 10:02 AM >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 > >>> 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, >>rather than doing a per-state fixup here? > >In multi-process scenario, the secondary process does not initialize the q= ueue >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 >ethdev's queue state are inconsistent. Therefore, getting the queue state >from ethdev is a feasible way which I can think of.