Subject: Re: [PATCH net-next 1/2] net/sched: sch_htb: use extack on errors messages

From: Jakub Kicinski <[email-masked]>
Date: Fri, 14 Apr 2023 18:13:45 -0700

On Fri, 14 Apr 2023 15:53:09 -0300 Pedro Tammela wrote:
> @@ -1917,8 +1917,9 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
>  			};
>  			err = htb_offload(dev, &offload_opt);
>  			if (err) {
> -				pr_err("htb: TC_HTB_LEAF_ALLOC_QUEUE failed with err = %d\n",
> -				       err);
> +				NL_SET_ERR_MSG_FMT_MOD(extack,

What's the ruling on using _MOD() in qdiscs ?
There are some extacks already in this file without _MOD().

> +						       "TC_HTB_LEAF_ALLOC_QUEUE failed with err = %d\n",
> +						       err);

The formatting of an error into the message is unnecessary duplication.
The error value does not make it to dmesg so we need to print it there,
but it's already present at the netlink level.