Skip to content

nexthop: Nexthop dump fixes

Ido Schimmel netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3nexthop: Fix infinite nexthop dump when using maximum nexthop IDnet/ipv4/nexthop.c tools/testing/selftests/net/fib_nexthops.sh+6 -51 replyApplied
2/3nexthop: Make nexthop bucket dump more efficientnet/ipv4/nexthop.c+5 -111 replyApplied
3/3nexthop: Fix infinite nexthop bucket dump when using maximum nexthop IDnet/ipv4/nexthop.c tools/testing/selftests/net/fib_nexthops.sh+6 -51 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDavid AhernPetr Machata
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net 0/3] nexthop: Nexthop dump fixes

Patches #1 and #3 fix two problems related to nexthops and nexthop buckets dump, respectively. Patch #2 is a preparation for the third patch.

The pattern described in these patches of splitting the NLMSG_DONE to a separate response is prevalent in other rtnetlink dump callbacks. I don't know if it's because I'm missing something or if this was done intentionally to ensure the message is delivered to user space. After commit 0642840b8bb0 ("af_netlink: ensure that NLMSG_DONE never fails in dumps") this is no longer necessary and I can improve these dump callbacks assuming this analysis is correct.

No regressions in existing tests:

 # ./fib_nexthops.sh
 [...]
 Tests passed: 230
 Tests failed:   0

Ido Schimmel (3):
nexthop: Fix infinite nexthop dump when using maximum nexthop ID
nexthop: Make nexthop bucket dump more efficient
nexthop: Fix infinite nexthop bucket dump when using maximum nexthop
ID

 net/ipv4/nexthop.c                          | 28 ++++++---------------
 tools/testing/selftests/net/fib_nexthops.sh | 10 ++++++++
 2 files changed, 17 insertions(+), 21 deletions(-)
Signature · 1 line
2.40.1