$ make -C tools/testing/selftests/ TARGETS=drivers/net/virtio_net/ run_tests
>
> Run it on a system with 2 virtio_net devices connected back-to-back
> on the hypervisor.
>
> Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
i Pirko
Reviewed-by: Petr Machata
>
> Note that user overrides this either by passing netdevice names on the
> command line or by declaring NETIFS array in custom forwarding.config
> configuration file.
>
> Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
Jiri Pirko writes:
> From: Jiri Pirko
>
> This check can be done at the very beginning of the script.
> As the follow up patch needs to add early code that needs to be executed
> after the check, move it.
>
> Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
gt; +
> +initial_ping_test()
> +{
> + cleanup
All these cleanup() calls will end up possibly triggering
PAUSE_ON_CLEANUP. Not sure that's intended.
> + setup_prepare
> + ping_test $h1 $H2_IPV4 " simple"
> +}
Other than this nit, LGTM.
Reviewed-by: Petr Machata
Petr Machata writes:
> Jiri Pirko writes:
>
>> +# Whether to find netdevice according to the specified driver.
>> +: "${NETIF_FIND_DRIVER:=}"
>
> This would be better placed up there in the Topology description
> section. Together with NETIFS and NETIF_NO_
Jiri Pirko writes:
> From: Jiri Pirko
>
> The existing setup_wait*() helper family check the status of the
> interface to be up. Introduce wait_for_dev() to wait for the netdevice
> to appear, for example after test script does manual device bind.
>
> Signed-off-by: Jiri Pirko
> ---
> v1->v2:
Jiri Pirko writes:
> From: Jiri Pirko
>
> Add a helper to be used to check if the netdevice is backed by specified
> driver.
>
> Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
Jiri Pirko writes:
> From: Jiri Pirko
>
> Allow driver tests to work without specifying the netdevice names.
> Introduce a possibility to search for available netdevices according to
> set driver name. Allow test to specify the name by setting
> NETIF_FIND_DRIVER variable.
>
> Note that user o
to two cases: a new qdisc allocation and a change of existing
qdisc. (Note that the change also includes what TC formally calls replace,
if the qdisc kind is the same.)
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 115
There was a bug introduced during the rework which cause non-zero backlog
being stuck at ETS. Introduce a selftest that would have caught the issue
earlier.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
tools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh | 7 +++
1 file
mlxsw used to hold an array of qdiscs indexed by the TC number. In the
previous patch, it was changed to allocate child qdiscs dynamically, and
they are now indexed by band number. Follow suit with the array of future
FIFOs.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../net
will guard accesses to the qdisc state.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 89 +++
1 file changed, 73 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
b/drivers
qdisc, and just point root_qdiscs's
children to this array. Following patches will make the allocation dynamic.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 164 +-
1 file changed, 118 insertions(+), 46 deletion
tclass_num is just a number, a value that would be ordinarily passed around
as an int. (Which is unlike a u8 prio_bitmap.) In several places,
tclass_num already is an int. Convert the remaining instances.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
drivers/net/ethernet/mellanox
-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 48 +++
1 file changed, 18 insertions(+), 30 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
index
have different types. Even
when replacing one qdisc with another in the same class, Linux will not
permit handle reuse unless the qdisc type also matches.
Simplify the function by omitting these two unnecessary conditions.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
The function mlxsw_sp_qdisc_compare() is invoked a couple lines above this
check, which will bounce any requests where this condition does not hold.
Therefore drop it.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 5 +
1
The mlxsw_sp_qdisc argument is not used in any of the actual callbacks.
Drop it.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/ethernet
management assumes only one qdisc is created at a time. In FIFO
handlers, this condition was enforced simply by asserting RTNL lock. But
instead of furthering this RTNL dependence, patch #7 converts the whole
qdisc offload logic to a per-port mutex.
- Patch #10 adds a selftest.
Petr Machata (10
Jamal Hadi Salim writes:
> On 2021-04-09 7:03 a.m., Petr Machata wrote:
>> Jamal Hadi Salim writes:
>>
>>> I am concerned about adding new opcodes which only make sense if you
>>> offload (or make sense only if you are running in s/w).
>>>
&g
Jamal Hadi Salim writes:
> I am concerned about adding new opcodes which only make sense if you
> offload (or make sense only if you are running in s/w).
>
> Those opcodes are intended to be generic abstractions so the dispatcher
> can decide what to do next. Adding things that are specific onl
Test that trap_fwd'd packets show up under the correct trap.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../drivers/net/mlxsw/devlink_trap_control.sh | 23 ---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/driver
Test that trapped packets are forwarded through the SW datapath, whereas
trap_fwd'd ones are not (but are forwarded through HW datapath). For
completeness' sake, also test that "pass" (i.e. lack of trapping) simply
forwards the packets in the HW datapath.
Signed-off-by: Petr
add a new generic action, trap_fwd. In the software pipeline,
it is equivalent to an OK. When offloading, it should forward the packet to
the host, but unlike trap it should not drop the packet.
Signed-off-by: Petr Machata
Reviewed-by: Jiri Pirko
Reviewed-by: Ido Schimmel
---
include/uapi/linux
with offload_fwd_mark and offload_l3_fwd_mark
to prevent second forwarding in the SW datapath.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../mellanox/mlxsw/core_acl_flex_actions.c| 23 +++
.../net/ethernet/mellanox/mlxsw/spectrum.h| 1 +
.../ethernet/mellanox/mlx
In the following patch, attempts to change the next/goto of a flexible
action set from goto to next will be rejected for action sets that contain
a trap_fwd action. Propagate extack to make it possible to communicate the
issue to the user.
Signed-off-by: Petr Machata
Reviewed-by: Jiri Pirko
and #7 add selftests.
Petr Machata (7):
net: sched: Add a trap-and-forward action
net: sched: Make the action trap_fwd offloadable
devlink: Add a new trap for the trap_fwd action
mlxsw: Propagate extack to mlxsw_afa_block_commit()
mlxsw: Offload trap_fwd
selftests: forwarding: Add a
Add a new trap so that drivers can report packets forwarded due to the
trap_fwd action correctly.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Documentation/networking/devlink/devlink-trap.rst | 4
include/net/devlink.h | 3 +++
net/core/devlink.c
Add the new flow action and related support so that drivers can offload the
trap_fwd action.
Signed-off-by: Petr Machata
Reviewed-by: Jiri Pirko
Reviewed-by: Ido Schimmel
---
include/net/flow_offload.h | 1 +
include/net/tc_act/tc_gact.h | 5 +
net/sched/cls_api.c | 2 ++
3
Add a document describing the principles behind resilient next-hop groups,
and some notes about how to configure and offload them.
Suggested-by: David Ahern
Signed-off-by: Petr Machata
Reviewed-by: David Ahern
---
Notes:
v1 (from an RFC shared privately):
- Dropped a reference to a
.
- The flag for resilient groups is nh_grp_entry::resilient.
Functions that assume this have "res" in the name.
Besides the above, struct nh_grp_entry::mpath was renamed to ::hthr as
well.
UAPI artifacts were obviously left intact.
Suggested-by: David Ahern
Signed-off-by:
ets": 8,
"idle_timer": 120,
"unbalanced_timer": 0
},
"flags": [ ]
} ]
Signed-off-by: Ido Schimmel
Signed-off-by: Petr Machata
---
ip/ipnexthop.c| 144 +-
man/man8/ip-nex
id 10 index 5 idle_time 81 nhid 1
# ip -j -p nexthop bucket get id 10 index 5
[ {
"id": 10,
"bucket": {
"index": 5,
"idle_time": 104.89,
"nhid": 1
},
"flags": [
NH ID extraction is a common operation, and will become more common still
with the resilient NH groups support. Add a helper that does what it
usually done and returns the parsed NH ID.
Signed-off-by: Petr Machata
---
ip/ipnexthop.c | 25 +
1 file changed, 13 insertions
nexthop add id 10 group 1/2/3 type mpath
Signed-off-by: Ido Schimmel
Signed-off-by: Petr Machata
---
Notes:
v2:
- Add a missing example command to commit message
- Mention in the man page that mpath is the default
ip/ipnexthop.c| 32 ++
Add a helper to dump a timeval. Print by first converting to double and
then dispatching to print_color_float().
Signed-off-by: Petr Machata
---
Notes:
v4:
- Make print_tv() take a const*.
include/json_print.h | 1 +
lib/json_print.c | 13 +
2 files changed, 14
ntion in the man page that mpath is the default
Ido Schimmel (3):
nexthop: Add ability to specify group type
nexthop: Add support for resilient nexthop groups
nexthop: Add support for nexthop buckets
Petr Machata (3):
nexthop: Synchronize uAPI files
json_print: Add print_tv()
ne
Signed-off-by: Petr Machata
---
include/uapi/linux/nexthop.h | 47 +-
include/uapi/linux/rtnetlink.h | 7 +
2 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h
index b0a5613905ef
Stephen Hemminger writes:
>> +_PRINT_FUNC(tv, struct timeval *)
>
> This
>
> Make it const please?
OK
: Tim Rice
Signed-off-by: Petr Machata
---
ip/ip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ip/ip.c b/ip/ip.c
index 40d2998ae60b..2d7d0d327734 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -155,6 +155,7 @@ static int batch(const char *name)
return EXIT_FAILURE;
}
+
David Ahern writes:
>> Git bisect pinpoints this commit:
>> https://github.com/shemminger/iproute2/commit/1d9a81b8c9f30f9f4abeb875998262f61bf10577
>>
>
> Petr, can you take a look at this regression?
Yes, see elsewhere in the thread:
https://marc.info/?l=linux-netdev&m=161589291608081&w=
Thanks for the report. Would you be able to test with the following
patch?
https://github.com/pmachata/iproute2/commit/a12eeca9caf90b3ebe24bc121819d506c9072a34.patch
I believe it fixes the issue.
id 10 index 5 idle_time 81 nhid 1
# ip -j -p nexthop bucket get id 10 index 5
[ {
"id": 10,
"bucket": {
"index": 5,
"idle_time": 104.89,
"nhid": 1
},
"flags": [
ets": 8,
"idle_timer": 120,
"unbalanced_timer": 0
},
"flags": [ ]
} ]
Signed-off-by: Ido Schimmel
Signed-off-by: Petr Machata
---
ip/ipnexthop.c| 144 +-
man/man8/ip-nex
NH ID extraction is a common operation, and will become more common still
with the resilient NH groups support. Add a helper that does what it
usually done and returns the parsed NH ID.
Signed-off-by: Petr Machata
---
ip/ipnexthop.c | 25 +
1 file changed, 13 insertions
nexthop add id 10 group 1/2/3 type mpath
Signed-off-by: Ido Schimmel
Signed-off-by: Petr Machata
---
Notes:
v2:
- Add a missing example command to commit message
- Mention in the man page that mpath is the default
ip/ipnexthop.c| 32 ++
Add a helper to dump a timeval. Print by first converting to double and
then dispatching to print_color_float().
Signed-off-by: Petr Machata
---
include/json_print.h | 1 +
lib/json_print.c | 13 +
2 files changed, 14 insertions(+)
diff --git a/include/json_print.h b/include
Signed-off-by: Petr Machata
---
include/uapi/linux/nexthop.h | 47 +-
include/uapi/linux/rtnetlink.h | 7 +
2 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h
index b0a5613905ef
Ido Schimmel (3):
nexthop: Add ability to specify group type
nexthop: Add support for resilient nexthop groups
nexthop: Add support for nexthop buckets
Petr Machata (3):
nexthop: Synchronize uAPI files
json_print: Add print_tv()
nexthop: Extract a helper to parse a NH ID
include/json_pr
Petr Machata writes:
> Signed-off-by: Ido Schimmel
And I managed to forget my S-o-b :-/
From: Ido Schimmel
Add ability to dump multiple nexthop buckets and get a specific one.
Example:
# ip nexthop add id 10 group 1/2 type resilient buckets 8
# ip nexthop
id 1 via 192.0.2.2 dev dummy10 scope link
id 2 via 192.0.2.19 dev dummy20 scope link
id 10 group 1/2 type resilient buckets
From: Ido Schimmel
Add ability to configure resilient nexthop groups and show their current
configuration. Example:
# ip nexthop add id 10 group 1/2 type resilient buckets 8
# ip nexthop show id 10
id 10 group 1/2 type resilient buckets 8 idle_timer 120 unbalanced_timer 0
# ip -j -p nexthop
From: Ido Schimmel
Next patches are going to add a 'resilient' nexthop group type, so allow
users to specify the type using the 'type' argument. Currently, only
'mpath' type is supported.
These two commands are equivalent:
# ip nexthop add id 10 group 1/2/3
# ip nexthop add id 10 group 1/2/3
NH ID extraction is a common operation, and will become more common still
with the resilient NH groups support. Add a helper that does what it
usually done and returns the parsed NH ID.
Signed-off-by: Petr Machata
---
ip/ipnexthop.c | 25 +
1 file changed, 13 insertions
Signed-off-by: Petr Machata
---
include/uapi/linux/nexthop.h | 47 +-
include/uapi/linux/rtnetlink.h | 7 +
2 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h
index b0a5613905ef
Add a helper to dump a timeval. Print by first converting to double and
then dispatching to print_color_float().
Signed-off-by: Petr Machata
---
include/json_print.h | 1 +
lib/json_print.c | 13 +
2 files changed, 14 insertions(+)
diff --git a/include/json_print.h b/include
ability to specify group type
nexthop: Add support for resilient nexthop groups
nexthop: Add support for nexthop buckets
Petr Machata (3):
nexthop: Synchronize uAPI files
json_print: Add print_tv()
nexthop: Extract a helper to parse a NH ID
include/json_print.h | 1 +
include
Petr Machata writes:
> Roi Dayan writes:
>
>> --- a/dcb/dcb_app.c
>> +++ b/dcb/dcb_app.c
>> @@ -65,8 +65,7 @@ static void dcb_app_table_fini(struct dcb_app_table *tab)
>>
>> static int dcb_app_table_push(struct dcb_app_table *tab, struct dcb_app
>>
David Ahern writes:
> On 3/12/21 10:23 AM, Petr Machata wrote:
>> From: Petr Machata
>>
>> From: Ido Schimmel
>
> All of the patches have the above. If Ido is the author and you are
> sending, AIUI you add your Signed-off-by below his.
Sorry about that, tha
From: Petr Machata
From: Petr Machata
NH ID extraction is a common operation, and will become more common still
with the resilient NH groups support. Add a helper that does what it
usually done and returns the parsed NH ID.
Signed-off-by: Petr Machata
---
ip/ipnexthop.c | 25
From: Petr Machata
From: Ido Schimmel
Add ability to dump multiple nexthop buckets and get a specific one.
Example:
# ip nexthop add id 10 group 1/2 type resilient buckets 8
# ip nexthop
id 1 via 192.0.2.2 dev dummy10 scope link
id 2 via 192.0.2.19 dev dummy20 scope link
id 10 group 1/2
From: Petr Machata
From: Ido Schimmel
Add ability to configure resilient nexthop groups and show their current
configuration. Example:
# ip nexthop add id 10 group 1/2 type resilient buckets 8
# ip nexthop show id 10
id 10 group 1/2 type resilient buckets 8 idle_timer 120 unbalanced_timer
From: Petr Machata
From: Ido Schimmel
Signed-off-by: Petr Machata
---
include/uapi/linux/nexthop.h | 47 +-
include/uapi/linux/rtnetlink.h | 7 +
2 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/nexthop.h b/include/uapi
From: Petr Machata
From: Ido Schimmel
Next patches are going to add a 'resilient' nexthop group type, so allow
users to specify the type using the 'type' argument. Currently, only
'mpath' type is supported.
These two command are equivalent:
Signed-off-by: Ido
support for nexthop buckets
Petr Machata (2):
json_print: Add print_tv()
nexthop: Extract a helper to parse a NH ID
include/json_print.h | 1 +
include/libnetlink.h | 3 +
include/uapi/linux/nexthop.h | 47 +++-
include/uapi/linux/rtnetlink.h | 7 +
ip/ip_common.h
From: Petr Machata
From: Petr Machata
Add a helper to dump a timeval. Print by first converting to double and
then dispatching to print_color_float().
Signed-off-by: Petr Machata
---
include/json_print.h | 1 +
lib/json_print.c | 13 +
2 files changed, 14 insertions
From: Ido Schimmel
Test various aspects of the resilient nexthop group offload API on top
of the netdevsim implementation. Both good and bad flows are tested.
Signed-off-by: Ido Schimmel
Co-developed-by: Petr Machata
Signed-off-by: Petr Machata
---
.../drivers/net/netdevsim/nexthop.sh
From: Ido Schimmel
Add a resilient nexthop objects version of gre_multipath_nh.sh. Test
that both IPv4 and IPv6 overlays work with resilient nexthop groups
where the nexthops are two GRE tunnels.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Signed-off-by: Petr Machata
---
.../net
TEST: Nexthop group updated after replace - nECMP [ OK ]
TEST: Nexthop buckets updated after replace - nECMP [ OK ]
Tests passed: 8
Tests failed: 0
Signed-off-by: Ido Schimmel
Co-developed-by: Petr Machata
Signed-off-by: Petr Machata
---
tools/testing/selftests
weights (1:1) are used.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Signed-off-by: Petr Machata
---
.../net/forwarding/router_mpath_nh_res.sh | 400 ++
1 file changed, 400 insertions(+)
create mode 100755
tools/testing/selftests/net/forwarding
/netdevsim10/fib/fail_res_nexthop_group_replace
Y
This enables testing of various error paths.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Signed-off-by: Petr Machata
---
drivers/net/netdevsim/fib.c | 55 +
1 file changed, 55 insertions(+)
diff --git a/drive
Machata
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/fib_nexthops.sh | 30 ++---
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/fib_nexthops.sh
b/tools/testing/selftests/net/fib_nexthops.sh
index 91226ac50112..c840aa88ff18
From: Ido Schimmel
Instead of calling nexthop_set_hw_flags(), call a helper. It will be
used to also set nexthop bucket flags in a subsequent patch.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Signed-off-by: Petr Machata
---
drivers/net/netdevsim/fib.c | 13 ++---
1 file
Currently netdevsim relies on RTNL to maintain exclusivity in accessing the
nexthop hash table. However, bucket notification may be called without RTNL
having been held. Instead, introduce a custom lock to guard the table.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
drivers/net
nexthop group 10 as active.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Signed-off-by: Petr Machata
---
drivers/net/netdevsim/fib.c | 61 +
1 file changed, 61 insertions(+)
diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib
offload
API
Petr Machata (1):
netdevsim: fib: Introduce a lock to guard nexthop hashtable
drivers/net/netdevsim/fib.c | 139 +++-
.../drivers/net/netdevsim/nexthop.sh | 620 ++
tools/testing/selftests/net/fib_nexthops.sh | 549
[ OK ]
Tests passed: 1
Tests failed: 0
# ./fib_nexthops.sh -t ipv6_torture
IPv6 runtime torture
TEST: IPv6 torture test [ OK ]
Tests passed: 1
Tests failed: 0
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
S
Now that all the code is in place, stop rejecting requests to create
resilient next-hop groups.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
net/ipv4/nexthop.c | 4
1 file changed, 4 deletions(-)
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
Nexthop replacements et.al. are notified through netlink, but if a delayed
work migrates buckets on the background, userspace will stay oblivious.
Notify these as RTM_NEWNEXTHOPBUCKET events.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
Notes:
v1
Allow getting (but not setting) individual buckets to inspect the next hop
mapped therein, idle time, and flags.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
Notes:
v1 (changes since RFC):
- u32 -> u16 for bucket counts / indices
net/i
Implement the netlink messages that allow creation and dumping of resilient
nexthop groups.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
Notes:
v1 (changes since RFC):
- u32 -> u16 for bucket counts / indices
net/ipv4/nexthop.c |
hardware.
Add a function that can be periodically called by device drivers to
report activity on nexthop buckets after querying it from the underlying
device.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Reviewed-by: David Ahern
Signed-off-by: Petr Machata
---
Notes:
v1 (changes
Add a dump handler for resilient next hop buckets. When next-hop group ID
is given, it walks buckets of that group, otherwise it walks buckets of all
groups. It then dumps the buckets whose next hops match the given filtering
criteria.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
From: Ido Schimmel
Add data structures that will be used for in-kernel notifications about
addition / deletion of a resilient nexthop group and about changes to a
hash bucket within a resilient group.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Reviewed-by: David Ahern
Signed-off
type for now.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
Reviewed-by: David Ahern
Signed-off-by: Petr Machata
---
Notes:
v2:
- Comment at NEXTHOP_GRP_TYPE_MPATH that it's for the hash-threshold
groups.
v1 (changes since RFC):
- u32 -> u16 for bucke
the
transaction back. This notification allows the driver to take a look and
veto the new proposed group up front, before anything is committed.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
Notes:
v1 (changes since RFC):
- u32 -> u16 for buc
es not handle
notifications towards drivers, which are kept as if the group were an mpath
one. It does not handle netlink either. The only bit currently exposed to
user space is the new next-hop group type, and that is currently bounced.
There is therefore no way to actually access this code.
Sign
From: Ido Schimmel
Add a function that can be called by device drivers to set "offload" or
"trap" indication on nexthop buckets following nexthop notifications and
other changes such as a neighbour becoming invalid.
Signed-off-by: Ido Schimmel
Reviewed-by: Petr Machata
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
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
Notes:
v1 (changes since RFC):
- This patch is new
include/net
function to its callers to make it possible to use a
different synchronization guarantee.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
net/ipv4/nexthop.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/ipv4/nexthop.c b
replacement, propagate `cfg'
to replace_nexthop() and further to replace_nexthop_grp().
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
Reviewed-by: David Ahern
---
net/ipv4/nexthop.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/nexthop.c b/net
for resilient NH groups
nexthop: Add data structures for resilient group notifications
nexthop: Allow setting "offload" and "trap" indication of nexthop
buckets
nexthop: Allow reporting activity of nexthop buckets
Petr Machata (10):
nexthop: Pass nh_config to replace_n
David Ahern writes:
> When you get to the end of the sets, it would be good to submit
> documentation for resilient multipath under Documentation/networking
All right.
David Ahern writes:
> On 3/11/21 8:39 AM, Petr Machata wrote:
>>
>> David Ahern writes:
>>
>>>> diff --git a/include/net/nexthop.h b/include/net/nexthop.h
>>>> index 7bc057aee40b..5062c2c08e2b 100644
>>>> --- a/include/net/nexth
David Ahern writes:
> On 3/11/21 8:45 AM, Petr Machata wrote:
>>
>> David Ahern writes:
>>
>>> On 3/10/21 8:02 AM, Petr Machata wrote:
>>>> diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h
>>>> index 2d4a1e784
David Ahern writes:
> On 3/10/21 8:02 AM, Petr Machata wrote:
>> diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h
>> index 2d4a1e784cf0..8efebf3cb9c7 100644
>> --- a/include/uapi/linux/nexthop.h
>> +++ b/include/uapi/linux/nexthop.h
David Ahern writes:
>> 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; /*
Now that all the code is in place, stop rejecting requests to create
resilient next-hop groups.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
net/ipv4/nexthop.c | 4
1 file changed, 4 deletions(-)
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 015a47e8163a
Implement the netlink messages that allow creation and dumping of resilient
nexthop groups.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Notes:
v1 (changes since RFC):
- u32 -> u16 for bucket counts / indices
net/ipv4/nexthop.c |
1 - 100 of 735 matches
Mail list logo