From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay-out6.mail.masterhost.ru (relay-out6.mail.masterhost.ru [83.222.12.16]) by dpdk.org (Postfix) with ESMTP id 051B41B91C for ; Fri, 6 Jul 2018 14:00:11 +0200 (CEST) Received: from [37.139.80.50] (helo=nw) by relay6.mail.masterhost.ru with esmtpa envelope from authenticated with alex@therouter.net message id 1fbPP9-0008Dm-TB; Fri, 06 Jul 2018 15:00:04 +0300 Date: Fri, 6 Jul 2018 15:00:01 +0300 From: Alex Kiselev Message-ID: <1597681502.20180706150001@therouter.net> To: Bruce Richardson CC: "dev@dpdk.org" In-Reply-To: <20180706105625.GD6220@bricha3-MOBL.ger.corp.intel.com> References: <20180706105625.GD6220@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 126610 [Jul 06 2018] X-KLMS-AntiSpam-Version: 5.8.3.0 X-KLMS-AntiSpam-Envelope-From: alex@therouter.net X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Info: LuaCore: 149 149 93a1592153427f08a0384b1e4f099aed80803c7b, {rep_avail}, DmarcAF: none X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: not scanned, disabled by settings X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.2.16, not scanned, license restriction Subject: Re: [dpdk-dev] [PATCH v2] librte_lpm: Improve performance of the delete and add functions 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, 06 Jul 2018 12:00:11 -0000 Hi Bruce. It's the test #1 which is giving you the error message. And I don't see anything wrong here. The test is trying to create LMP with the name "LPM1" which is in use=20 by the already created LPM, so it writes error message to the LOG:=20 LPM rules mempool allocation failed: File exists (17) It's strange thought that you don't get the right message. Instead "File exists" you get "Unknown error 17". =20 =09/* rte_lpm6_create: lpm name =3D=3D LPM1 */ =09lpm1 =3D rte_lpm6_create("LPM1", SOCKET_ID_ANY, &config); =09TEST_LPM_ASSERT(lpm1 !=3D NULL); =09/* rte_lpm6_create: lpm name =3D=3D LPM2 */ =09lpm2 =3D rte_lpm6_create("LPM2", SOCKET_ID_ANY, &config); =09TEST_LPM_ASSERT(lpm2 !=3D NULL); =09/* rte_lpm6_create: lpm name =3D=3D LPM2 */ =09lpm3 =3D rte_lpm6_create("LPM1", SOCKET_ID_ANY, &config); =09TEST_LPM_ASSERT(lpm3 =3D=3D NULL); > On Mon, Jul 02, 2018 at 07:42:11PM +0300, Alex Kiselev wrote: >> There are two major problems with the library: >> first, there is no need to rebuild the whole LPM tree >> when a rule is deleted and second, due to the current >> rules algorithm with complexity O(n) it's almost >> impossible to deal with large rule sets (50k or so rules). >> This patch addresses those two issues. >> Signed-off-by: Alex Kiselev >> --- >> lib/librte_lpm/rte_lpm6.c | 1073 ++++++++++++++++++++++++++++++++++----= ------- >> 1 file changed, 816 insertions(+), 257 deletions(-) > The lpm6_autotest is now giving me an error when I run it, which wasn't > there before, though interestingly the test is still passing overall, whi= ch > seems wrong: RTE>>>lpm6_autotest > # test 00 > # test 01 > LPM: LPM rules mempool allocation failed: Unknown error 17 (17)# test 02 > # test 03 > ... > On the other hand, the performance numbers, especially for delete, look f= ar > better: > Before: > Average LPM Add: 531220 cycles > Average LPM Lookup: 41.7 cycles (fails =3D 0.0%) > BULK LPM Lookup: 33.8 cycles (fails =3D 0.0%) > Average LPM Delete: 1.41825e+08 cycles > After: > Average LPM Add: 487116 cycles > Average LPM Lookup: 41.7 cycles (fails =3D 0.0%) > BULK LPM Lookup: 33.3 cycles (fails =3D 0.0%) > Average LPM Delete: 3.65125e+06 cycles > /Bruce --=20 Alex