All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] rtnet issue with xenomai-3.git next branch
@ 2014-12-16 23:29 Jeff Webb
  2014-12-17 10:29 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 21+ messages in thread
From: Jeff Webb @ 2014-12-16 23:29 UTC (permalink / raw)
  To: Xenomai

I am testing the rtnet functionality in the 'next' branch of xenomai-3.git.  (I now also have Xenomai-2.6.4/rtnet.git running on the same machine for comparison.)  I am able to bring up the real-time interface (rt_e1000e) and use rtping as expected. As mentioned before, I have a primary non-rt ethernet interface running simultaneously (using the e1000e driver).   When I try to remove all the rtnet modules, I am unable to remove rtnet and rtipv4:

$ rmmod rtipv4 rtnet
rmmod: ERROR: Module rtipv4 is in use
rmmod: ERROR: Module rtnet is in use by: rtipv4

The messages are the same if I try to remove them individually.  This behavior does not occur with Xenomai-2.6.4/rtnet.git.

I also have issues when I try to load the rtudp and/or rtpacket modules:

$ sudo modprobe rtnet
$  sudo modprobe rtipv4
$ sudo modprobe rtpacket
modprobe: ERROR: could not insert 'rtpacket': Invalid argument
$ sudo modprobe rtudp
modprobe: ERROR: could not insert 'rtudp': Invalid argument

I thought that this triggered an I-pipe trace in the past, but I can't reproduce that at the moment.  The 'Invalid argument' error code is coming from rtdm_dev_register, right?

A superficial test of the "latency" program seems to run fine on this hardware/software configuration.

Here are some more details:

Hardware: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
Linux: release 3.14.17

   $ cat /proc/cmdline
   BOOT_IMAGE=/boot/vmlinuz-3.14.17-xenomai-3.git.2014.11.27 root=UUID=3ec85b09-cb5d-42fe-bec7-106935ecf29d ro biosdevname=0

Xenomai: from git://git.xenomai.org/xenomai-3.git next

   $ version
   Xenomai/cobalt v3.0-rc2 -- #7a81ea8 (2014-11-27 22:02:32 +0100)

   $ xeno-config --info|grep -i build
   Build args: --prefix=/usr --includedir=/usr/include/xenomai --mandir=/usr/share/man --with-testdir=/usr/lib/xenomai/testsuite --build x86_64-linux-gnu build_alias=x86_64-linux-gnu

OS: Ubuntu 14.04

Any help resolving these issues would be appreciated.

Thanks,

-Jeff


