]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/sched: prefer existing extack message in qdisc_offload_graft_helper()
authorDavid Yang <mmyangfl@gmail.com>
Thu, 21 May 2026 01:03:05 +0000 (09:03 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 23 May 2026 00:23:37 +0000 (17:23 -0700)
Use NL_SET_ERR_MSG_WEAK so any existing error message (probably from the
underlying driver) is used instead of the generic fallback.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://patch.msgid.link/20260521010320.208138-2-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/sch_api.c

index 3c779e5098efd6602ec4efb0abadb8dac21c4b44..8a3236456db4734e88404ea85504838c8c8dd4ad 100644 (file)
@@ -859,7 +859,7 @@ void qdisc_offload_graft_helper(struct net_device *dev, struct Qdisc *sch,
        any_qdisc_is_offloaded |= old && old->flags & TCQ_F_OFFLOADED;
 
        if (any_qdisc_is_offloaded)
-               NL_SET_ERR_MSG(extack, "Offloading graft operation failed.");
+               NL_SET_ERR_MSG_WEAK(extack, "Offloading graft operation failed.");
 }
 EXPORT_SYMBOL(qdisc_offload_graft_helper);