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 2D41D41C37 for ; Wed, 8 Feb 2023 04:22:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FE2140DFD; Wed, 8 Feb 2023 04:22:33 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 012B640DDB; Wed, 8 Feb 2023 04:22:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675826551; x=1707362551; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BjAHI31ehJdkDaKuqCfW2PimiD6shVxff/FnywrtU4s=; b=ZRJMMC+Vfqe3b7QQDJEjkcluzmBqjeiNGgwhSuehl/wQR50tc0gJL5uj 7EvM1tfo8DT72Og9PDKXOt+S39k947AmDyAQS4MSDu/s42T1Bvt1tpkXy PwDiEiNVFv8v85rGWwUUf/CHEANtc2c78AKrxrT5EB0NtD6lO3XSS9A36 encEl5K/xRSn0uItKX2ZFLbghecVuR0oRlKcpHfu+4zdoV1Y6eAeVfadN iZPFG2yOV0+DfLoG0ELByPxaYIplKXwjoOIzR29CQVoZssD2fBEXgXBCw d+qwEbbEpL7qHAeuSu2nQpvxKQqYoamwvX/j+P1Ea9Gm1H4Fx3H68OMyL w==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="328350858" X-IronPort-AV: E=Sophos;i="5.97,279,1669104000"; d="scan'208";a="328350858" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2023 19:22:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="755873101" X-IronPort-AV: E=Sophos;i="5.97,279,1669104000"; d="scan'208";a="755873101" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 07 Feb 2023 19:22:29 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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, 7 Feb 2023 19:22:28 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) 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, 7 Feb 2023 19:22:28 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) 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; Tue, 7 Feb 2023 19:22:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyUv0DrlK8DwtO8nAXTkoppeDm+jBk61qAtxumhDnp0fg27jFLbVOJfYpZiWqR0jM3bDpbnRfDO5KRN5zESPhkbA8/dWWMTTM24JolyPkoXeC5xadESdc6cZpiIrFk4ZFoOMkVKN0YYcEOGF8CDsrrrSP7Uqn94oBiNi9cOUkN1Sd4Sgex1zImB4qoA/n4ja+Qwgm9MouwnXwhHjJuQ0Ph55v9VitXrBvOQhr2e5teCDYy5M90QWvD9iNaNeKUzfXaVSWd6rMru5yALVjMTJV0Ynph4U1LqIh2J4o+A6HV5FwYQobdHSTDYePaKkgCt0CDUAed8eJ5zTnPj/k6H2yg== 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=BjAHI31ehJdkDaKuqCfW2PimiD6shVxff/FnywrtU4s=; b=iEeB4nTBOeIK60zjZMpwdVMbexMQfpbc7I0xBHQUaAcojbaO6/eFJ3xC6MF3EDjrNCUnjEbxDeaMfQJ8tmDWdEOo5fNlHiK/yLQUMkE9u5/scdzOuI+LCpczZwgxVu/dv7mp2EtHgCnVljY8C5Mp+VnYzY4Bx17/zQF14TYRehEueaJVCt6WdUhjl7+/oaexbBtjZKYe1v1Bt7qrXCAbH9l8eAOvSupm8ORTwwlJF3xCEns4uXRSazBdZOG97EvivqwUeLYRFEtWDxst5QQDdgo+kWPbIj3RuJiFE4VdVvJXXon6JXVrFPi8QDs7VcmhqrYzJTyVyGMuM/7tZVp9Ew== 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 DM6PR11MB3516.namprd11.prod.outlook.com (2603:10b6:5:72::13) by PH7PR11MB5819.namprd11.prod.outlook.com (2603:10b6:510:13b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Wed, 8 Feb 2023 03:22:24 +0000 Received: from DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::816b:ecd8:faaf:be94]) by DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::816b:ecd8:faaf:be94%7]) with mapi id 15.20.6064.034; Wed, 8 Feb 2023 03:22:24 +0000 From: "Zhang, Yuying" To: "He, ShiyangX" 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: AQHZHCWTQ9xLf5ow8EGBW/JfCm6C0q6GrpSAgAbaPACADpvkgIAoe1+g Date: Wed, 8 Feb 2023 03:22:23 +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-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: DM6PR11MB3516:EE_|PH7PR11MB5819:EE_ x-ms-office365-filtering-correlation-id: 61636d2d-9ccc-4a97-ab46-08db0983b250 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wgYhg+0sQzaJI5BbtUiK/dcqwFtgbfZZeIpFmmSbamJDBZmw3PxIFwDBr7RwZZqgD+pGktpdfrn/uNyl3HpHuvVMyZGp+LOf1zynOus5rOdsMVhhDTWAwcvzXl5glZvt8gfWki4YHC++clAd11+HL3pmdMWqkric5UgNwQ4ykE2BUw5eYVzZmTW1KqwHd/lfXz4TrxMoOAh4/KwG5FeM7CAKevxdixVOzog8nliam8iStzi97ZC5v1mSRxDtdM6i3ExhfCoEJR3sk2qBjPFV0PVcwtIc3QnFJg5TvZneRIKhb0XYR7YlcaIQiJmiKSVNZdd8MajAoiXezKzgMHK2Z/JvDy4rH8NIXeRPV1wF0SwEiDwSZjgTLL5LQDPxNwoAUVHVzIOVudoblKjbYJ7yfmzlMZAhFju6a/Zm5K6VgE2dFdvxfbLnLftuyOKTwmlGk6PBRe+LQbsCfqmJTGsneppOitcSRSRcMBazo3J5Ca0LnyDCcK+DkaS77iBKav2lfTtoLaapGoRroKW9a59y4ojRbYzK+avzNlxaO2WTB8dLUkshakj+bM1sBHvYaySEGzBnPo0CSglwIUcJMB7YpAnc9TqCHKTKJOcxiKxtrjc0gCmbi91pFFtuyySApDS+H1PhNbFkEFeHEFisTx9uN9HD2pyjfuUlP4SGAlj+Z8XwjbMfdsQSJhb+EW0ToeT+uJ1cgHDRAKh12r8/9wDInA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3516.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(136003)(376002)(366004)(396003)(346002)(39860400002)(451199018)(83380400001)(107886003)(71200400001)(6636002)(38100700002)(54906003)(316002)(122000001)(86362001)(33656002)(38070700005)(55016003)(82960400001)(186003)(26005)(9686003)(7696005)(478600001)(5660300002)(6506007)(450100002)(2906002)(53546011)(41300700001)(76116006)(6862004)(8676002)(66476007)(66946007)(66556008)(4326008)(52536014)(8936002)(66446008)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?L2Y2bkNybXE3RnlVOThLS1FUVU41YVN6ekt2UE5udXR2ZlYrYkFOY29S?= =?iso-2022-jp?B?b0hzNWRHQzJtMTdLZEpic3krQUdHUFg4TThxOThJcVhQbHp4WmZBb2I2?= =?iso-2022-jp?B?Um9INlZnaHlKYjhNcmdXNVN2K2lpalJGdTcvVWUyandjeUJNaC9zb2dk?= =?iso-2022-jp?B?dzRQRzMwS2ExMkJ1ek45UkRDcFgrcDZSMTNMbURURE1rSHRYQTF4d2Jw?= =?iso-2022-jp?B?L0p4d1ZHdC8zMmZxaHhJNkRQMEVINmg1OEFjaGNMK0FJeFplYkxCcE44?= =?iso-2022-jp?B?b1dlRzZ0b2RDN0pvZEg3MEtKUVVtZVdXM2pLSWdxdVRVNndObDBZSVVu?= =?iso-2022-jp?B?T09oc2JtZUcxTXg1SHNjTHhYY1MwdFl6TkpuUTgyZFlIK01IK3Q1QVpU?= =?iso-2022-jp?B?cE11T2xpc0xxVC9IOTJ1RXRweHBwTlIrNG9MR0hYcG9JVmVPMW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HZrSXpyQ3MrYVpBSFNwUERaMGtUdlNuZWZOSzd0T1la?= =?iso-2022-jp?B?NmplWA==?= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3516.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61636d2d-9ccc-4a97-ab46-08db0983b250 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2023 03:22:23.9741 (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: 2qJOmZzzp1Uy/Ku5X8/NjqtAJAdK95f8DFkteWmV9HCxB3JcVg6Md0ZbxQCdl/TR2/qQuqgAlVARHUMly62aXA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5819 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 Hi Shiyang, > -----Original Message----- > From: He, ShiyangX > Sent: 2023=1B$BG/=1B(B1=1B$B7n=1B(B13=1B$BF|=1B(B 17:08 > 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 >=20 > @Zhang, Yuying Hi, please take a look at this patch! Are there any commen= ts? >=20 > >-----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 call= ed. > >>> > >>> 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 queue 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. You should fix the queue state in the 'ports' variable of secondary process= in the initialization of ports variable instead of fixup here.