From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10069.outbound.protection.outlook.com [40.107.1.69]) by dpdk.org (Postfix) with ESMTP id 68D5F152A for ; Mon, 30 Oct 2017 04:34:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rSgccrtfZ4GC5iFHMsbiFuBafoZvRWkChN+wdCK75qE=; b=O+mkK5cGY5KuxJDAlVeKZ7oo7S5k6p7DIg+x3M7CIRHRXUYV1waEWRrct0f/R5vMC4cjDunUrPUCp9NRrkyiIhSg9v2vDouYpE7oADJaM3Qw9O6ROvTmCbgSSGQO2Yz+uL/EpZq1oPMa04EUJ1EteXk+rxaAj3xdBmTvFpuZ77I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jianbo.Liu@arm.com; Received: from arm.com (113.29.88.7) by AM5PR0801MB1346.eurprd08.prod.outlook.com (2603:10a6:203:1f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Mon, 30 Oct 2017 03:34:21 +0000 Date: Mon, 30 Oct 2017 11:33:18 +0800 From: Jianbo Liu To: "Dumitrescu, Cristian" Cc: "dev@dpdk.org" Message-ID: <20171030033316.GA26390@arm.com> References: <1509072919-17348-1-git-send-email-jianbo.liu@arm.com> <3EB4FA525960D640B5BDFFD6A3D891267BADB0A0@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BADB0A0@IRSMSX108.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [113.29.88.7] X-ClientProxiedBy: SG2PR01CA0085.apcprd01.prod.exchangelabs.com (2603:1096:3:15::11) To AM5PR0801MB1346.eurprd08.prod.outlook.com (2603:10a6:203:1f::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2956b09-dfcf-4557-383d-08d51f471ccb X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(2017052603199); SRVR:AM5PR0801MB1346; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1346; 3:cDpOyHwT92T2igi4WLzC1YAXeiYnXDhvEqBoNSE2apdDiEfYMpfLGn/SMxAbIG9Oxt90icEOSJAs7y0R+R16IxssuSl7loyYAlr3Cw8+Dz4baxJFNwo6HS00ejdcZgk4ySapJOkitQq2u8zqjYgUvVztjy0dXf3HCkvbMXY1EGPNYXIPet6GpcssMHrovvxt5Le77qF9sl3rgXJVdPrP5HEggPOhflq+1jSInvrJinkk+rJJ8QBNqKQGXEpDJPIM; 25:vYs7DmBLEj/Ya6gT9FUbYs8d07RLZ1gQgQO2ZTK7rU5BTAQO4Z8h4V/ZjsQYAIBORE1x1AJkzAubBV/IQebEfuYVe0Vo4pABXilIc6VdPXnCmdCHIBnKWfDhkLJyb437fhoR7JGOM9IRPmIPqfAKsfXlbrnfUNeElmh2xfx82fJuOntLMFzduxLfA8iwgAtRS4AoN9vM8fkNNGzYsaG6JTmxscrlFTd2CYdRPMwuyvqXNOnMoQ83fFZZESaOGwY5RsaiLQ6EioAhuvWipiSn8D+qFlQ5TXGJiSzSL0TPr6w1K5g4yWo8yqIdk0eUHzXPQCull5PcBITAoE46jPwnDg==; 31:ps7eS++LPmgge37qV5BIb9RrepJe+PZjA+xf6T8a31q3DSDvSsmSJGUya1COkKY1E99rpYi4ser7bqHipvQOat4jZU9taN2mk3gl2GFF9e/IeEFCCBRZPF1PvLMPf+GxNlgnLDFDT5CLYK390vO6OXxH1kKwl2M6rUscKwvURs3IfKF1H5JIxbG15JgOQtQRRH1b+mad2FC8ovVeJKS5w3e9BJoFxVjOfbX+9ternt4= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1346: Content-Transfer-Encoding: quoted-printable X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1346; 20:Ly94Bj5qbIBXnPf2o8C4hvweIdGe5imjWXhC4h7naX6bzZw73f0hzBdWz62jDiYEL1zAO17ji3824jT5qWteCeilaguGwHicOHq+knIb7EGFVOnbRZJaDtxo2D4711+fViSmncQxFjT4JwGxyLNPBupagmdw1zyUpjAfP/suUhacPRNvEEVGdCN/8Ie0StdwhB+6oAs7XxVbd0MtHtRSCq15mPTtqRW609t3A5wH3NHLc8P4Hr714lr1KcLERHiCBt+k/E7LPUXgSlE5eNiXAqi4uxpmvDZd2OTtDHZZKh1MmEzPwpGGnfLDBlLpIq7VcGm11P/qWBrnfi/4yCxtqAgO9pH+2xcSeh36XGViIdWZP15In9HUc3rQqonvU7laBpDBCWWckEbgr8V6k/6sZVlzTRWh9YUN5j+XYsgvIYcbQshYfEnMX45Db+Pz3kdLUgXxW/7M7ZPdDu2MoVarfl/1trd7eRyc2Y4xZPPheyPROeKxhD14esZr37Fj9elD; 4:+JBH2+Azd0uG+iQF7Ox4G985mNcSwmb+ZpQkHNK7AHVqrgkUfu+i59bHKE8JLcMyK7fTShR5sFQ/ZYY2VYDe8Jn3MwsY64MpwwwdS01uqy9nCYQVGxQVrwQHnKI7BMFEPGlBygmAxs1abav1+Cjk8j/RL2dWs82RxxN0Mar5A4ksVk71axY7p5D80kF3uwlvv+I9PE+GBJH+KUXIDrlaLd3tDeMAs0mI6C6MycG/pXLM4neQxgkXUe1aly6eLdIfFCuJJ1fbu7d4Ey70GsBJDl6PJOmXtcMsF6sP2qqRVkOabrLM72DnqXnV0iCyFdw4IcVYEryqQpC1a+1qASoKSQ== X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231020)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1346; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1346; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(40434004)(13464003)(199003)(24454002)(189002)(81156014)(50986999)(105586002)(6246003)(106356001)(53546010)(25786009)(58126008)(76176999)(229853002)(72206003)(7736002)(561944003)(36756003)(54356999)(55016002)(316002)(305945005)(8676002)(478600001)(33656002)(101416001)(53936002)(2906002)(47776003)(83506002)(5890100001)(2950100002)(1076002)(5660300001)(6116002)(3846002)(189998001)(6666003)(4326008)(16526018)(6916009)(97736004)(23676002)(66066001)(86362001)(8936002)(68736007)(50466002)(81166006)(21086003)(8746002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB1346; H:arm.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA4MDFNQjEzNDY7MjM6SHZtSThCOXlhQ09YYnU0bWdmUjF1REJs?= =?utf-8?B?M1A1MHBRcEltWXQwbm9VVVlTM3EwVkxJYTI1R0pNaDRNS1lvd0VZSm53UnZK?= =?utf-8?B?Smt3TFRJQ3lDYit4L0k5K044MzVWdjl1S1dqK0JhbWRQQkNnaTNrUWlpaFFh?= =?utf-8?B?QTFiQkh2RGNhUDlQSFpBb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oGMjZrCwXj75Qu/ftcPuUoiXyJuEG6rJPzNDfs/HGBCSJw52gbK2V95oksmmj4blbvyhnm/bBjKXZh6ELwEXj/JtUvgaQzDWbpGrG2RW6ynJmC5d/CGmeFU0cv70W/AVH/Y0sFlRYHHhGvflHZ9dy1dI3KLATQgov4cr1xE00vQHkjS3flr6y6nstZb2uXm9zCZZCfwrkNWqRsLGA9XCA==; 5:UkSUcaWrWsTDdmb2PKS33CnFL4r1VfbwZxePSvxbapmKX23nawvwgdfIhx8fZuvGDe1kJzKJgroCXEhAVPQHqkjMbqGuDIDDFMSqW+r700FWFU1X58hZfsN6bWvtvKPBf0sxdNIawNvg3f7qserSqg==; 24:MrXp4ZpfVtqD3aRvsU2ghXnPdcoUWRWxxNp+M2s9/kLW2h01OKG009geryPd9Bj2TCzjL2x9uT7z/iPBmzrT91SowDAbQbBZRrJRY/y6PfU=; 7:ZB2Y+YSbZ9Yqn85MqlDzwhhCDS4fICNWL+yu9Dz4IrJ7u4xsB8svqBQ0cn5cXqXzTPTjcoLYrCUZdvisKr2PvSdNL8Qd/0DUGSLS1spQ1h6WthhiSHC2Q7HFb6yhiv36BoEb//dcUCDvA7ieQP6jR+1PEIqXvHBounrs+fUnf1vUUC3p1QMOTo/W4dUtp/BUDreAaeeii+N8Q4bbFCfTqO0ho9T+mQJEShsvbjQJFzM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2017 03:34:21.8502 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2956b09-dfcf-4557-383d-08d51f471ccb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1346 Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: avoid the failure of creating hash table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 03:34:24 -0000 The 10/27/2017 10:01, Dumitrescu, Cristian wrote: > > > > -----Original Message----- > > From: Jianbo Liu [mailto:jianbo.liu@arm.com] > > Sent: Friday, October 27, 2017 3:55 AM > > To: dev@dpdk.org; Dumitrescu, Cristian > > Cc: Jianbo Liu > > Subject: [PATCH] examples/ip_pipeline: avoid the failure of creating ha= sh > > table > > > > Hash table function will check if the input bucket size is power of 2, > > so the parameter should be rounded up before sending to the creating > > function. > > > > Signed-off-by: Jianbo Liu > > --- > > examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c | 2 +- > > examples/ip_pipeline/pipeline/pipeline_routing_be.c | 3 ++= - > > 2 files changed, 3 insertions(+), 2 deletions(-) > > > > Existing code is simply letting the library detect the misconfiguration a= nd gracefully fail. It avoids duplicating library checks in the app. > > Your proposal tries to prevent library from failing by silently tweaking = some user configuration params. Easier to debug in some cases. Yes. but is it must for the parameters to be power of 2? I saw the config exmple in examples/ip_pipeline/config/network_layers.cfg: .... 178 port_local_dest =3D 4 ; SINK2 (Drop) 179 n_arp_entries =3D 1000 180 ip_hdr_offset =3D 270 If not, it's the programmer to correct it before sending to the library. Thanks! Jianbo > > For this case, I am OK with your proposal, although not really required, = so: > > Acked-by: Cristian Dumitrescu > IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.