l2fwd: Requested device 0000:02:00.0 cannot be used (Ubuntu 22.04, DPDK 22.07, N5095, I225-V)
David Marchand
david.marchand at redhat.com
Tue Oct 4 08:49:47 CEST 2022
On Tue, Oct 4, 2022 at 8:33 AM F32 <feng32 at 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
More information about the users
mailing list