Re: Fwd: Re: [RTnet] ioctl: No such device

Jean-Marc Lenoir <[email protected]> Fri, 16 Feb 2018 17:29:42 +0100
Newsgroups gmane.linux.real-time.rtai
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============1303619203197662446==
Content-Type: multipart/alternative;
 boundary="------------254D9BD6D5797C702C67E500"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------254D9BD6D5797C702C67E500
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Thanks for your detailed answer. But after more investigation, I'm=20
almost sure that the driver is not compatible. I've not found the exact=20
reference of my NIC in the sources, and even if I add it manually and=20
recompile the module, it fails to work with my NIC (I can see some=20
errors on dmesg). In addition, rt_igb is based on an old version of igb=20
(released in 2008) so I'm not surprised that it is not compatible with=20
recent hardware.

I also tried your suggestions: unloading the igb module before starting=20
rtnet and see available devices in /proc/rtnet/devices but it's not=20
better: I only see the rtlo (loopback) device. Starting 'rtifconfig=20
rteth0 up 10.0.0.1' doesn't change anything.

Finally, I have chosen to use Xenomai instead of RTAI because it=20
includes a more recent version of rt_igb which is compatible with my=20
NIC: with the configuration I wrote in my first mail I now can see rteth0=
.

Jean-Marc

