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: <496658EB.1080206@hp.com>
Date:	Thu, 08 Jan 2009 11:50:03 -0800
From:	Rick Jones <rick.jones2@...com>
To:	Ben Hutchings <bhutchings@...arflare.com>
CC:	Jeff Garzik <jgarzik@...ox.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] Make possible speeds known to ethtool


> 
> I think 0, (u32)(-1) and (u16)(-1) may have to be special-cased as
> unknown, but everything else can be treated as a number of Mbit/s.  I
> don't know what a driver should do about an interface that really runs
> at 65.535 Gbit/s though...

Something along these lines then? (assuming my mailer doesn't fubar this
:( - I normally send matches via mailx)

--- ethtool.c.orig      2008-11-17 11:53:40.000000000 -0800
+++ ethtool.c   2009-01-08 11:41:54.000000000 -0800
@@ -813,23 +813,12 @@ static int dump_ecmd(struct ethtool_cmd

         fprintf(stdout, "       Speed: ");
         switch (ep->speed) {
-       case SPEED_10:
-               fprintf(stdout, "10Mb/s\n");
-               break;
-       case SPEED_100:
-               fprintf(stdout, "100Mb/s\n");
-               break;
-       case SPEED_1000:
-               fprintf(stdout, "1000Mb/s\n");
-               break;
-       case SPEED_2500:
-               fprintf(stdout, "2500Mb/s\n");
-               break;
-       case SPEED_10000:
-               fprintf(stdout, "10000Mb/s\n");
+       case 0:
+       case (u16)(-1):
+               fprintf(stdout, "Unknown! (%i)\n", ep->speed);
                 break;
         default:
-               fprintf(stdout, "Unknown! (%i)\n", ep->speed);
+               fprintf(stdout, "%dMb/s\n", ep->speed);
                 break;
         };

If that looks reasonable I'll post a proper one with the apropriate text and such with mailx...

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