All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH dpdk 2/2] rib: add mode to include top-level route in traversal
Date: Fri, 02 Oct 2026 11:50:04 +0200	[thread overview]
Message-ID: <DLU9BZ5E8RPF.3NDFT33HJCU0W@redhat.com> (raw)
In-Reply-To: <f3fcf774-03fc-4693-986e-2684fb708bf8@intel.com>

Hey Vladimir,

Medvedkin, Vladimir, Sep 30, 2026 at 19:12:
> I'd suggest to reflect changes in release notes. Please find other 
> comments inline.

Will do.

>> +	while ((node = rte_rib6_get_nxt(rib, 0, 0, node, RTE_RIB6_GET_NXT_ALL)) != NULL)
> second arg should be &unspec
>> +		num++;
>> +	RTE_TEST_ASSERT(num == 2, "Invalid number of routes\n");
>> +
>> +	num = 0;
>> +	node = NULL;
>> +	while ((node = rte_rib6_get_nxt(rib, 0, 0, node, RTE_RIB6_GET_NXT_ALL_TOP)) != NULL)
> same here

Indeed, good catch. Although for some reason, the test passes :s

>> +static bool
>> +depth_match(struct rte_rib_node *node, uint8_t depth, int flag)
>
> 3d arg enum rte_rib_nxt_mode mode?

Yes, better.

>> @@ -195,7 +203,7 @@ rte_rib_get_nxt(struct rte_rib *rib, uint32_t ip,
>>   			tmp = tmp->parent;
>>   			if (is_valid_node(tmp) &&
>>   					(is_covered(tmp->ip, ip, depth) &&
>> -					(tmp->depth > depth)))
>> +					(depth_match(tmp, depth, mode))))
> extra parenthesis, same for v6

I wanted to stick to the style of the line above which also has an
extraneous parenthesis. I'll remove it.

>> @@ -125,6 +127,8 @@ rte_rib_lookup_exact(struct rte_rib *rib, uint32_t ip, uint8_t depth);
>>    *   get all prefixes from subtrie
>>    *  -RTE_RIB_GET_NXT_COVER
>>    *   get only first more specific prefix even if it have more specifics
>> + *  -RTE_RIB_GET_NXT_ALL_TOP
>> + *   get the top-level exact matching prefix, if any
>
> RTE_RIB_GET_NXT_ALL_TOP is effectively RTE_RIB_GET_NXT_ALL + exact 
> match. Better definition would be something like:
>
> get all prefixes from the subtrie, including the ip/depth prefix itself 
> if present. Top prefix is returned last.

Ack.

-- 
Robin

# Prices subject to change without notice.


  reply	other threads:[~2026-10-02  9:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18  9:59 [PATCH dpdk 0/2] rib: allow iteration to include the top-level route Robin Jarry
2026-05-18  9:59 ` [PATCH dpdk 1/2] rib: rename nxt flag parameter to mode Robin Jarry
2026-09-30 17:12   ` Medvedkin, Vladimir
2026-10-02  9:52     ` Robin Jarry
2026-05-18  9:59 ` [PATCH dpdk 2/2] rib: add mode to include top-level route in traversal Robin Jarry
2026-09-30 17:12   ` Medvedkin, Vladimir
2026-10-02  9:50     ` Robin Jarry [this message]
2026-10-02 10:15 ` [PATCH dpdk v2 0/2] rib: allow iteration to include the top-level route Robin Jarry
2026-10-02 10:15   ` [PATCH dpdk v2 1/2] rib: rename nxt flag parameter to mode Robin Jarry
2026-10-02 10:15   ` [PATCH dpdk v2 2/2] rib: add mode to include top-level route in traversal Robin Jarry

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=DLU9BZ5E8RPF.3NDFT33HJCU0W@redhat.com \
    --to=rjarry@redhat.com \
    --cc=dev@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.