Le 15/02/2018 =C3=A0 17:40, Mark Fortescue a =C3=A9crit=C2=A0:
> Opps. Hit the wrong reply option so the list got dropped.
>
> -------- Original Message --------
>
> Hi Jean-Marc,
>
> My RTnet installations are somewhat custom made because of driver
> compatibility issues and requirements, but at first glance it looks lik=
e
> you have got something that should work.
>
> See comments below.
>
> On 15/02/18 08:03, Jean-Marc Lenoir wrote:
>> Hi,
>>
>> I know this question is related to RTnet and not RTAI, but it seems
>> there is no RTnet mailing list still active, and maybe someone here al=
so
>> uses RTnet.
>>
>> I've installed RTnet (this version:
>> https://www.rtai.org/userfiles/downloads/RTAICONTRIB/rtai_rtnet.tar.bz=
2)
>> on my RTAI installation I am able to make a loopback network with it (=
I
>> can ping and send/receive UDP requests on 127.0.0.1).
>> Now, I'm trying to configure it to work with my real ethernet
>> connection. Here is my hardware informations:
>> # lspci -vv -n -s 06:00.0
>> 06:00.0 0200: 8086:1533 (rev 03)
>> =C2=A0=C2=A0=C2=A0=C2=A0 Subsystem: 1043:8557
>> =C2=A0=C2=A0=C2=A0=C2=A0 Control: I/O+ Mem+ BusMaster- SpecCycle- MemW=
INV- VGASnoop- ParErr-
>> Stepping- SERR- FastB2B- DisINTx-
>> =C2=A0=C2=A0=C2=A0=C2=A0 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEV=
SEL=3Dfast >TAbort-
>> <TAbort- <MAbort- >SERR- <PERR- INTx-
>> =C2=A0=C2=A0=C2=A0=C2=A0 Interrupt: pin A routed to IRQ 21
>> =C2=A0=C2=A0=C2=A0=C2=A0 Region 0: Memory at f7800000 (32-bit, non-pre=
fetchable) [size=3D512K]
>> =C2=A0=C2=A0=C2=A0=C2=A0 Region 2: I/O ports at b000 [size=3D32]
>> =C2=A0=C2=A0=C2=A0=C2=A0 Region 3: Memory at f7880000 (32-bit, non-pre=
fetchable) [size=3D16K]
>> =C2=A0=C2=A0=C2=A0=C2=A0 Capabilities: <access denied>
>> =C2=A0=C2=A0=C2=A0=C2=A0 Kernel modules: igb
>>
>
> Based in the info above, you should be able to use the rt_igb diver.
>
>> I have configured the file /usr/rtnet/etc/rtnet.conf with the followin=
g
>> informations:
>> RT_DRIVER=3D"rt_igb"
>> RT_DRIVER_OPTIONS=3D""
>> REBIND_RT_NICS=3D"0000:06:00.0"
>
> The REBIND_RT_NICS option is not one I am familiar with. It does not
> exist in my version of RTnet (0.9.12).
>
>>
>> The Linux driver is igb, so the RTnet driver should be rt_igb. I also
>> defined REBIND_RT_NICS to be sure the network device is detached from
>> Linux and attached to RTAI when creating the RT network.
>>
>> When I start the RT network (/usr/rtnet/sbin/rtnet start), I have the
>> following output:
>> sh: echo: I/O error
>> ioctl: No such device
>> ioctl: No such device
>> ioctl: No such device
>> ioctl: No such device
>> ioctl (add): No such device
>> ioctl (add): No such device
>> ioctl (add): No such device
>> vnic0: ERROR while getting interface flags: No such device
>> SIOCSIFADDR: No such device
>> vnic0: ERROR while getting interface flags: No such device
>> Waiting for all slaves...ioctl: No such device
>> ioctl: No such device
>>
>> I also have this dmesg information:
>> [ 2625.256031]
>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 *** RTnet 0.9.14 - built on 2018-02-14 16:16:18 ***
>>
>> [ 2625.256035] RTnet: initialising real-time networking
>> [ 2625.257853] Intel(R) Gigabit Ethernet Network Driver - version
>> 1.2.45-k2-rtnet
>> [ 2625.257855] Copyright (c) 2008 Intel Corporation.
>> [ 2625.258103] igb 0000:06:00.0: removed PHC on enp6s0
>> [ 2625.457791] initializing loopback...
>> [ 2625.457803] RTnet: registered rtlo
>> [ 2625.459352] RTcfg: init real-time configuration distribution protoc=
ol
>> [ 2625.460107] RTmac: init realtime media access control
>> [ 2625.460808] RTmac/TDMA: init time division multiple access control
>> mechanism
>>
>
> There is no evidence that the RTnet driver found any usable hardware.
>
> I would first ensure that the Linux igb driver module does not get
> installed (if it is not a module then rebuild the kernel so that it is)=
.
> This will avoid any Linux/RTnet driver clashes that will hide any real
> issues.
>
> The RTnet driver should show up in /proc/rtnet so make sure the /proc
> interface is working and present so that you can identify the RTnet
> device has found usable hardware.
>
> If you are unable to find any rteth0 interface in /proc/rtnet then you
> will need to resort to adding 'printk()' statements in the RT IGB drive=
r
> to find out why it is not detecting the hardware.
>
>> And when I start rtifconfig, I only see the loopback network.
>>
>
> rtifconfig may not show devices that are not configured.
>
> Check /proc/rtnet to ensure that the rteth0 interface is present and if
> it is then use 'rtifconfig rteth0 up 192.168.1.1' to bring the interfac=
e
> up (substitute the correct IP address if known). It should now be
> visible when using rtifconfig.
>
> If this works then you should be able to ping the real time interface
> from any host connected to the real time network (the connected host
> does not need to be a real time host. It can be any host with a
> correctly configured IP address so that is is on the same IP network).
> You should also be able to use rtping to ping the connected host from
> your real time host however you may need to set up real time IP routing=
.
>
> Regards
> =C2=A0=C2=A0=C2=A0=C2=A0Mark.
>
>> Does someone have an idea? I also tried to use all other Intel drivers
>> without success. Do I need to had a driver option? Does my device is
>> simply not supported at all?
>>
>> Thanks,
>> Jean-Marc
>>
>> _______________________________________________
>> Rtai mailing list
>> [email protected]
>> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
>
>
> _______________________________________________
> Rtai mailing list
> [email protected]
> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai


--------------254D9BD6D5797C702C67E500
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf=
-8">
  </head>
  <body text=3D"#000000" bgcolor=3D"#FFFFFF">
    Thanks for your detailed answer. But after more investigation, I'm
    almost sure that the driver is not compatible. I've not found the
    exact reference of my NIC in the sources, and even if I add it
    manually and recompile the module, it fails to work with my NIC (I
    can see some errors on dmesg). In addition, rt_igb is based on an
    old version of igb (released in 2008) so I'm not surprised that it
    is not compatible with recent hardware.<br>
    <br>
    I also tried your suggestions: unloading the igb module before
    starting rtnet and see available devices in /proc/rtnet/devices but
    it's not better: I only see the rtlo (loopback) device. Starting
    'rtifconfig rteth0 up 10.0.0.1' doesn't change anything.<br>
    <br>
    Finally, I have chosen to use Xenomai instead of RTAI because it
    includes a more recent version of rt_igb which is compatible with my
    NIC: with the configuration I wrote in my first mail I now can see
    rteth0.<br>
    <br>
    Jean-Marc<br>
    <br>
    <div class=3D"moz-cite-prefix">Le 15/02/2018 =C3=A0 17:40, Mark Forte=
