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]
Date:	Tue, 2 Nov 2010 01:59:52 +0100
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	Ben Hutchings <bhutchings@...arflare.com>
Cc:	netdev@...r.kernel.org, e1000-devel@...ts.sourceforge.net,
	Steve Glendinning <steve.glendinning@...c.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Rasesh Mody <rmody@...cade.com>,
	Debashis Dutt <ddutt@...cade.com>,
	Kristoffer Glembo <kristoffer@...sler.com>,
	linux-driver@...gic.com, linux-net-drivers@...arflare.com
Subject: Re: [PATCH 2/4] Ethtool: convert get_sg/set_sg calls to
	hw_features flag

On Mon, Nov 01, 2010 at 09:15:50PM +0000, Ben Hutchings wrote:
> On Sat, 2010-10-30 at 06:28 +0200, Michał Mirosław wrote:
> [...]
> > @@ -1088,7 +1076,19 @@ static int __ethtool_set_sg(struct net_device *dev, u32 data)
> >  		if (err)
> >  			return err;
> >  	}
> > -	return dev->ethtool_ops->set_sg(dev, data);
> > +
> > +	if (dev->ethtool_ops->hw_set_sg) {
> > +		err = dev->ethtool_ops->hw_set_sg(dev, data);
> > +		if (err)
> > +			return min(err, 0);
> > +	}
> > +
> > +	if (data)
> > +		dev->features |= NETIF_F_SG;
> > +	else
> > +		dev->features &= ~NETIF_F_SG;
> > +
> > +	return 0;
> >  }
> [...]
> 
> The odd semantics of positive return values really need to be documented
> - both in the commit message and in the comment on struct ethtool_ops.

Will do.

Best Regards,
Michał Mirosław 
--
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