Commit 51ad834688 for frr

commit 51ad834688060ef3d9d0749bc6050c655990cd93
Author: Bastien CHANOT <b.chanot@alphalink.fr>
Date:   Wed Nov 4 11:19:53 2026 +0100

    zebra: do not query the speed of PPP interfaces

    A PPP interface has no link speed: the ethtool request zebra sends for
    each new interface only fails, after waiting on rtnl_lock behind the
    kernel's own PPP setup and teardown. During a burst of PPP sessions
    (a BRAS reconnecting its subscribers) this means one blocking request
    per session, plus the periodic retries scheduled for each of them.

    The request is also sent by name. accel-ppp renames each pppN as soon
    as it is created, so the asynchronous request usually reaches the
    kernel after the rename and fails with ENODEV. Since commit 9d0c3ff988
    that failure is only logged at debug level, but the request and its
    retries are still sent for nothing.

    Skip PPP interfaces in dplane_intf_speed_get(), the one entry point of
    the asynchronous request, and in the synchronous read done for links
    learnt at startup. The link type is now set before the first speed
    query of a new interface, so that the check sees it.

    Signed-off-by: Bastien CHANOT <b.chanot@alphalink.fr>

diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 767607c298..7c16d630e7 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -1489,7 +1489,8 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup, void *ar

 		vrf_id_t ifp_vrf_id = vrf_is_backend_netns() ? ns_id : vrf_id;

-		if (startup) {
+		/* A PPP link has no speed, see dplane_intf_speed_get() */
+		if (startup && ifi->ifi_type != ARPHRD_PPP) {
 			speed = netlink_get_interface_speed(zebra_ns_lookup(ifp_vrf_id), name,
 							    &speed_err, NULL);
 			if (speed_err == 0) {
diff --git a/zebra/interface.c b/zebra/interface.c
index 78e1a92b0e..ad4d7b99ce 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -2128,6 +2128,7 @@ static void zebra_if_dplane_ifp_handling(struct zebra_dplane_ctx *ctx)
 			/* Update interface information. */
 			set_ifindex(ifp, ifindex, zns);
 			ifp->flags = flags;
+			ifp->ll_type = dplane_ctx_get_ifp_zltype(ctx);
 			if_update_state_mtu(ifp, mtu);
 			if_update_state_mtu6(ifp, mtu);
 			if_update_state_metric(ifp, 0);
@@ -2161,7 +2162,6 @@ static void zebra_if_dplane_ifp_handling(struct zebra_dplane_ctx *ctx)
 			/* Update link. */
 			zebra_if_update_link(ifp, link_ifindex, link_nsid);

-			ifp->ll_type = dplane_ctx_get_ifp_zltype(ctx);
 			interface_update_hw_addr(ctx, ifp);

 			/* Update interface type */
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index bd77732d40..e80cd8d270 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -6231,6 +6231,13 @@ enum zebra_dplane_result dplane_intf_speed_get(const struct interface *ifp)
 	struct zebra_ns *zns;
 	int ret;

+	/*
+	 * A PPP link has no speed to read: the ethtool request would only
+	 * wait on rtnl_lock, and fail if the link is renamed meanwhile.
+	 */
+	if (ifp->ll_type == ZEBRA_LLT_PPP)
+		return ZEBRA_DPLANE_REQUEST_SUCCESS;
+
 	ctx = dplane_ctx_alloc();

 	ctx->zd_op = DPLANE_OP_INTF_SPEED_GET;