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 67C10A0568; Tue, 28 Jun 2022 13:26:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0363D40691; Tue, 28 Jun 2022 13:26:05 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 312D6400D7; Tue, 28 Jun 2022 13:26:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656415562; x=1687951562; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=l91+HBHJI4ZRXFaT58dmvLODtJKWBSWiv3qmA6/Ff9c=; b=Zj/a9ya1KEvcVj3ma/Gwq05eZVtkKKLNq+pd9CYKpTE22Shvh+gRXO+f Eyzd/jalcdNMsZguGaRDO16kQUBls8lLoDnJq4xg8E1T3bTotFdmQ8vV9 9iuyojcbJ3SVH8OqrpTBaNNCTDj0d/hdwA1b2vdcXTEzKMcxDzBgjt8Qn Mb67kJSHuuVPr96Faej1+N91Pto0VyQVwnYqsvOupAJaQQrPboyzuWKZP oKZl0Ro8FoanxI1K39I14LoL07cSxrmSmG8r9LNrXntWrOaQiOi6aFOQp KyA7uJkj2l4SuN/7RIlow9pZJ5muuuCvulCfTbiDzCFkO+bZRH6PwsV7M w==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="282449068" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="282449068" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 04:25:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="658103104" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga004.fm.intel.com with ESMTP; 28 Jun 2022 04:25:53 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 28 Jun 2022 04:25:52 -0700 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.2308.27 via Frontend Transport; Tue, 28 Jun 2022 04:25:52 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.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.2308.27; Tue, 28 Jun 2022 04:25:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EeHt+wtY42jXu7jdkPNXGF4r+btlzO4Vv4lEEOsImEKB1cqD6AFPhYTzseNiFPI+RYoN5Pw1MBfNS+Qg12mi//TTJrzOsgLu5pTSQmnFqVVuFBaHh9jlKVpGWGjKMXVU16nvCMRdz8GLIibG7xjariZM6Z0JNzD9+DopLM+zhmCXMscWiy2j+kcjw/q9+Vm6MGgAFg+EPqByElN2UGSngivrBv2X4S11Tuv2AuZjV5h7dhcLabtDw1CnUoYvZ4LG+/c3NDv83BnWpTtIuhoPsglxahf9sCg/mxCD59M50wRFDoAZes+gmxZxdShpOhuSr+JeFp21GFtK9hZeDYICpA== 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=Ml9KpBRy8OH5jgpcNiMFYAqXcj4ABcZtJ3W5WukwLmM=; b=SfDar/0Alb7Ob5DPIQGEbYwVF6yxjGAmn5XPfKwvNipZUCzRp9TRZT3Bfzmf+CmeA4IAhXzgsjcREDQFP+BZBhGFpfarcaS7J31ohBxgfF/gFfVwB0fkMpWXdHsF3NYxT64J++BBQE7BlBBVwr0cP1KapNFzUo0nDSo66U77tQnjyFXhgvOZHJlpoVhVSN3m1YjAxIOZAyg3UP70N3Bv4HwGo4iCGoWNwzCjfGSnTSFIlYfky1N6Np56Bzpcz6tnYOe6fA4HbhsKg5TcbwZjbNTi6cfot/5/8LsHs/0J0B3Of+HbTRjjX1bSpGX6QfxMQjCOWz7okganjYe3ZLWtmA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) by DM5PR11MB1801.namprd11.prod.outlook.com (2603:10b6:3:106::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Tue, 28 Jun 2022 11:25:50 +0000 Received: from BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::e424:dc7d:97d3:66a9]) by BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::e424:dc7d:97d3:66a9%3]) with mapi id 15.20.5373.015; Tue, 28 Jun 2022 11:25:50 +0000 Message-ID: Date: Tue, 28 Jun 2022 12:25:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] examples/distributor: update dynamic configuration Content-Language: en-US To: Omer Yamac CC: , References: <20220621201517.76991-1-omer.yamac@ceng.metu.edu.tr> <1316cb8ca17a15f61db96dae18e99856@ceng.metu.edu.tr> From: "Hunt, David" In-Reply-To: <1316cb8ca17a15f61db96dae18e99856@ceng.metu.edu.tr> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO3P123CA0008.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:ba::13) To BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eeaa790e-9f8e-4e2a-9cf2-08da58f8f47f X-MS-TrafficTypeDiagnostic: DM5PR11MB1801:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cbFVVhq1DyAyW5hRFnJC6beE0zXRmlIiCHVrwU29Pbb9V3cisAKC0bVRnWNtR692OsDEqOuosPDPuea2B46suJ42eTpPd6m6vw820DdWBAmKRvmUZyYpNq+OzexUwqzrhTXbEieA/x3PLGc9KIPExLPr+mOip3urp/gLo2rr5sabfTg8FfwMAsMY6gWS0nReiTKY/ADyT4U3LNJFlI0zcY4yg0z4aDU/CdnTmOZWgNbmhJC/rDaXkRTIlSBG3WBuSi/CXA/kicPHKda8otWymuHb//FfpWYNmk/L6xI3RS/xw2uiUTau/Y8+H9f8Yu6zUShbPBFpm0s5eQLKb7qlDQnE4h/w0avSxkAz83MGdY7IYIkc2zssHXwF9v3JU4GTXwlQuuY8qXlB5VZkWDszNZ+HnsAs7epF5j/o8tH0pZOcygL1q1emDqm0FwovHgEV9pmmOcB8XPV5WNANsz+icahQeWoXY76o/7d29occ+oiUl9JMA78l1Ll8BL0XQEZLS6mR9MnQZgE45MlMOF5SGu6O/WdPRdltCkJ20tDeq0NqqAwSSOktgQ/BHLgt4SGA8MjTdmwixNi2kUJQDHAYikDV01CNGZcq3wTvrBtXE0aWxUlAwYA2eCusydSCyDtKWmQ+ZahDwB8Olfyij4BPWBHLtK6hFL8MFjyK3VKvbcnvGi9IAgJ48wZriuoHsVzw3Pkwef6kCIFPBNqxNw2i2FZ+t5xyuxrefsrCKDN7+/r2eJclq0lPIwBOBBcYtSKo+k9fyYuy2X+xdgv6otRLpUVGVRvI9d5u7y0ot3UXlJ7/0+AVIcDp8zMwFr9KsqcW X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3799.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(376002)(396003)(39860400002)(346002)(136003)(366004)(66946007)(8936002)(8676002)(316002)(66476007)(5660300002)(4326008)(53546011)(26005)(6916009)(36756003)(38100700002)(6512007)(31696002)(66556008)(6506007)(82960400001)(6486002)(86362001)(478600001)(2616005)(2906002)(186003)(41300700001)(31686004)(83380400001)(66574015)(6666004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UjBXVDZKNFJLVTJpSXRzdWJJcWNyTGkzekM5di9xN2MzTVRNWlRmT2F3Nkd3?= =?utf-8?B?RXExTEpBejhZRzlxdWFPWXpmWGVObE44dnJmc2VkMHhFZXZzcHo2Ui9qS2U4?= =?utf-8?B?T2x3aUt2V1JoZ3QwUUFXQUF5c0ZYZDA0SDllYlBKK3gxQ3pCcDB5L21vRTVh?= =?utf-8?B?Ym1KRHFnQzVOUStPTExqaXpqeitSTXFDVlhzSGZ1K1ZFcUJmMWFTaTVTVjhp?= =?utf-8?B?Q2hqUmVobTE4R05LQm9nZkNBaXF6QU9XNCtOU0JONUFDM2VtNlo3YmVQUWFQ?= =?utf-8?B?cFcxZUwzVmVVbXJZWncvSC9LSHN0dUp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SHBC?= =?utf-8?Q?1ZuxpJtK6vUHugcTNUaP5+v+9?= X-MS-Exchange-CrossTenant-Network-Message-Id: eeaa790e-9f8e-4e2a-9cf2-08da58f8f47f X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3799.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 11:25:50.6140 (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: rZue8W2EUT4fafoyjJ0ubdYmBic72aoepSpEi6/ai1kmwSSPM7/6pxbj65rCXbQywYCaa1Na23hyqItjshn7pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1801 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 On 28/06/2022 12:06, Omer Yamac wrote: > Hi David, > > I have one more question. When I was working on new patch, I just want > to make sure what we are doing. > On 27.06.2022 18:51, Hunt, David wrote: >> Hi Ömer, >> >> I've a few comments: >> >> On 21/06/2022 21:15, Abdullah Ömer Yamaç wrote: > --clipped-- >>> @@ -39,6 +39,7 @@ volatile uint8_t quit_signal_rx; >>>   volatile uint8_t quit_signal_dist; >>>   volatile uint8_t quit_signal_work; >>>   unsigned int power_lib_initialised; >>> +bool enable_lcore_rx_distributor; >>>     static volatile struct app_stats { >>>       struct { > --clipped-- >>> @@ -724,7 +794,12 @@ main(int argc, char *argv[]) >>>       if (ret < 0) >>>           rte_exit(EXIT_FAILURE, "Invalid distributor parameters\n"); >>>   -    if (rte_lcore_count() < 5) >>> +    if (enable_lcore_rx_distributor) >>> +        num_workers = rte_lcore_count() - 3; >>> +    else >>> +        num_workers = rte_lcore_count() - 4; >>> + >> >> This could be "num_workers = rte_lcore_count() - (4 - >> enable_lcore_rx_distributor)". >> > For the "if-else" case of enable_lcore_rx_distributor, we will reduce > the line of codes; but I am not sure about that change. Because the > type of the variable is bool and we are using arithmetic operation on > that variable. I think it is a little bit harder for people to > understand operation. Am I right? I can suggest one more solution. We > may change the data type to "unsigned int" or Is it okay to leave as > before? > > --clipped-- Hi Ömer,    You raise a good point about readability. Let's leave it as you had it originally.  Maybe just add a couple of one-line comments? "rx and distributor combined, 3 fixed function cores" and "separate rx and distributor, 4 fixed function cores? Rgds, Dave.