DPDK usage discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: F32 <feng32@163.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	users@dpdk.org,  "Guo, Junfeng" <junfeng.guo@intel.com>,
	simei <simei.su@intel.com>,
	 "Mah, Yock Gen" <yock.gen.mah@intel.com>,
	samuel.taripin@intel.com
Subject: Re: Re: l2fwd: Requested device 0000:02:00.0 cannot be used (Ubuntu 22.04, DPDK 22.07, N5095, I225-V)
Date: Tue, 4 Oct 2022 08:49:47 +0200	[thread overview]
Message-ID: <CAJFAV8yrOSjoG4Z__UZvSoUPnKQs1vMpkoTOfj+0GCA7oKKrYg@mail.gmail.com> (raw)
In-Reply-To: <5e2cb89b.6d5b.1835fe36090.Coremail.feng32@163.com>

On Tue, Oct 4, 2022 at 8:33 AM F32 <feng32@163.com> wrote:
>
> Thanks for the suggestion.
>
> I took half an hour to add debug logs layer by layer and finally I came to igc_init_phy_params_i225 in drivers/net/igc/base/igc_i225.c.
>
> There is a piece of code that looks like this in the function:
>
> > /* Verify phy id and set remaining function pointers */
> > switch (phy->id) {
> > case I225_I_PHY_ID:
> > case I226_LM_PHY_ID:
> >     phy->type = igc_phy_i225;
> >     phy->ops.set_d0_lplu_state = igc_set_d0_lplu_state_i225;
> >     phy->ops.set_d3_lplu_state = igc_set_d3_lplu_state_i225;
> >     /* TODO - complete with GPY PHY information */
> >     break;
> > default:
> >     ret_val = -IGC_ERR_PHY;
> >     goto out;
> > }
>
> The supported I225 model is I225_I with PHY_ID 0x67C9DC00, but the adapters on my Mini-PC are I225_V with PHY_ID 0x67C9DCC0.
> After adding the case l2fwd is now working.

A recent change in this area of the driver got merged in next-net-intel.
c493e5ee25fe ("net/igc: remove unncessary PHY ID checking")

Cc: igc maintainers and authors of the change

>
> BTW, I noticed that there are so many different cases (in different source files) which might generate the "Requested device xxx cannot be used" error. Introducing a standard error code may be hellpful for ordinary dpdk users, but it requires lots of work.

I don't see how this is feasible to standardize error codes that would
help here.
The less awful is to get debug log messages, which is the driver responsibility.


-- 
David Marchand


      reply	other threads:[~2022-10-04  6:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  3:18 F32
2022-09-16 15:10 ` Stephen Hemminger
2022-09-20 11:04   ` F32
2022-09-20 15:16     ` Stephen Hemminger
2022-09-21 11:51       ` F32
2022-10-04  6:49         ` David Marchand [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=CAJFAV8yrOSjoG4Z__UZvSoUPnKQs1vMpkoTOfj+0GCA7oKKrYg@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=feng32@163.com \
    --cc=junfeng.guo@intel.com \
    --cc=samuel.taripin@intel.com \
    --cc=simei.su@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    --cc=yock.gen.mah@intel.com \
    /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).