Skip to content

Conversation

@christophefontaine
Copy link
Collaborator

When an interface is removed, associated next hop remains with an unknown interface id:

grout# show ip6 nexthop
VRF IP MAC IFACE QUEUE AGE STATE
0 fe80::d2f0:cff:feba:a411 d2:f0:0c:ba:a4:11 gmztio1 0 - reachable static local link
0 fe80::d2f0:cff:feba:a412 d2:f0:0c:ba:a4:12 gmztio2 0 - reachable static local link
0 fd00:ba4:1::1 d2:f0:0c:ba:a4:11 gmztio1 0 - reachable static local link
0 fd00:ba4:2::1 d2:f0:0c:ba:a4:12 gmztio2 0 - reachable static local link
0 fe80::d0ad:caff:feca:a401 d2:ad:ca:ca:a4:01 gmztio1 0 3 reachable
0 fe80::d0ad:caff:feca:a401 d2:ad:ca:ca:a4:01 gmztio2 0 3 reachable

--> remove interfaces gmztio1 and gmztio2

grout# show ip6 nexthop
VRF IP MAC IFACE QUEUE AGE STATE
0 fe80::d0ad:caff:feca:a401 d2:ad:ca:ca:a4:01 1 0 6 reachable
0 fe80::d0ad:caff:feca:a401 d2:ad:ca:ca:a4:01 3 0 6 reachable
0 fd00:ba4:1::2 d2:ad:ca:ca:a4:01 1 0 2 reachable
0 fd00:ba4:2::2 d2:ad:ca:ca:a4:01 3 0 2 reachable

Then, when an other interface is added, we may abort in modules/ip6/control/nexthop.c:58
if (remote->iface_id != nh->iface_id)
ABORT(IP6_F " nexthop lookup gives wrong interface", &ip);

This can be reproduced by running the test smoke/ip6_forward_test.sh several times on the same grout instance.

To avoid this situation, cleanup the nexthops associated to the interface on removal.

When an interface is removed, associated next hop remains with
an unknown interface id:

grout# show ip6 nexthop
VRF  IP                         MAC                IFACE    QUEUE  AGE   STATE
0    fe80::d2f0:cff:feba:a411   d2:f0:0c:ba:a4:11  gmztio1  0      -     reachable static local link
0    fe80::d2f0:cff:feba:a412   d2:f0:0c:ba:a4:12  gmztio2  0      -     reachable static local link
0    fd00:ba4:1::1              d2:f0:0c:ba:a4:11  gmztio1  0      -     reachable static local link
0    fd00:ba4:2::1              d2:f0:0c:ba:a4:12  gmztio2  0      -     reachable static local link
0    fe80::d0ad:caff:feca:a401  d2:ad:ca:ca:a4:01  gmztio1  0      3     reachable
0    fe80::d0ad:caff:feca:a401  d2:ad:ca:ca:a4:01  gmztio2  0      3     reachable

--> remove interfaces gmztio1 and gmztio2

grout# show ip6 nexthop
VRF  IP                         MAC                IFACE  QUEUE  AGE   STATE
0    fe80::d0ad:caff:feca:a401  d2:ad:ca:ca:a4:01  1      0      6     reachable
0    fe80::d0ad:caff:feca:a401  d2:ad:ca:ca:a4:01  3      0      6     reachable
0    fd00:ba4:1::2              d2:ad:ca:ca:a4:01  1      0      2     reachable
0    fd00:ba4:2::2              d2:ad:ca:ca:a4:01  3      0      2     reachable

Then, when an other interface is added, we may abort in modules/ip6/control/nexthop.c:58
    if (remote->iface_id != nh->iface_id)
        ABORT(IP6_F " nexthop lookup gives wrong interface", &ip);

This can be reproduced by running the test smoke/ip6_forward_test.sh
several times on the same grout instance.

To avoid this situation, cleanup the nexthops associated to the
interface on removal.

Signed-off-by: Christophe Fontaine <[email protected]>
@christophefontaine christophefontaine marked this pull request as ready for review June 20, 2025 08:27
@rjarry rjarry merged commit 42fdb71 into DPDK:main Jun 20, 2025
8 of 9 checks passed
@christophefontaine christophefontaine deleted the nh_cleanup branch November 18, 2025 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants