DPDK patches and discussions
 help / color / mirror / Atom feed
From: Alex Kiselev <alex@therouter.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] librte_lpm: Improve performance of the delete and add functions
Date: Fri, 6 Jul 2018 15:00:01 +0300	[thread overview]
Message-ID: <1597681502.20180706150001@therouter.net> (raw)
In-Reply-To: <20180706105625.GD6220@bricha3-MOBL.ger.corp.intel.com>

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 
by the already created LPM, so it writes error message to the LOG: 

  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".
 

	/* rte_lpm6_create: lpm name == LPM1 */
	lpm1 = rte_lpm6_create("LPM1", SOCKET_ID_ANY, &config);
	TEST_LPM_ASSERT(lpm1 != NULL);

	/* rte_lpm6_create: lpm name == LPM2 */
	lpm2 = rte_lpm6_create("LPM2", SOCKET_ID_ANY, &config);
	TEST_LPM_ASSERT(lpm2 != NULL);

	/* rte_lpm6_create: lpm name == LPM2 */
	lpm3 = rte_lpm6_create("LPM1", SOCKET_ID_ANY, &config);
	TEST_LPM_ASSERT(lpm3 == 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 <alex@therouter.net>
>> ---
>>  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, which
> 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 far
> better:

> Before:
>         Average LPM Add: 531220 cycles
>         Average LPM Lookup: 41.7 cycles (fails = 0.0%)
>         BULK LPM Lookup: 33.8 cycles (fails = 0.0%)
>         Average LPM Delete: 1.41825e+08 cycles

> After:
>         Average LPM Add: 487116 cycles
>         Average LPM Lookup: 41.7 cycles (fails = 0.0%)
>         BULK LPM Lookup: 33.3 cycles (fails = 0.0%)
>         Average LPM Delete: 3.65125e+06 cycles

> /Bruce



-- 
Alex

  reply	other threads:[~2018-07-06 12:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c6068a65-bee2-4f34-944a-6cd46ac6a188@orsmsx104.amr.corp.intel.com>
2018-07-06 10:13 ` Bruce Richardson
2018-07-06 10:25   ` Bruce Richardson
2018-07-06 10:23 ` Bruce Richardson
2018-07-06 10:56 ` Bruce Richardson
2018-07-06 12:00   ` Alex Kiselev [this message]
2018-07-06 16:16 ` Bruce Richardson
2018-07-06 16:59   ` Alex Kiselev
2018-07-09  9:07     ` Bruce Richardson
2018-07-09 11:24 ` Bruce Richardson
2018-07-09 12:33   ` Alex Kiselev
2018-07-09 13:35     ` Bruce Richardson
2018-07-02 16:42 Alex Kiselev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1597681502.20180706150001@therouter.net \
    --to=alex@therouter.net \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).