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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Oct 2011 21:58:01 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Giuseppe CAVALLARO <peppe.cavallaro@...com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	Deepak SIKRI <deepak.sikri@...com>
Subject: Re: [net-next 2/5] stmmac: allow mtu bigger than 1500 in case of
 normal desc (V2).

Le mercredi 12 octobre 2011 à 15:38 +0200, Giuseppe CAVALLARO a écrit :
> This patch allows to set the mtu bigger than 1500
> in case of normal descriptors.
> This is helping some SPEAr customers.
> 
> Signed-off-by: Deepak SIKRI <deepak.sikri@...com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index ba7af2c..de3e536 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1357,17 +1357,17 @@ static void stmmac_set_rx_mode(struct net_device *dev)
>  static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
>  {
>  	struct stmmac_priv *priv = netdev_priv(dev);
> -	int max_mtu;
> +	int max_mtu = ETH_DATA_LEN;

Why are you setting max_mtu to ETH_DATA_LEN here ?

>  
>  	if (netif_running(dev)) {
>  		pr_err("%s: must be stopped to change its MTU\n", dev->name);
>  		return -EBUSY;
>  	}
>  
> -	if (priv->plat->has_gmac)
> +	if (priv->plat->enh_desc)
>  		max_mtu = JUMBO_LEN;
>  	else
> -		max_mtu = ETH_DATA_LEN;
> +		max_mtu = BUF_SIZE_4KiB;

Since later you init to completely different values...



--
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