Thread (9 messages) flat view 9 messages, 4 authors, 4d ago
COOLING4d

[PATCH net-next v8 1/3] net/sched: cbs: add extack to struct tc_cbs_qopt_offload

From: Cedric Jehasse via B4 Relay <devnull+cedric.jehasse.luminex.be@kernel.org>
Date: 2026-08-11 11:45:56
Also in: b4-sent, lkml
Subsystem: cbs/etf/taprio qdiscs, networking [general], tc subsystem, the rest · Maintainers: Vinicius Costa Gomes, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jamal Hadi Salim, Jiri Pirko, Linus Torvalds

From: Cedric Jehasse <redacted>

To be able to report reason for rejection when cbs offloading fails.

Signed-off-by: Cedric Jehasse <redacted>
---
 include/net/pkt_sched.h | 1 +
 net/sched/sch_cbs.c     | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 18a419cd9d949..d35c87004c279 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -150,6 +150,7 @@ struct tc_cbs_qopt_offload {
 	s32 locredit;
 	s32 idleslope;
 	s32 sendslope;
+	struct netlink_ext_ack *extack;
 };
 
 struct tc_etf_qopt_offload {
diff --git a/net/sched/sch_cbs.c b/net/sched/sch_cbs.c
index 1c93469c56e3d..87c2eda108c8c 100644
--- a/net/sched/sch_cbs.c
+++ b/net/sched/sch_cbs.c
@@ -307,10 +307,12 @@ static int cbs_enable_offload(struct net_device *dev, struct cbs_sched_data *q,
 	cbs.locredit = opt->locredit;
 	cbs.idleslope = opt->idleslope;
 	cbs.sendslope = opt->sendslope;
+	cbs.extack = extack;
 
 	err = ops->ndo_setup_tc(dev, TC_SETUP_QDISC_CBS, &cbs);
 	if (err < 0) {
-		NL_SET_ERR_MSG(extack, "Specified device failed to setup cbs hardware offload");
+		NL_SET_ERR_MSG_WEAK(extack,
+				    "Specified device failed to setup cbs hardware offload");
 		return err;
 	}
 
-- 
2.43.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help