From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 22 Aug 2019 07:10:45 -0500 (CDT) From: Per Oberg Message-ID: <676297850.725433.1566475845016.JavaMail.zimbra@wolfram.com> In-Reply-To: References: <7f20a51d-e1c2-b95e-ab17-d18338bbcec2@siemens.com> Subject: Re: RTNet - vnic0 question MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurentiu-Cristian Duca Cc: xenomai ----- Den 22 aug 2019, p=C3=A5 kl 13:21, xenomai xenomai@xenomai.org skrev: > Hi, > I have made a test between two qemu-x86_64-rt_8139too with different > mac and IP addresses, > one is master one is slave. In each of them I do: > /usr/xenomai/sbin/rtnet start > Then the applications rtt-sender and rtt-responder (taken from rtnet > 0.9.13 release) work, > but if I turn off vnic0, then rtt-sender reports error: "sendto > failed: Network is unreachable", > even if rteth0 is up and fully configured. > Do you have any simple apps that work on rtnet? You have : rtping=20 rtifconfig=20 rtroute Perhaps these can be of assistance? > Thank you, > Kind regards > On 8/22/19, Laurentiu-Cristian Duca wrote: > > The rt drivers for bbb are taken from: > > https://github.com/G-Ray/xenomai-boneblack-rtnet-drivers > > and I am not 100% sure that they are working correctly. > > On 8/22/19, Laurentiu-Cristian Duca wrote: > >> Hello Jan and friends > >> Thank you for your fast answer. Please find below the details. > >> On 8/21/19, Jan Kiszka wrote: > >>> On 21.08.19 16:20, Laurentiu-Cristian Duca via Xenomai wrote: > >>>> Hello rtnet community, > >>>> I successfully tested the examples rtt-sender and rtt-responder > >>>> within a rtnet made from one beaglebone black and one > >>>> qemu-x86_64-8139too, > >>>> with tdma and also with nomac. > >>> Are we talking about some legacy Xenomai or even RTnet version? Or wh= ere > >>> did > >>> you > >>> get the examples from? They are not part of RTnet in Xenomai 3. > >> I got the examples from rtnet-0.9.13. I know they are quite old, but > >> I needed a start point. > >> Are these obsolete? Do you have any examples for Xenomai 3? > >> rtnet-0.9.13/examples/xenomai/posix/rtt-sender.c > >> rtnet-0.9.13/examples/xenomai/posix/rtt-responder.c > >>>> I have noted that the presence of vnic0 as an up and fully > >>>> configured interface is mandatory, > >>>> even if rteth0 is up and fully configured. > >>>> Otherwise the rtt-sender announces "sendto failed: Network is > >>>> unreachable". > >>>> Could anybody tell me why is this happening? > >>>> I have also noted that if I disable vnic0 (ifconfig vnic0 down), > >>>> rtping works if rteth0 is up and fully configured. > >>>> Why does not work rtt-sender in this case? > >>>> Could it be a problem with rtnet drivers? > >>> I bet your examples are falling back to normal network here, and that= is > >>> provided between your test nodes via the vnics. This leads to my firs= t > >>> question: > >>> Where did you pick the examples up, how did you build them etc.? Also= , > >>> did > >>> you > >>> make sure that rtudp was loaded? > >> I am 100% sure that rtudp was loaded. The modules were loaded by a > >> script: > >> modprobe rt_smsc && modprobe rt_davinci_mdio && modprobe rt_ticpsw > >> modprobe rtipv4 && modprobe rtpacket && modprobe rtudp > >> modprobe rtmac > >> modprobe nomac > >> #modprobe tdma > >> I used robertcnelson Xenomai 3.0.9 patch for beaglebone black linux > >> 4.14.108. It's on github. > >> I have also copied the rtnet header files to xenomai-userspace > >> include. The files compile without warnings. > >> The makefile is: > >> # Tested with linaro toolchain > >> (gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf) > >> CC =3D arm-linux-gnueabihf-gcc > >> XENO_INSTALL =3D > >> /home/laur/lucru/raspberry-pi/robertcnelson/ti-linux-kernel-dev/ignore= /xenomai-userspace > >> RTNET_INSTALL =3D > >> /home/laur/lucru/raspberry-pi/robertcnelson/rtnet-hiddeate2m > >> #XENO_CONFIG :=3D > >> /home/laur/lucru/raspberry-pi/robertcnelson/ti-linux-kernel-dev/ignore= /xenomai-userspace/usr/xenomai/bin/xeno-config > >> #/usr/xenomai/bin/xeno-config > >> #CFLAGS :=3D $(shell $(XENO_CONFIG) --posix --alchemy --cflags) > >> #LDFLAGS :=3D $(shell $(XENO_CONFIG) --posix --alchemy --ldflags) > >> LIBCFLAGS =3D -Wall -I$(XENO_INSTALL)/usr/xenomai/include/cobalt > >> LIBCFLAGS +=3D -I$(XENO_INSTALL)/usr/xenomai/include > >> CFLAGS =3D -Wall -I$(XENO_INSTALL)/usr/xenomai/include/cobalt > >> CFLAGS +=3D -I$(XENO_INSTALL)/usr/xenomai/include/alchemy > >> -I$(XENO_INSTALL)/usr/xenomai/include > >> CFLAGS +=3D -march=3Darmv7-a -mfpu=3Dvfpv4 -D_GNU_SOURCE -D_REENTRANT > >> -D__COBALT__ -D__COBALT_WRAP_ > >> CFLAGS +=3D -I$(RTNET_INSTALL)/stack/include > >> LFLAGS =3D -lalchemy -lcopperplate > >> $(XENO_INSTALL)/usr/xenomai/lib/xenomai/bootstrap.o > >> LFLAGS +=3D -Wl,--wrap=3Dmain -Wl,--wrap=3Dmalloc -Wl,--wrap=3Dfree > >> #-Wl,--dynamic-list=3D$(XENO_INSTALL)/usr/xenomai/lib/dynlist.ld > >> LFLAGS +=3D -L$(XENO_INSTALL)/usr/xenomai/lib -lcobalt -lpthread -lrt > >> LFLAGS +=3D -march=3Darmv7-a -mfpu=3Dvfpv4 -Llib > >> all: rtt-sender rtt-responder > >> rtt-sender: rtt-sender.o > >> $(CC) -o rtt-sender rtt-sender.o $(LFLAGS) > >> rtt-sender.o: rtt-sender.c > >> $(CC) -c -o rtt-sender.o rtt-sender.c $(CFLAGS) $(LIBCFLAGS) > >> (same for rtt-responder) > >> Kind regards, > >> L-C. Per =C3=96berg=20