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: <1340115094.2692.10.camel@bwh-desktop.uk.solarflarecom.com>
Date:	Tue, 19 Jun 2012 15:11:34 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	<Parav.Pandit@...lex.Com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: RE: [PATCH] net: added support for 40GbE link.

On Tue, 2012-06-19 at 07:42 +0000, Parav.Pandit@...lex.Com wrote:
> > -----Original Message-----
> > From: David Miller [mailto:davem@...emloft.net]
> > Sent: Tuesday, June 19, 2012 1:05 PM
> > To: Pandit, Parav
> > Cc: bhutchings@...arflare.com; netdev@...r.kernel.org
> > Subject: Re: [PATCH] net: added support for 40GbE link.
> > 
> > From: <Parav.Pandit@...lex.Com>
> > Date: Tue, 19 Jun 2012 07:33:12 +0000
> > 
> > > Should eventually all net driver should remove using SPEED_xxxxxx and
> > start using hard coded value of 10, 100, 1000, 20000?
> > 
> > No, the ones that exist can stay, just no new ones.
> > 
> So driver which supports 40Gpbs, 100Gbps should hardcode to 40000, 100000 respectively?

Right.

> > > That means ethtool_cmd_speed() should not be called in this function?
> > 
> > Ben said that it must be called, what are you talking about?
> 
> Sorry, I wanted to ask - Do you need switch case for speed like below new code or its should be speed independent code?
>                 switch (ethtool_cmd_speed()) {
>                 case SPEED_100:
>                 case SPEED_10:
>                         return DEFAULT_PRB_RETIRE_TOV;
>                 default:
>                         msec = 1;
>                         div = ethtool_cmd_speed() / 1000;
>                         break;
>                 /*
>                 }

I was thinking of something like:

		u64 speed = ethtool_cmd_speed(&ecmd);
		if (speed < 1000 || speed == SPEED_UNKNOWN)
			return DEFAULT_PRB_RETIRE_TOV;
		msec = 1;
		div = speed / 1000;

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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