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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140610102834.450effd6@nehalam.linuxnetplumber.net>
Date:	Tue, 10 Jun 2014 10:28:34 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Andy Green <andy.green@...aro.org>
Cc:	netdev@...r.kernel.org, Francois Romieu <romieu@...zoreil.com>,
	patches@...aro.org
Subject: Re: [net-next PATCH 2] net: ethernet driver: Fujitsu OGMA

On Tue, 10 Jun 2014 09:08:03 +0800
Andy Green <andy.green@...aro.org> wrote:

> +static int ogma_netdev_change_mtu(struct net_device *net_device, int new_mtu)
> +{
> +	struct ogma_ndev *ndev = netdev_priv(net_device);
> +
> +	if (!ndev->priv->param.use_jumbo_pkt_flag)
> +		return eth_change_mtu(net_device, new_mtu);
> +
> +	if ((new_mtu < 68) || (new_mtu > 9000))
> +		return -EINVAL;
> +
> +	net_device->mtu = new_mtu;
> +
> +	return 0;
> +}
> +

I don't think this works. rx_pkt_buf_len is only set at probe time.

Don't you need to:
 1. Stop device if running
 2. Free existing receive buffers
 3. change rx_pkt_buf_len
 4. Refill restart receiver.

Most devices setup receive ring in open (not probe)
to handle this. It also avoid grabbing memory if device is unused.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