DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Marc Sune <marc.sune@bisdn.de>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] 答复: Port-ids and NIC features
Date: Thu, 15 Aug 2013 16:31:12 -0700	[thread overview]
Message-ID: <20130815163112.3fa3d9f7@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <520D52E8.9000407@bisdn.de>

On Fri, 16 Aug 2013 00:15:04 +0200
Marc Sune <marc.sune@bisdn.de> wrote:

> Dear Stephen,
> 
> 1) The problem is that, if the interfaces are binded to the IGB_UIO
> driver *before* the DPDK-based application is started, there is no way,
> as far as I've seen, to get such information. Of course, you cannot use
> anymore ethtool or whatever to get at least the speeds that the card is
> supporting. Btw, I don't need them, but offloads would probably be also
> quite useful. So in general all the "features" or "capabilities"
> supported by the NIC.

The hack for now is doing:

		struct rte_eth_dev_info dev_info;
		rte_eth_dev_info_get(portid, &dev_info);

		if (strncmp(dev_info.driver_name, "rte_ixgbe", 9) == 0)
			/* do stuff for 10G */
                else
                        /* do stuff for 1G */

Obviously, the driver_name approach could be generalized to a lookup table.
But it really won't scale when many more drivers are added.
Also since speed is negotiable, code should really wait till link is
up to look at link speed and decide from that.

Since device is totally owned by user driver at this point, it
is perfectly possible to extend the existing drivers to do more PHY interaction
to query/set speed and duplex. The current code just assumes autonegotiation.
Since the Intel drivers are based off of BSD source there still is unused
code to do this (I think).

 

      reply	other threads:[~2013-08-15 23:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  8:56 [dpdk-dev] " Marc Sune
2013-08-15  1:51 ` [dpdk-dev] 答复: " 安宏奎
2013-08-15 14:57   ` Stephen Hemminger
2013-08-15 22:15     ` Marc Sune
2013-08-15 23:31       ` Stephen Hemminger [this message]

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=20130815163112.3fa3d9f7@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=marc.sune@bisdn.de \
    /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).