^ permalink raw reply	[flat|nested] 21+ messages in thread
[parent not found: <CAB6vvjn7=j2LpfwVhVAQBPcYiK6a-owoCaFXqY00+JnU2jGm9A@mail.gmail.com>]
* Re: [Xenomai] rtnet issue with xenomai-3.git next branch
@ 2015-02-24 10:39 Antoine Hoarau
  2015-02-24 12:00 ` Antoine Hoarau
  2015-02-24 12:50 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 21+ messages in thread
From: Antoine Hoarau @ 2015-02-24 10:39 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai

> Please stay on the list.
My bad.
>Ok, maybe a consequence of the udp module bug. Please try again with
>the patch applied, and if you still get the bug, we will investigate
>further. Please try and enable frame pointers so as to get more
>meaningful stack traces.
I tried the patch, rtudp is now correctly loaded, but et rtnet start, the
system hangs, and I can't print/see any kernel debug...



Le Tue Feb 24 2015 at 10:35:38 AM, Gilles Chanteperdrix <
gilles.chanteperdrix@xenomai.org> a écrit :

On Mon, Feb 23, 2015 at 06:13:39PM +0000, Antoine Hoarau wrote:
> > I'm actually not able to test it, but maybe this is a different problem.
> > Here's my script :
> >
> > cd /usr/xenomai/sbin/
> > sudo ./rtifconfig rteth0 down
> > sudo rmmod rtipv4
> > sudo rmmod rt_e1000e
> > sudo rmmod rtnet
> > sudo mknod /dev/rtnet c 10 240
> > sudo ./rtnet start # 1)
> > sudo ./rtifconfig rteth0 up 192.168.100.101 netmask 255.255.255.0 # 2)
> > sudo ./rtroute solicit 192.168.100.102 dev rteth0
> > sudo ./rtifconfig # 4)
> > sudo ./rtroute # 5)
> > sudo ./rtping 192.168.100.102 # Stalls
> >
> > 1) FATAL: Error inserting rtudp (/lib/modules/3.16.0-xenomai-
> > 3rc3/kernel/drivers/xenomai/net/stack/ipv4/udp/rtudp.ko): Invalid
> argument
>
> Please try the following patch:
> diff --git a/kernel/drivers/net/stack/ipv4/tcp/tcp.c
> b/kernel/drivers/net/stack/ipv4/tcp/tcp.c
> index d6a7b7d..607bdbe 100644
> --- a/kernel/drivers/net/stack/ipv4/tcp/tcp.c
> +++ b/kernel/drivers/net/stack/ipv4/tcp/tcp.c
> @@ -2118,6 +2118,7 @@ static struct rtdm_driver tcp_driver = {
>                                         RTDM_CLASS_NETWORK,
>                                         RTDM_SUBCLASS_RTNET,
>                                         RTNET_RTDM_VER),
> +    .device_count =     1,
>      .device_flags =     RTDM_PROTOCOL_DEVICE,
>      .context_size =     sizeof(struct tcp_socket),
>
> diff --git a/kernel/drivers/net/stack/ipv4/udp/udp.c
> b/kernel/drivers/net/stack/ipv4/udp/udp.c
> index 3966e54..538712a 100644
> --- a/kernel/drivers/net/stack/ipv4/udp/udp.c
> +++ b/kernel/drivers/net/stack/ipv4/udp/udp.c
> @@ -707,6 +707,7 @@ static struct rtdm_driver udp_driver = {
>                                          RTDM_SUBCLASS_RTNET,
>                                          RTNET_RTDM_VER),
>      .device_flags =     RTDM_PROTOCOL_DEVICE,
> +    .device_count =     1,
>      .context_size =     sizeof(struct rtsocket),
>
>      .protocol_family =  PF_INET,
>
>
> >
> > dmesg :
> >
> > [  146.895062] *** RTnet for Xenomai v3.0-rc3 ***
> > [  146.895062]
> > [  146.895064] RTnet: initialising real-time networking
> > [  146.897459] rt_e1000e: Intel(R) PRO/1000 Network Driver - 1.5.1-k-rt
> > [  146.897461] rt_e1000e: Copyright(c) 1999 - 2011 Intel Corporation.
> > [  146.897475] rt_e1000e 0000:05:00.0: Disabling ASPM L0s
> > [  146.897674] rt_e1000e 0000:05:00.0: irq 47 for MSI/MSI-X
> > [  146.897677] rt_e1000e 0000:05:00.0: irq 48 for MSI/MSI-X
> > [  146.897679] rt_e1000e 0000:05:00.0: irq 49 for MSI/MSI-X
> > [  147.008138] RTnet: registered rteth0
> > [  147.008141] rt_e1000e: (PCI Express:2.5GT/s:Width x1)
> 68:05:ca:32:c9:ab
> > [  147.008142] rt_e1000e: Intel(R) PRO/1000 Network Connection
> > [  147.008153] rt_e1000e: MAC: 3, PHY: 8, PBA No: E46981-008
> >
> > 2) dmesg:
> > [  308.518107] RTnet: dropping packet in rtnetif_rx()
> > [  308.519118] RTnet: dropping packet in rtnetif_rx()
> > [  308.520108] RTnet: dropping packet in rtnetif_rx()
> > [  308.521119] RTnet: dropping packet in rtnetif_rx()
> > [  308.522109] RTnet: dropping packet in rtnetif_rx()
> > [  308.523119] RTnet: dropping packet in rtnetif_rx()
> >
> >
> > 3)
> > rteth0    Medium: Ethernet  Hardware address: 68:05:CA:32:C9:AB
> >           IP address: 192.168.100.101  Broadcast address: 192.168.100.255
> >           UP BROADCAST RUNNING  MTU: 1500
> >
> > 4)
> > Host Routing Table
> > Hash Destination HW Address Device
> > 26 192.168.100.102 90:E2:BA:26:72:15 rteth0
> > 3F 192.168.100.255 FF:FF:FF:FF:FF:FF rteth0
> >
> > The rtnet.conf :
> >
> > RT_DRIVER="rt_e1000e"
> > REBIND_RT_NICS=""
> > IPADDR="192.168.100.101"
> > NETMASK="255.255.255.0"
> > RT_LOOPBACK="yes"
> > RT_PROTOCOLS="udp packet"
> > RTCAP="no"
> > TDMA_MODE="master"
> > TDMA_SLAVES="" # this worked in rtnet 0.9.13+xeno 2.4.3
> >
> > Thank you for your help,
> >
> > Antoine
> >
> > EDIT : I just saw there's a kernel bug occuring, please find attached the
> > log
>
> Ok, maybe a consequence of the udp module bug. Please try again with
> the patch applied, and if you still get the bug, we will investigate
> further. Please try and enable frame pointers so as to get more
> meaningful stack traces.
>
> Please stay on the list.
>
> --
>                                             Gilles.
>

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [Xenomai] rtnet issue with xenomai-3.git next branch
@ 2015-02-25 10:23 Antoine Hoarau
  2015-02-25 10:26 ` Antoine Hoarau
  2015-02-25 10:36 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 21+ messages in thread