scue a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:[email protected]">Opps. Hit
      the wrong reply option so the list got dropped. <br>
      <br>
      -------- Original Message -------- <br>
      <br>
      Hi Jean-Marc, <br>
      <br>
      My RTnet installations are somewhat custom made because of driver
      <br>
      compatibility issues and requirements, but at first glance it
      looks like <br>
      you have got something that should work. <br>
      <br>
      See comments below. <br>
      <br>
      On 15/02/18 08:03, Jean-Marc Lenoir wrote: <br>
      <blockquote type=3D"cite">Hi, <br>
        <br>
        I know this question is related to RTnet and not RTAI, but it
        seems <br>
        there is no RTnet mailing list still active, and maybe someone
        here also <br>
        uses RTnet. <br>
        <br>
        I've installed RTnet (this version: <br>
        <a class=3D"moz-txt-link-freetext"
href=3D"https://www.rtai.org/userfiles/downloads/RTAICONTRIB/rtai_rtnet.t=
ar.bz2">https://www.rtai.org/userfiles/downloads/RTAICONTRIB/rtai_rtnet.t=
ar.bz2</a>)
        <br>
        on my RTAI installation I am able to make a loopback network
        with it (I <br>
        can ping and send/receive UDP requests on 127.0.0.1). <br>
        Now, I'm trying to configure it to work with my real ethernet <br=
>
        connection. Here is my hardware informations: <br>
        # lspci -vv -n -s 06:00.0 <br>
        06:00.0 0200: 8086:1533 (rev 03) <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Subsystem: 1043:8557 <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Control: I/O+ Mem+ BusMaster- SpecCycle-=
 MemWINV- VGASnoop-
        ParErr- <br>
        Stepping- SERR- FastB2B- DisINTx- <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Status: Cap+ 66MHz- UDF- FastB2B- ParErr=
- DEVSEL=3Dfast
        &gt;TAbort- <br>
        &lt;TAbort- &lt;MAbort- &gt;SERR- &lt;PERR- INTx- <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Interrupt: pin A routed to IRQ 21 <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Region 0: Memory at f7800000 (32-bit, no=
n-prefetchable)
        [size=3D512K] <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Region 2: I/O ports at b000 [size=3D32] =
