DPDK usage discussions
 help / color / mirror / Atom feed
From: F32  <feng32@163.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: users@dpdk.org
Subject: Re:Re: l2fwd: Requested device 0000:02:00.0 cannot be used (Ubuntu 22.04, DPDK 22.07, N5095, I225-V)
Date: Wed, 21 Sep 2022 19:51:20 +0800 (CST)	[thread overview]
Message-ID: <5e2cb89b.6d5b.1835fe36090.Coremail.feng32@163.com> (raw)
In-Reply-To: <20220920081625.2a307107@hermes.local>

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]

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.


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.

At 2022-09-20 23:16:25, "Stephen Hemminger" <stephen@networkplumber.org> wrote:
>On Tue, 20 Sep 2022 19:04:57 +0800 (CST)
>F32  <feng32@163.com> wrote:
>
>> Hi Stephen,
>> 
>> 
>> I have checked related iommu_groups:
>> 
>> 
>> $ readlink 0000\:01\:00.0/iommu_group
>> 
>> ../../../../kernel/iommu_groups/16
>> 
>> $ readlink 0000\:02\:00.0/iommu_group
>> 
>> ../../../../kernel/iommu_groups/17
>> 
>> $ readlink 0000\:03\:00.0/iommu_group
>> 
>> ../../../../kernel/iommu_groups/18
>> 
>> $ readlink 0000\:04\:00.0/iommu_group
>> 
>> ../../../../kernel/iommu_groups/19
>> 
>> $ readlink 0000\:05\:00.0/iommu_group
>> 
>> ../../../../kernel/iommu_groups/20
>> 
>> 
>> 
>> It seems that the adapters belongs to different iommu_groups.
>
>The way I would fix it is add instrumentation (ie printf) in EAL
>code where the can not be used message is and work backwards from there.

[-- Attachment #2: Type: text/html, Size: 3252 bytes --]

  reply	other threads:[~2022-10-04  6:33 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 [this message]
2022-10-04  6:49         ` David Marchand

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=5e2cb89b.6d5b.1835fe36090.Coremail.feng32@163.com \
    --to=feng32@163.com \
    --cc=stephen@networkplumber.org \
    --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).