From: Antoine Hoarau @ 2015-02-25 10:23 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai

This works:
modprobe rtnet
modprobe rt_e1000e
modprobe rtipv4
modprobe rtudp

I get :

[  282.200776] *** RTnet for Xenomai v3.0-rc3 ***
[  282.200776]
[  282.200778] RTnet: initialising real-time networking
[  289.201612] rt_e1000e: Intel(R) PRO/1000 Network Driver - 1.5.1-k-rt
[  289.201614] rt_e1000e: Copyright(c) 1999 - 2011 Intel Corporation.
[  289.201630] rt_e1000e 0000:05:00.0: Disabling ASPM L0s
[  289.201842] rt_e1000e 0000:05:00.0: irq 48 for MSI/MSI-X
[  289.201845] rt_e1000e 0000:05:00.0: irq 49 for MSI/MSI-X
[  289.201847] rt_e1000e 0000:05:00.0: irq 50 for MSI/MSI-X
[  289.317567] RTnet: registered rteth0
[  289.317570] rt_e1000e: (PCI Express:2.5GT/s:Width x1) 68:05:ca:32:c9:ab
[  289.317571] rt_e1000e: Intel(R) PRO/1000 Network Connection
[  289.317582] rt_e1000e: MAC: 3, PHY: 8, PBA No: E46981-008

I can unload/load them without any problems.
Then I can do :

./rtifconfig rteth0 up 192.168.100.101
./rtifconfig

rteth0    Medium: Ethernet  Hardware address: 68:05:CA:32:C9:AB
          IP address: 192.168.100.101  Broadcast address: 192.168.100.255
          UP BROADCAST RUNNING  MTU: 1500

Then I plug the cable and turn on the slave:
[  572.581589] e1000e: rteth0 NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: Rx/Tx

I need to 'solicit' it by launching :
./rtroute solicit 192.168.100.102 dev rteth0

I can see the slave:
./rtroute
Host Routing Table
Hash Destination HW Address Device
26 192.168.100.102 90:E2:BA:26:72:15 rteth0
3F 192.168.100.255 FF:FF:FF:FF:FF:FF rteth0

But I can't ping :

./rtping 192.168.100.102
Real-time PING 192.168.100.102 56(84) bytes of data.
ioctl: Inappropriate ioctl for device

And wireshark does not see the rteth0 interface.

It's ./rtnet start that cause the hang.


