DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Get interface speed through IOCTL
@ 2016-06-22 12:19 Gadre Nayan
  2016-06-22 12:31 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Gadre Nayan @ 2016-06-22 12:19 UTC (permalink / raw)
  To: users

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-users] Get interface speed through IOCTL
  2016-06-22 12:19 [dpdk-users] Get interface speed through IOCTL Gadre Nayan
@ 2016-06-22 12:31 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-06-22 12:31 UTC (permalink / raw)
  To: Gadre Nayan; +Cc: users, dev, ferruh.yigit, remy.horton

2016-06-22 17:49, Gadre Nayan:
> I need to get the interface speed though standard IOCTL call:
[...]
> 
> However, for 10G interface I do not read a correct speed, since it may
> not be supported.

Yes

> Out 1G cards are I350 and 10G card is I40.
[...]
> 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 ?

You are talking about KNI which has some old ethtool support for
some igb and ixgbe NICs.
My opinion is that we should drop this ethtool support which do not
compile everywhere and has a very limited support.

If you want to get the speed information, you have several other ways
to explore:
	- communicating with the DPDK application
	- make a secondary application process
	- add the feature in the secondary process app/proc_info
	- use examples/ethtool (and check if it can be promoted in lib/)
	- implement a kernel module upstream

If you just need to get the speed info, I feel app/proc_info would be
a good idea.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-22 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-22 12:19 [dpdk-users] Get interface speed through IOCTL Gadre Nayan
2016-06-22 12:31 ` Thomas Monjalon

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