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 B95AD41CF4; Mon, 20 Feb 2023 06:39:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67C6142DC8; Mon, 20 Feb 2023 06:39:47 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 0D1C240691; Mon, 20 Feb 2023 06:39:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676871585; x=1708407585; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=6FB22I/gyazU8mmBK/4vlfb1BtcapRn7voWwLBAJKXw=; b=I0pvR93RfeJvHtwj9hofWuvqKK76VP0LcRn2/Hco8+R8s31ZjxROWdOK Hh5Ek1c+kuVg4cQwEBjhIVJhPwhABa/atDqfgnl5fmqWUlLh4ONyebTsF JP372ahsdIyR+eenRHNlzIZhfpBJHBmSLi/p94cFf6uAS8qhU6AJcAWpR g11H9seWq+XORmMjmu4KKksByi856FLDNYyko4bolk0+BV19lr2v5cgKe KpT2LVo5MNYYYOnlBQBuKLnnf7zQjIoVLq/Zb6dFGhKRIi7VNErNu3WGf 1PaK71p18r+qbJK5NNYlg+N3Twym9MXuxQmd0NOItjOpw09nMqlXm+Y43 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10626"; a="394808525" X-IronPort-AV: E=Sophos;i="5.97,311,1669104000"; d="scan'208";a="394808525" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2023 21:39:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10626"; a="703596719" X-IronPort-AV: E=Sophos;i="5.97,311,1669104000"; d="scan'208";a="703596719" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP; 19 Feb 2023 21:39:41 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Sun, 19 Feb 2023 21:39:41 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Sun, 19 Feb 2023 21:39:40 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Sun, 19 Feb 2023 21:39:40 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Sun, 19 Feb 2023 21:39:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mxqk7miWzjOStmXT/PGrP8SpqgCJElIgi30PfvpaJMjo4rFhCGk+HTt7Ukdtn++i8Pp1+2Q3ELzsXsnSa4uFFzrfEat3cQbgN+7SANScPHvf2tssVuKg3VU6IbzFmFlqBtf3nQHYpvP5CN+A9e5EFpfmi7zJbozfGxdYfEu7oYxqcjEsLKO9f4sMEev3B90WILD3Yln+wkre6OyrWhBGUR11fjbsN9DnweL90ERE88RdK60kKSrEG0YTlTvceEH9Q9mYwedcZ6fdVjl/DACN9p59EjsRh+5AG3gOEQe8T5xn0zyoUe0bGErdLw9FF1MaUQeMlTRwLAeP7NIpEzfR3A== 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=6FB22I/gyazU8mmBK/4vlfb1BtcapRn7voWwLBAJKXw=; b=W5cyy11gxzvfmYLYG26bC+jdf6QMjrbeEV68CoLuebOyBZvpUiQcI5Mwt0L0aq9wuIhkRq6JrXqTdQ+VcYCiX2Qn+j25SZmnhRIFPp//VuO4g2g0pll/GIP2PDOmwcMP35gKmHemAKnc6lsNb9vuRCYaMStkhGVoU3Zhf4nzL/+L6Rd9jydZCpTKQxOMTGsVe75Qv85CKCbpOZVMPLwtgJ0sunus9Mic1ZIC0BLmEvze18GKxzuVMsgOarVUIBXDHlN6R9iGHQ463rU14ZC+ep3I7Otf4tL0+UsxqdTQ4JsDqgFlfOe0YTYiwtL9GXnIUSEFdaBhobrY5CcW4DFSsQ== 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 PH0PR11MB7634.namprd11.prod.outlook.com (2603:10b6:510:28d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.19; Mon, 20 Feb 2023 05:39:37 +0000 Received: from DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::bdb7:d4c0:39b1:7ca3]) by DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::bdb7:d4c0:39b1:7ca3%3]) with mapi id 15.20.6111.019; Mon, 20 Feb 2023 05:39:37 +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+ggAA3lICAEssl4A== Date: Mon, 20 Feb 2023 05:39:37 +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_|PH0PR11MB7634:EE_ x-ms-office365-filtering-correlation-id: ca92f2e9-4e2d-412e-b5b4-08db1304dab9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YTxyA4slGieqa3+0WxoK/Ee8q8VJWz/6REIYLCovwp36AGaJoaHvAg9ebm+0fNAeu8yUqoX19Uc+tZMk4t/Yf8ymMRMQbQY/5oboX7sVTnCww5gp0cv6zsMbQjWtdCWSu7bPe2YWXgtBDVPdPoFzpW9iTEiweq65XMMklAidkQuwwo4dOGeXymJrwIyUWHbcg05B3CjhOkQizoWTYEzfUvQVEXjtAO2uTcqZPeWQP1RrdarwkOF9g7yGcsyZ1SG5wOn2tfaGcDPZ3wtUrniNfjd/Gf+Cwsu6t+RiPaptl77iUwFixIxAbL0Da+UXjUxX5qKBpEJ9j1PmXBhuoSMXTsSnWxXcc1cPospf+8L3HfMAqsLijLqKpNyoAz9LLVmUPbLMEG0ttFr/rUL1TlnELkPp0xLrriW0TkjyV7iyaGjXMim/V7/FpM07iKyoACTFRv4fZoplbBjsrdThJEkQ8aaip7YayAHYAE9fK1DyacglDTbiWSDrM1Kd4+c9Ui3/qToUVXlnUiBzxtBcCp2zaQzgw0znyoxXyWO8oYplzMLfrL4HWdOhpkMtCJKwT7rNq9o1ElorTTEhc5al9sQM7081hA97A/gxy+a+ou48xfCyJHiihG8JwZD/WnfsHhbW78RPnA12e5irz3Mup4YQfx9+LttTr9awZMfiohrIZDr/TZ82z3m4jj9uiAL/7K2yugGp+kaH6Ah7ZMSTEHdd3Q== 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)(39860400002)(376002)(136003)(396003)(366004)(346002)(451199018)(9686003)(186003)(26005)(107886003)(66556008)(450100002)(64756008)(4326008)(8676002)(66476007)(66446008)(5660300002)(83380400001)(8936002)(55016003)(52536014)(76116006)(66946007)(6862004)(6506007)(53546011)(7696005)(316002)(71200400001)(478600001)(41300700001)(54906003)(6636002)(38100700002)(82960400001)(86362001)(122000001)(38070700005)(2906002)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?N2dTV25ybEJoT1hIYmpBU01lWmJJUXlTZlV1Q0h6SXlyQ25zS1VYcERp?= =?iso-2022-jp?B?aHlyMVRyajJtVU5zbGVOTWRCVjZ1akk0SXllTGlUbFFOdFhNNkhiODZn?= =?iso-2022-jp?B?VHNVbDU2Q0NYOEkrYXhYaGY0NDl6VU9iUldmcyt6SWNPUjJnSm4zRWJ1?= =?iso-2022-jp?B?c0dudmZqTkNucjBJZmxDM08yaXFGVGMyVlRjamh0azlRak5BaCtiY3g5?= =?iso-2022-jp?B?QlRqRG43cXVOL2wrdjA4L2hEUHlsUVBkelBpRWc1S0JGeUNrR0lQT3Q4?= =?iso-2022-jp?B?cmZJN0tRZ3UxNXkvRGw1b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sNHZx?= =?iso-2022-jp?B?UjZVeXZUa1JhNG1lYk10aFA0bDhCbnJXcFhKR3hXb0pNem5LMnkza2Zu?= =?iso-2022-jp?B?UlRaRFdkSFg4QmRGR3QrVjE5dkpsMG1xcnNZTFNYUVhsdnBMd1l4NFg4?= =?iso-2022-jp?B?OUNDVW4xdkozWkRBaGV5TTA5VnFUMmY3Nkhhd1JQdGtCTkNtWjhPNjRk?= =?iso-2022-jp?B?SE4vaA==?= 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: ca92f2e9-4e2d-412e-b5b4-08db1304dab9 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2023 05:39:37.2832 (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: lMlyaQs64e8aB9SkRj6hZ0dQ0yDZunqqwMwQe8n0TyslSeNEvzK4t+HewokcgC6ozz0u6R1W+iQvsqOv9TlGCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7634 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: He, ShiyangX > Sent: 2023=1B$BG/=1B(B2=1B$B7n=1B(B8=1B$BF|=1B(B 14:39 > To: 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 >=20 >=20 > >-----Original Message----- > >From: Zhang, Yuying > >Sent: Wednesday, February 8, 2023 11:22 AM > >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 > > > >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 > >> > >> @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_g= et' > >> >>> to get queue state from shared memory. > >> >>> > >> >>> Fixes: a78040c990cb ("app/testpmd: update forward engine > >> >>> beginning") > >> >>> Cc: stable@dpdk.org > >> >>> > >> >>> Signed-off-by: Shiyang He Acked-by: Yuying Zhang > >> >> > >> >>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 fea= sible > 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. >=20 > If the ethdev's queue state is changed by other processes, the queue stat= e in > the 'ports' variable is inconsistent with ethdev's queue state. Therefore= , > should obtain it from ethdev when accessing the queue state in the 'ports= ' > variable.