*************************************
Note : If I start only the capture interface,
modprobe rtnet
modprobe rt_e1000e
./rtnet capture

I'm able to see the frames in wireshark (I have the rteth0 interface).









Le mar. 24 févr. 2015 à 13:51, Gilles Chanteperdrix <
gilles.chanteperdrix@xenomai.org> a écrit :

On Tue, Feb 24, 2015 at 12:00:39PM +0000, Antoine Hoarau wrote:
> > And I forgot to mention that I need the 'noapic' to be able to boot, but
> > that was the case also before the patch.
>
> This is probably a configuration issue. Could you post your kernel
> configuration?
>
> --
>                                             Gilles.
>

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [Xenomai] rtnet issue with xenomai-3.git next branch
@ 2015-02-25 13:23 Antoine Hoarau
  2015-02-25 20:46 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 21+ messages in thread
From: Antoine Hoarau @ 2015-02-25 13:23 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai

>You are missing
>CONFIG_XENO_DRIVERS_NET_RTIPV4_ICMP in your kernel configuration.
>ping uses icmp packets, so, if you do not enable icmp, ping is not
>going to work.

Now it's working ! Thank you Gilles !

cd /usr/xenomai/sbin

sudo modprobe rtnet #Loaded at startup
sudo modprobe rt_e1000e #Loaded at startup because e1000e is blacklisted
sudo modprobe rtudp

sudo ./rtifconfig rteth0 up 192.168.100.101 netmask 255.255.255.0
sudo ./rtroute solicit 192.168.100.102 dev rteth0

sudo ./rtifconfig
sudo ./rtroute

# Wait a bit..
sudo ./rtping 192.168.100.102



Le mer. 25 févr. 2015 à 13:34, Gilles Chanteperdrix <
gilles.chanteperdrix@xenomai.org> a écrit :

On Wed, Feb 25, 2015 at 10:47:58AM +0000, Antoine Hoarau wrote:
> > Attached the strace for rtping.
>
> You are missing
> CONFIG_XENO_DRIVERS_NET_RTIPV4_ICMP in your kernel configuration.
> ping uses icmp packets, so, if you do not enable icmp, ping is not
> going to work.
>
> >
> > >You need to load rtcap.ko (after the interface) to have the capture
> > >interface.
> >
> > I get :
> > [  458.000857] RTcap: real-time capturing interface
> > [  458.000860] RTcap: rteth0 busy, skipping device!
> > [  458.000861] RTcap: no real-time devices found!
>
> Probably because you need to load rtcap before setting up the
> interface.
>
>
> --
>                                             Gilles.
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-09-29  5:44 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 23:29 [Xenomai] rtnet issue with xenomai-3.git next branch Jeff Webb
2014-12-17 10:29 ` Gilles Chanteperdrix
2014-12-17 10:59   ` Gilles Chanteperdrix
2014-12-18 21:59     ` Jeff Webb
2014-12-19 10:39       ` Gilles Chanteperdrix
2014-12-30 22:38       ` Gilles Chanteperdrix
2015-09-29  5:44       ` Gilles Chanteperdrix
     [not found] <CAB6vvjn7=j2LpfwVhVAQBPcYiK6a-owoCaFXqY00+JnU2jGm9A@mail.gmail.com>
2015-02-24  9:34 ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2015-02-24 10:39 Antoine Hoarau
2015-02-24 12:00 ` Antoine Hoarau
2015-02-24 12:51   ` Gilles Chanteperdrix
2015-02-24 12:50 ` Gilles Chanteperdrix
2015-02-25 10:23 Antoine Hoarau
2015-02-25 10:26 ` Antoine Hoarau
2015-02-25 10:36 ` Gilles Chanteperdrix
2015-02-25 10:47   ` Antoine Hoarau
2015-02-25 12:34     ` Gilles Chanteperdrix
2015-02-25 13:23 Antoine Hoarau
2015-02-25 20:46 ` Gilles Chanteperdrix
2015-02-25 21:11   ` Antoine Hoarau
2015-02-25 21:21     ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.