Thread (37 messages) read the whole thread 37 messages, 2 authors, 2021-03-11

Re: [PATCH net-next 03/14] nexthop: Add a dedicated flag for multipath next-hop groups

From: David Ahern <hidden>
Date: 2021-03-11 15:29:38

On 3/10/21 8:02 AM, Petr Machata wrote:
With the introduction of resilient nexthop groups, there will be two types
of multipath groups: the current hash-threshold "mpath" ones, and resilient
groups. Both are multipath, but to determine the fact, the system needs to
consider two flags. This might prove costly in the datapath. Therefore,
introduce a new flag, that should be set for next-hop groups that have more
than one nexthop, and should be considered multipath.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
---

Notes:
    v1 (changes since RFC):
    - This patch is new

 include/net/nexthop.h | 7 ++++---
 net/ipv4/nexthop.c    | 5 ++++-
 2 files changed, 8 insertions(+), 4 deletions(-)
This patch looks good:
Reviewed-by: David Ahern <dsahern@kernel.org>
quoted hunk ↗ jump to hunk
diff --git a/include/net/nexthop.h b/include/net/nexthop.h
index 7bc057aee40b..5062c2c08e2b 100644
--- a/include/net/nexthop.h
+++ b/include/net/nexthop.h
@@ -80,6 +80,7 @@ struct nh_grp_entry {
 struct nh_group {
 	struct nh_group		*spare; /* spare group for removals */
 	u16			num_nh;
+	bool			is_multipath;
 	bool			mpath;

It would be good to rename the existing type 'mpath' to something else.
You have 'resilient' as a group type later, so maybe rename this one to
hash or hash_threshold.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help