public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: netdev <netdev@vger.kernel.org>
Cc: e1000-devel list <e1000-devel@lists.sourceforge.net>
Subject: Should we report bus width/speed via ethtool?
Date: Wed, 05 Dec 2012 13:35:01 -0800	[thread overview]
Message-ID: <50BFBE05.7020408@candelatech.com> (raw)

It seems the only way to get the current pci-e bus speed & width
in ixgbe (and probably many other NICs) is by parsing output
of lspci -vvv.

I'd personally find it easier if this info were available via
ethtool API.

Any opinions on adding this info?  I was thinking something like:

struct ethtool_bus_speed {
   u32 cur_speed; /* millions of transactions per sec, or Mhz for older PCI busses */
   u32 cur_width; /* bus width */

   /* Maximum values supported by NIC */
   u32 max_speed;
   u32 max_width;

   #define BELOW_OPTIMAL_SPEED 0x1  /* Set if NIC cannot run at max speed with current bus settings */
   u32 flags;

   /* Plenty of space to grow, set to zero until defined */
   u32 reserved[32];
};

This could also fit in the reserved space of the
struct ethtool_drvinfo if that were preferred (and
width and flags could be a u16 to save a bit of space
in that case).

Any opinions...or suggestions for other interesting bits to add?

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

             reply	other threads:[~2012-12-05 21:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 21:35 Ben Greear [this message]
2012-12-05 22:36 ` Should we report bus width/speed via ethtool? David Miller
2012-12-05 23:09   ` Ben Greear
2012-12-06  0:01     ` David Miller
2012-12-06  0:08       ` Rick Jones
2012-12-06  0:20       ` Brice Goglin
2012-12-06  0:44         ` Ben Greear
2012-12-06  2:06 ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BFBE05.7020408@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox