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 A036E41C3A; Wed, 8 Feb 2023 07:38:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AB4B41151; Wed, 8 Feb 2023 07:38:45 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 7837440141; Wed, 8 Feb 2023 07:38:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675838323; x=1707374323; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=NyfiXqH+e1kieiuDsK/6QstlUgRkUUYMiyS6VGIyZQY=; b=OsDcMgDrizUgpcgMVshW48I5BVoA+1TzMOh4pu4jhYSwyyYGCiGRmyCo J5EaxvKLeQyuAKtdb3CN60/0WEGQPZoRqTZVcwCd9cAH+AFolkzco/CNa sEOnT5O70I0VhwpOQi3wEaJoiHVIKQY13lV+E7QFyCSkGFycDGoHF7rwm x2Lj2YhNEkWjoWkHMDOzBIpv+oHgQiQ8J7jkFz1nA1fnQ4gwVNKwpNGNQ XiR8PDZMWVSv60EOED/Bxiok9P3gTncaIcF0lGds5SwwETdkmU6GCC26P mHvl9mG/YEUk4ryYGnUVuqPTpghG+gW/uuvIIqoQwPQgFFY0XftbUdKIx A==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="317723887" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="317723887" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2023 22:38:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="809827274" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="809827274" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 07 Feb 2023 22:38:42 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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 22:38:42 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 22:38:41 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 22:38:41 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.41) by edgegateway.intel.com (192.55.55.70) 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 22:38:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DOLTw6nmOOyQi9pb9CafmG7A1BayrI2zjlUq1+Twwo5Tm2AbLuzI5gddjhSXgcu5aTvlkPAVHlixz9wFpG97axLkpzHmUPDpcqqxxbpZni/HeZ8v0jBqxB0JuJtmgGtX4VtAlN8BfQanSPFQzflHuRfn+aSTTugFF3cNwtJEkhethk3OxyLUbjkVE9zf0ZrA05cOWccK16El+4NA3pSUCkVbXe9vgL1xXHWN8SOr2dparvLWrJE+IIxvEWDzlY5iWvuOMAM3vCg9sZGjLEmxSaDKOTl6W7M+QgUBFgj0WemQbM49d1xh6iKmZDzGbD4kZFmoLNzfLIJHlm+uXQFw9A== 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=NyfiXqH+e1kieiuDsK/6QstlUgRkUUYMiyS6VGIyZQY=; b=JTFYv72d7f07boKF4Q5CleiyYmEC0UGLSmWMb/tCOrKqsRyxrjjLiFPwGutOfkDvHEXi5THeLx/QhbB2YANAFv7NXPCb+zGw/ogXOEgFBYR48rpKaVbjQUfet5se7f2yDFq6LyeT7vcPQRRjKEX8X7/4MIDIo/UFR1N466zauHfvNoV4Nlcsko892+m3Y6kXsdo+y4kOKFnq71aLTcaUC7bKVfHJJUSosZaHc5pINtotaAfww/U3TU6SIlkOn+qwvt89l9Sxuzy6vZxf736oIyxlDc48Wozk0rdZE8XM6T9Eadr5NtGyxQdxSCgPLIbWve+rlTyedYqplF/7LvGp8g== 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 BN6PR11MB3938.namprd11.prod.outlook.com (2603:10b6:405:79::23) by CY8PR11MB7747.namprd11.prod.outlook.com (2603:10b6:930:87::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 06:38:38 +0000 Received: from BN6PR11MB3938.namprd11.prod.outlook.com ([fe80::4b15:90b0:c281:2a6c]) by BN6PR11MB3938.namprd11.prod.outlook.com ([fe80::4b15:90b0:c281:2a6c%7]) with mapi id 15.20.6064.034; Wed, 8 Feb 2023 06:38:38 +0000 From: "He, ShiyangX" 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 Thread-Topic: [PATCH] app/testpmd: fix secondary process not forwarding Thread-Index: AQHZHCWTalLPgfv2HUKGzEeM/yyAlK6GrpSAgAWkPjCAD7wToIAoke6AgAAyBFA= Date: Wed, 8 Feb 2023 06:38: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: BN6PR11MB3938:EE_|CY8PR11MB7747:EE_ x-ms-office365-filtering-correlation-id: 53d1718a-2e26-412c-cd14-08db099f1c16 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 52re8rbTET55lsfSP2/BUSHPqmZYKOPYMNqmkgIUwWXsEUP53r7dlbAseas1qNT0k0H620iaTG/nAFusyZzjDyg6BEdJqryEDUTfQheoawVoaJ4iyiqu1LLMyBLs0iHlwIHSupbWD4D7lWYFnnvsE3o7LsRA20PwpVFPtQ55i7tds3/KmhSQ9MLA3/qrQuYjB75f77u3O8Z1TmBeIwFAdT4ckUae1GxKk/tXvHdUF7UeAiW4asrqE1TLKQYKWo1edxx/AVsIcpEty/ap06OMST7VzCSyA6uc2haRfl4ViYYSbwVpqNKqXlP6StrZ5S+NwwPvtLwF32uV/AjZBXjRktziZT0ATm1E4igSVnyfmmzRdn3TgCmsedc6s8ash1bjMY8kApvze+Fd2EGf8sV4a1go5k6OrP7m3q+igXPpeqaeiXrhqBIPIxul2TiaxmhiMwokTx8JrqfvDs/KMqtwE+lgfhpdtVOdK2bbLgh36b/Frl0L2e17F1TNyymBeys3K0d3YG9xOUH+tX5xbQzx3XIL7sU6neE/IVPcM9U7WC39OGiOGKf77M+wNgkNLhsyjGUNjlttLQyiywXeM9gVnBwMcNPmsptcpBUE62Hckda1p0ygNXQJb3R4vzRmDj7ZqwGGNSwTD4vcHBMfQ0C3Tser4OQGT4aJFhZsXCVMRzQzzvJWGkqvreKGNxWV5+yaRYNhlyqhhvjx0NVIezSOsA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB3938.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(346002)(396003)(39860400002)(136003)(366004)(376002)(451199018)(52536014)(5660300002)(6862004)(8936002)(66946007)(76116006)(186003)(26005)(41300700001)(38100700002)(86362001)(8676002)(53546011)(122000001)(4326008)(64756008)(66446008)(38070700005)(66476007)(6506007)(450100002)(66556008)(82960400001)(55016003)(316002)(7696005)(83380400001)(33656002)(107886003)(6636002)(71200400001)(9686003)(478600001)(2906002)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?UnVEaUp5eVpQZ2h0UmsvYTNWSTFNK1ExUFl5V2U0SVpFbnVHbTNnR1V0?= =?iso-2022-jp?B?NnFzY0hWeWMrMG1SVkJIekxjM3I0RWhxTVVEaGhoQ1V2d0Y1WnBwOERV?= =?iso-2022-jp?B?RFA0TFlXT1ZXZmdrQitIbjdBSVVDTlh5V0hjUFB2blFEQkdlZndZZ0ZX?= =?iso-2022-jp?B?L0F2T1dqbGdOZ2tKZFZ1bnQ3SjMrR0tnRmZzT2xTMSsyNDN2UVE0M2JB?= =?iso-2022-jp?B?WnhNeDdJUXdRM0JaNG5TWndFeFR6V0FKNGsrN1BFNWdoQnJvcVYxc1hJ?= =?iso-2022-jp?B?ZU9yVG16SlVpdndWWlFtbmo3d3pqckVzK0t5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iso-2022-jp?B?SmlFc0NocUFrUmUzSFd5bEFzdm9uSWxsV0IxSTRoVGY5ZWZqWnhGdUJC?= =?iso-2022-jp?B?eXlOMmhRS0lKVk9DOFFKMDJQcHdLOEMzUmRBVU1RaHkxYmZLMHVyU1oy?= =?iso-2022-jp?B?c3VldFhLYnprSlBQd0ZsUmN2eHdDTVdBV1dETUlwRFJjSWp5T0tHL2FE?= =?iso-2022-jp?B?TWs1dg==?= 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: BN6PR11MB3938.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53d1718a-2e26-412c-cd14-08db099f1c16 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2023 06:38:37.8294 (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: 2x0XbikZg83d6mLVuBrAD+pHWzs72mMQeNKogyBeD123CaATGB3kJCe0OdozGgMTIDO4A7l3go7G7lQJRXc+fQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7747 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: 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 comme= nts? >> >> >-----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 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 proces= s in >the initialization of ports variable instead of fixup here. If the ethdev's queue state is changed by other processes, the queue state = in the 'ports' variable is inconsistent with ethdev's queue state. Therefor= e, should obtain it from ethdev when accessing the queue state in the 'port= s' variable.