Re: [PATCH net-next v3 2/2] net: dsa: yt921x: Add port TBF support
From: Paolo Abeni
Date: Tue May 12 2026 - 05:06:37 EST
On 5/8/26 8:57 AM, David Yang wrote:
> @@ -1378,6 +1390,70 @@ yt921x_dsa_port_policer_add(struct dsa_switch *ds, int port,
> return res;
> }
>
> +static int
> +yt921x_dsa_port_setup_tc_tbf_port(struct dsa_switch *ds, int port,
> + const struct tc_tbf_qopt_offload *qopt)
> +{
> + struct yt921x_priv *priv = to_yt921x_priv(ds);
> + struct netlink_ext_ack *extack = qopt->extack;
> + u32 ctrls[2];
> + int res;
> +
> + if (qopt->parent != TC_H_ROOT)
> + return -EOPNOTSUPP;
> +
> + switch (qopt->command) {
> + case TC_TBF_STATS:
> + return 0;
The above makes the stats actually not supported; it should return
-NOPNOTSUPP.
/P