[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181206141404.3f6f2ebe@xeon-e3>
Date: Thu, 6 Dec 2018 14:14:04 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [PATCH net-next 2/2] net: dsa: Set the master device's MTU to
account for DSA overheads
On Thu, 6 Dec 2018 11:36:05 +0100
Andrew Lunn <andrew@...n.ch> 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.
Powered by blists - more mailing lists