DPDK usage discussions
 help / color / mirror / Atom feed
From: Gadre Nayan <gadrenayan@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] Get interface speed through IOCTL
Date: Wed, 22 Jun 2016 17:49:53 +0530	[thread overview]
Message-ID: <CAKJ7aR43jj2Vhs4Bhswg0-js30K5B1NeWThvnnoQ_UHEh1jBtg@mail.gmail.com> (raw)

Hi,

I need to get the interface speed though standard IOCTL call:

         edata.cmd = ETHTOOL_GSET;
         // issue ioctl
         rc = ioctl(sock, SIOCETHTOOL, &ifr);

However, for 10G interface I do not read a correct speed, since it may
not be supported.

Out 1G cards are I350 and 10G card is I40.

After going through the source, I cam across the function

igb_get_settings()
{
    ecmd->supported = (SUPPORTED_10baseT_Half| ...| .... );

    switch(adapter->link_speed) {
                 case SPEED_1000:
                 case SPEED_2500:
                  //etc etc.
    }

}

There is no support for 10000base. So to get the ioctl working for 10G
card, is it a trivial change of adding few more support options and
adding another case SPEED_10000 clause, or is it more involved ?

Thanks

             reply	other threads:[~2016-06-22 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 12:19 Gadre Nayan [this message]
2016-06-22 12:31 ` Thomas Monjalon

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=CAKJ7aR43jj2Vhs4Bhswg0-js30K5B1NeWThvnnoQ_UHEh1jBtg@mail.gmail.com \
    --to=gadrenayan@gmail.com \
    --cc=users@dpdk.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;
as well as URLs for NNTP newsgroup(s).