Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: mmyangfl@gmail.com
Cc: 'Simon Horman' <horms@kernel.org>,
	netdev@vger.kernel.org, andrew@lunn.ch, olteanv@gmail.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, jhs@mojatatu.com, jiri@resnulli.us,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/2] net/sched: tbf: add extack to offload params
Date: Tue, 12 May 2026 10:06:02 +0100	[thread overview]
Message-ID: <20260512090601.264199-2-horms@kernel.org> (raw)
In-Reply-To: <20260508065757.2566258-2-mmyangfl@gmail.com>

From: 'Simon Horman' <horms@kernel.org>

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://sashiko.dev
---
net/sched: tbf: add extack to offload params

Drivers might have error messages to propagate to user space. Propagate
the netlink extack so that they can inform user space in a verbal way of
their limitations.

> diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
> index f2340164f579a..4576111fe0758 100644
> --- a/net/sched/sch_tbf.c
> +++ b/net/sched/sch_tbf.c
[ ... ]
> @@ -193,6 +197,7 @@ static void tbf_offload_graft(struct Qdisc *sch, struct Qdisc *new,
>  		.parent		= sch->parent,
>  		.child_handle	= new->handle,
>  		.command	= TC_TBF_GRAFT,
> +		.extack		= extack,
>  	};
>  
>  	qdisc_offload_graft_helper(qdisc_dev(sch), sch, new, old,

Will the driver's extack message be overwritten here?

Looking at qdisc_offload_graft_helper() in net/sched/sch_api.c, if the
driver returns an error and any qdisc is offloaded, it calls
NL_SET_ERR_MSG:

net/sched/sch_api.c:qdisc_offload_graft_helper() {
	err = dev->netdev_ops->ndo_setup_tc(dev, type, type_data);
	...
	if (any_qdisc_is_offloaded)
		NL_SET_ERR_MSG(extack, "Offloading graft operation failed.");
}

Does this unconditionally overwrite the specific error message just set
by the driver, defeating the patch's goal for graft operations?

  reply	other threads:[~2026-05-12  9:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  6:57 [PATCH net-next v3 0/2] net: dsa: yt921x: Add port TBF support David Yang
2026-05-08  6:57 ` [PATCH net-next v3 1/2] net/sched: tbf: add extack to offload params David Yang
2026-05-12  9:06   ` Simon Horman [this message]
2026-05-08  6:57 ` [PATCH net-next v3 2/2] net: dsa: yt921x: Add port TBF support David Yang
2026-05-12  8:56   ` Paolo Abeni
2026-05-12  9:10   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260512090601.264199-2-horms@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox