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.