From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 440B51BB43 for ; Fri, 27 Oct 2017 12:01:41 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Oct 2017 03:01:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,304,1505804400"; d="scan'208";a="1210780409" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga001.fm.intel.com with ESMTP; 27 Oct 2017 03:01:39 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by IRSMSX102.ger.corp.intel.com ([169.254.2.180]) with mapi id 14.03.0319.002; Fri, 27 Oct 2017 11:01:39 +0100 From: "Dumitrescu, Cristian" To: Jianbo Liu , "dev@dpdk.org" Thread-Topic: [PATCH] examples/ip_pipeline: avoid the failure of creating hash table Thread-Index: AQHTTs82JmOkhLLeQkmoPP8rvkETeaL3dgRA Date: Fri, 27 Oct 2017 10:01:38 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BADB0A0@IRSMSX108.ger.corp.intel.com> References: <1509072919-17348-1-git-send-email-jianbo.liu@arm.com> In-Reply-To: <1509072919-17348-1-git-send-email-jianbo.liu@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Fri, 27 Oct 2017 10:01:42 -0000 > -----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 hash > table >=20 > 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. >=20 > 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(-) >=20 Existing code is simply letting the library detect the misconfiguration and= gracefully fail. It avoids duplicating library checks in the app. Your proposal tries to prevent library from failing by silently tweaking so= me user configuration params. Easier to debug in some cases. For this case, I am OK with your proposal, although not really required, so= : Acked-by: Cristian Dumitrescu