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] [day] [month] [year] [list]
Date:	Tue, 29 Jun 2010 11:15:20 +0200
From:	Stanislaw Gruszka <sgruszka@...hat.com>
To:	Shreyas Bhatewara <sbhatewara@...are.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Amerigo Wang <amwang@...hat.com>
Subject: Re: [PATCH -next] vmxnet3: fail when try to setup unsupported
	features

On Mon, Jun 28, 2010 at 10:45:57AM -0700, Shreyas Bhatewara wrote:
> > +vmxnet3_set_flags(struct net_device *netdev, u32 data)
> > +{
> >  	struct vmxnet3_adapter *adapter = netdev_priv(netdev);
> >  	u8 lro_requested = (data & ETH_FLAG_LRO) == 0 ? 0 : 1;
> >  	u8 lro_present = (netdev->features & NETIF_F_LRO) == 0 ? 0 : 1;
> > 
> > +	if (data & ~ETH_FLAG_LRO)
> > +		return -EOPNOTSUPP;
> > +
> >  	if (lro_requested ^ lro_present) {
> >  		/* toggle the LRO feature*/
> >  		netdev->features ^= NETIF_F_LRO;
> > --
> > 1.5.5.6
> 
> 
> Does not make sense to me. Switching LRO on/off is supported from the driver, why should the function return -EOPNOTSUPP ?

We return EOPNOTSUPP only if someone will try to setup other features
than LRO, if data == ETH_FLAG_LRO we will turn LRO on, and turn it off
when data == 0. 

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