<br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Region 3: Memory at f7880000 (32-bit, no=
n-prefetchable)
        [size=3D16K] <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Capabilities: &lt;access denied&gt; <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 Kernel modules: igb <br>
        <br>
      </blockquote>
      <br>
      Based in the info above, you should be able to use the rt_igb
      diver. <br>
      <br>
      <blockquote type=3D"cite">I have configured the file
        /usr/rtnet/etc/rtnet.conf with the following <br>
        informations: <br>
        RT_DRIVER=3D"rt_igb" <br>
        RT_DRIVER_OPTIONS=3D"" <br>
        REBIND_RT_NICS=3D"0000:06:00.0" <br>
      </blockquote>
      <br>
      The REBIND_RT_NICS option is not one I am familiar with. It does
      not <br>
      exist in my version of RTnet (0.9.12). <br>
      <br>
      <blockquote type=3D"cite"> <br>
        The Linux driver is igb, so the RTnet driver should be rt_igb. I
        also <br>
        defined REBIND_RT_NICS to be sure the network device is detached
        from <br>
        Linux and attached to RTAI when creating the RT network. <br>
        <br>
        When I start the RT network (/usr/rtnet/sbin/rtnet start), I
        have the <br>
        following output: <br>
        sh: echo: I/O error <br>
        ioctl: No such device <br>
        ioctl: No such device <br>
        ioctl: No such device <br>
        ioctl: No such device <br>
        ioctl (add): No such device <br>
        ioctl (add): No such device <br>
        ioctl (add): No such device <br>
        vnic0: ERROR while getting interface flags: No such device <br>
        SIOCSIFADDR: No such device <br>
        vnic0: ERROR while getting interface flags: No such device <br>
        Waiting for all slaves...ioctl: No such device <br>
        ioctl: No such device <br>
        <br>
        I also have this dmesg information: <br>
        [ 2625.256031] <br>
        =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 *** RTnet 0.9.14 - built on 2018-02-14 16:16:18
        *** <br>
        <br>
        [ 2625.256035] RTnet: initialising real-time networking <br>
        [ 2625.257853] Intel(R) Gigabit Ethernet Network Driver -
        version <br>
        1.2.45-k2-rtnet <br>
        [ 2625.257855] Copyright (c) 2008 Intel Corporation. <br>
        [ 2625.258103] igb 0000:06:00.0: removed PHC on enp6s0 <br>
        [ 2625.457791] initializing loopback... <br>
        [ 2625.457803] RTnet: registered rtlo <br>
        [ 2625.459352] RTcfg: init real-time configuration distribution
        protocol <br>
        [ 2625.460107] RTmac: init realtime media access control <br>
        [ 2625.460808] RTmac/TDMA: init time division multiple access
        control <br>
        mechanism <br>
        <br>
      </blockquote>
      <br>
      There is no evidence that the RTnet driver found any usable
      hardware. <br>
      <br>
      I would first ensure that the Linux igb driver module does not get
      <br>
      installed (if it is not a module then rebuild the kernel so that
      it is). <br>
      This will avoid any Linux/RTnet driver clashes that will hide any
      real <br>
      issues. <br>
      <br>
      The RTnet driver should show up in /proc/rtnet so make sure the
      /proc <br>
      interface is working and present so that you can identify the
      RTnet <br>
      device has found usable hardware. <br>
      <br>
      If you are unable to find any rteth0 interface in /proc/rtnet then
      you <br>
      will need to resort to adding 'printk()' statements in the RT IGB
      driver <br>
      to find out why it is not detecting the hardware. <br>
      <br>
      <blockquote type=3D"cite">And when I start rtifconfig, I only see
        the loopback network. <br>
        <br>
      </blockquote>
      <br>
      rtifconfig may not show devices that are not configured. <br>
      <br>
      Check /proc/rtnet to ensure that the rteth0 interface is present
      and if <br>
      it is then use 'rtifconfig rteth0 up 192.168.1.1' to bring the
      interface <br>
      up (substitute the correct IP address if known). It should now be
      <br>
      visible when using rtifconfig. <br>
      <br>
      If this works then you should be able to ping the real time
      interface <br>
      from any host connected to the real time network (the connected
      host <br>
      does not need to be a real time host. It can be any host with a <br=
>
      correctly configured IP address so that is is on the same IP
      network). <br>
      You should also be able to use rtping to ping the connected host
      from <br>
      your real time host however you may need to set up real time IP
      routing. <br>
      <br>
      Regards <br>
      =C2=A0=C2=A0=C2=A0=C2=A0Mark. <br>
      <br>
      <blockquote type=3D"cite">Does someone have an idea? I also tried t=
o
        use all other Intel drivers <br>
        without success. Do I need to had a driver option? Does my
        device is <br>
        simply not supported at all? <br>
        <br>
        Thanks, <br>
        Jean-Marc <br>
        <br>
        _______________________________________________ <br>
        Rtai mailing list <br>
        <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:[email protected]=
g">[email protected]</a>
        <br>
        <a class=3D"moz-txt-link-freetext"
          href=3D"https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai">ht=
tps://mail.rtai.org/cgi-bin/mailman/listinfo/rtai</a>
        <br>
      </blockquote>
      <br>
      <br>
      _______________________________________________ <br>
      Rtai mailing list <br>
      <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:[email protected]"=
>[email protected]</a>
      <br>
      <a class=3D"moz-txt-link-freetext"
        href=3D"https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai">http=
s://mail.rtai.org/cgi-bin/mailman/listinfo/rtai</a>
      <br>
    </blockquote>
    <br>
  </body>
</html>

--------------254D9BD6D5797C702C67E500--

--===============1303619203197662446==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Rtai mailing list
[email protected]
https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
--===============1303619203197662446==--