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 0B695A0547; Thu, 28 Oct 2021 16:30:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7CCA41140; Thu, 28 Oct 2021 16:30:08 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 6FDC84111A for ; Thu, 28 Oct 2021 16:30:06 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10151"; a="227873277" X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="227873277" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 07:30:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="573766635" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by FMSMGA003.fm.intel.com with ESMTP; 28 Oct 2021 07:30:05 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 28 Oct 2021 07:30:04 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2242.12; Thu, 28 Oct 2021 07:30:04 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2242.12 via Frontend Transport; Thu, 28 Oct 2021 07:30:04 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) 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.2242.12; Thu, 28 Oct 2021 07:30:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OyUTvFUMjKc+orx8C1JbxLffpLNxKURepSN4rjqUXW/tmMei5Sk1hUhR/TmwTDnZDQbMfW7Nrd+861ha9L6yTqhA860M8PWu1LdbOjpyNaGQNXshhJj9Qj7DlQHCuXQ34z3n7kRSKTOkEBCqYu8bsd8UN2LhBk2/zxyygiLnZXTQWDpKiVwLjrZe1pZ1Edts4cum4IK6Tzkv8clCngo2TuHBP/v6kJ6hDswZef7bbr3gkA7NWFXBy0pFEkFrtrQ+3RNId2XvG6OXKLSeUIncRAr8F5LhbBRgyEP2LK/2sPwCcHfxSaZy2EQMqPzW99LsSEjETAvPNpfI51zLTRQPZA== 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=OH/Dm0Wt40ShVB/EKG9aynX8kSB4nvD3wt/7H9AgeWo=; b=STUsMPL2ZdYUXnezF6hlHnrna1G9LpJr0GX6rwPvwtzAkiPf6iq9j+TEIWESRK61JipOCBR2Ko2ivjv4qbzl2I4NrmXXzx2OQ2T4ZMxf3xs81N6mg3Y32LW/QQr5/56J/YudoJc9NDOQ7RzW3dIzMDSZMqbiYCp5sZQQSIzuaUdeOlrQNcizv+G3EYOnhQRJx08Fo5XDDm/Uf+oq20Kia0CFw5JDRsOjINKHJMlVgHwZqT2WOP48wQMpJ4yjPNUDY5ydXeDT7dwMlEd6CkQWGcs9xcZ6Y8CQHbastfUBM3iTEPqWfIwt/Q2UcQrTlPvpy1d0hSivyMQ00Z3x2ctd9A== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OH/Dm0Wt40ShVB/EKG9aynX8kSB4nvD3wt/7H9AgeWo=; b=vk+0/ZptHwh3MXXH5MkjjFRqe5DoMqczc8qYOnkwY7f3lFyC5ilCUKEmOsChjXooFtTsJfrrfGIl7j+viCrfc4AwpP1HTTlPG1cTnuTcJjNsOzazAOdFdUXHUh1g2H19ipqltH7q+ouX7urD/aHLjTCmd+DI4xwtNnfjRYjs37Y= Authentication-Results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) by PH0PR11MB4934.namprd11.prod.outlook.com (2603:10b6:510:30::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Thu, 28 Oct 2021 14:30:03 +0000 Received: from PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730]) by PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730%3]) with mapi id 15.20.4649.015; Thu, 28 Oct 2021 14:30:03 +0000 Message-ID: <4fd478e1-a65d-405c-a51f-4b4569908357@intel.com> Date: Thu, 28 Oct 2021 15:29:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.2.1 Content-Language: en-US To: Gregory Etelson , CC: , , Dmitry Kozlyuk References: <20211026095037.17557-1-getelson@nvidia.com> From: "Burakov, Anatoly" In-Reply-To: <20211026095037.17557-1-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR0301CA0082.eurprd03.prod.outlook.com (2603:10a6:6:30::29) To PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) MIME-Version: 1.0 Received: from [192.168.1.10] (212.17.34.161) by DB6PR0301CA0082.eurprd03.prod.outlook.com (2603:10a6:6:30::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Thu, 28 Oct 2021 14:30:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cfa74e1f-5908-4308-1daa-08d99a1f6e3a X-MS-TrafficTypeDiagnostic: PH0PR11MB4934: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LodE0Hp/y2GCFVI07R0SfNsptVcAv/7GY1Qwm94HhNFh60mUdUBYeBCxZizl0snGROfqjB8O2sums4yWDMjZeAZrfkeF/lf+KsqE9uzzl6bEzSOXIktAzcaQPHryidfdD3HVaoT9GntFfgITf5iD+eFIAhU/OEZOE6/h/73RwomKFq5Uuq2WfLxKkBuCjytbwhv4K1tNLLiX+US3GyR4taiKKa/23u9Wm+SCI12uEfQS2CdacDDMiKrYxsRKBuhTcM1LV4PFm8poPVzflK27hImTvYnKANQHRFDhjomcHf/dqdXkEbiUL9Hem2QvOi2ihetkWKnglrqGPRPUxNz6mQPvNZqZ1/XTaPx8E1SQ/wmZ/eD+2Co4h8AkfEVWPXKde/cDJauIwpX1jYq0kt3UndT1J6EI2DGXAV3i9Ze4fyGML86WQ8hnmIcgcsiPvnqM4jrbUUULsuc9MiiypbI5O0usSAlfV6HJiuIt8f6sIX4vdLyfbesZqWYXoiufVDM0WmHyMkO6nnqiiCK/Q9oP3J5Eu1hzSFA1hjSJi5JshrxTfdWKR0VggIFW1h0TY+eWaU1yAyK3/0cRFHjdYxbCUzFhJvNmf4GIdF++bzA2Yzhd9QRdSfpeI1XtAU/jVctfL5pmriQk0VLQ6NsbGijcKdIocgAz8qXZVRwMlRAkOlSNSkq5G4m67KtCaCA4BZc0mKxgRW1Y9kjpbK7VVYpqTIeqGVgizp6talXvBel3q90= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5093.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(82960400001)(86362001)(31696002)(53546011)(26005)(31686004)(956004)(2616005)(508600001)(8676002)(186003)(16576012)(316002)(2906002)(8936002)(5660300002)(4326008)(66946007)(66476007)(66556008)(6666004)(38100700002)(83380400001)(36756003)(6486002)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QXhKNnRGVXl2eE9wWG1xZEdmbFNoTVRwd2V5SGdBZHJJd056UWF4TVBGYTBI?= =?utf-8?B?Ym1xSGRQOHBMY0dZRFBwemRxWFQ2aVI0YXpwSVVWbTNJbEEvUVEwQzhVVHhH?= =?utf-8?B?Q0J0T1FKUUVHVVJWaE5Wa1hIYXRiNXFlNFJ3RGRIZDlORzVEV0JjVWFEbnp1?= =?utf-8?B?dzUrYWl4Q0ZmWWNZWllqR1M4UlZNOXFRNHlUUnlHZ1M5b3RGQnZIWlcyV3hs?= =?utf-8?B?aitkaHVzam1CQlNhRHl5YzMvamlmdUxTQ0Q4WGlmU0E5bUI4c3lSZWVmNEcw?= =?utf-8?B?NU0yQ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INUF2K3hpOW1iUjViOHdDV1hSSHM1MURQMEdJ?= =?utf-8?B?dFphR21WZi9yU0FSYmRXN25OcXZJa0lUUVZjOFpyS013VmVXUnJIMG5obngx?= =?utf-8?B?ZE1aRkR3WFhpRlBNdFJXRjRpS2JYTWcxV0w3eHB0KzVuWkdUT2tFTUUxUmtT?= =?utf-8?Q?xK00CNquXj2xuED+MWsNUtxEBb9kfj5KH8m7hix3+Q=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: cfa74e1f-5908-4308-1daa-08d99a1f6e3a X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 14:30:03.6429 (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: 6VpIhdBFKyzbreiRpVck+9JqzGQ3RlCl5r69zEtG+kKEIh0vtYQjIC9XT0rDgmZ7+GDIle9dO9Qt2dkzLMHRFXiwQmre4Pau7Z9p3qbsKN0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4934 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] examples/multi_process: fix RX packets distribution 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 Sender: "dev" On 26-Oct-21 10:50 AM, Gregory Etelson wrote: > MP servers distributes RX packets between clients according to > round-robin scheme. > > Current implementation always started packets distribution from > the first client. That procedure resulted in uniform distribution > in cases when RX packets number was a multiple of clients number. > However, if RX burst repeatedly returned single > packet, round-robin scheme would not work because all packets > were assigned to the first client only. > > The patch does not restart packets distribution from > the first client. > Packets distribution always continues to the next client. > > Fixes: af75078fece3 ("first public release") > > Signed-off-by: Gregory Etelson > Reviewed-by: Dmitry Kozlyuk > --- > examples/multi_process/client_server_mp/mp_server/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c > index b4761ebc7b..fb441cbbf0 100644 > --- a/examples/multi_process/client_server_mp/mp_server/main.c > +++ b/examples/multi_process/client_server_mp/mp_server/main.c > @@ -234,7 +234,7 @@ process_packets(uint32_t port_num __rte_unused, > struct rte_mbuf *pkts[], uint16_t rx_count) > { > uint16_t i; > - uint8_t client = 0; > + static uint8_t client = 0; > > for (i = 0; i < rx_count; i++) { > enqueue_rx_packet(client, pkts[i]); > Wouldn't that make it global? I don't recall off the top of my head if the multiprocess app is intended to have multiple Rx threads, but if you did have two forwarding threads, they would effectively both use the same `client` value, stepping on top of each other. This should probably be per-thread? -- Thanks, Anatoly