Subject: Re: [PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

From: Stephen Hemminger <[email-masked]>
Date: Thu, 6 Dec 2018 14:14:04 -0800

On Thu,  6 Dec 2018 11:36:05 +0100
Andrew Lunn <[email-masked]> wrote:

> +void dsa_master_set_mtu(struct net_device *dev, struct dsa_port *cpu_dp)
> +{
> +	unsigned int mtu = ETH_DATA_LEN + cpu_dp->tag_ops->overhead;
> +	int err;
> +
> +	rtnl_lock();
> +	if (mtu <= dev->max_mtu) {
> +		err = dev_set_mtu(dev, mtu);
> +		if (err)
> +			netdev_dbg(dev, "Unable to set MTU to include for DSA overheads\n");
> +	}
> +	rtnl_unlock();
> +}
> +

You don't need the debug message. Use err_ack instead?

Debug messages are usually disabled in most distributions.