Thread (11 messages) flat view 11 messages, 4 authors, 2012-06-27

RE: [PATCH] net: added support for 40GbE link.

From: Ben Hutchings <hidden>
Date: 2012-06-19 14:11:40

On Tue, 2012-06-19 at 07:42 +0000, Parav.Pandit@Emulex.Com wrote:
quoted
-----Original Message-----
From: David Miller [mailto:davem@davemloft.net]
Sent: Tuesday, June 19, 2012 1:05 PM
To: Pandit, Parav
Cc: bhutchings@solarflare.com; netdev@vger.kernel.org
Subject: Re: [PATCH] net: added support for 40GbE link.

From: <redacted>
Date: Tue, 19 Jun 2012 07:33:12 +0000
quoted
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.
quoted
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help