lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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