Skip navigation.
Home
The QNX Community Portal

View topic - setting network partitions

setting network partitions

For discussion of realtime and/or embedded programming.

setting network partitions

Postby ninja123 » Thu Jan 07, 2010 10:29 am

Hi all,

I am trying to set up partitions in the boot file.

I have included lines:

[+script] startup-script = {
.
.

#my adaptive partition
sched_aps net-partition 25
.
.
.
sched_aps=net-partition] /sbin/io-pkt-v4-hc &
[sched_aps=net-partition] /usr/sbin/qconn &
.
.
}


However when I boot the system after copying the right makefile of this buildfile, I do not see interface en0 at all!!

Also when I do a:

pidin -F "%H %60N"

I see that io-pkt-v4-hc and qconn run in both 'system' and 'net-partition
:( :(
I do not know what i am missing..

By the way, how to move the entire networking of QNX into one partition?
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am

RE: setting network partitions

Postby mario » Thu Jan 07, 2010 2:13 pm

I don't see a network driver being started.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: RE: setting network partitions

Postby rgallen » Fri Jan 08, 2010 2:09 am

mario wrote:I don't see a network driver being started.


Either do I. I'd also like to point out that having threads (within the io-pkt process) that are being billed to different partitions, is not bad; it is actually fundamental to the correct operation of adaptive partitioning (usage is being billed to the client that caused the thread to run).

I'd recommend reading the adaptive partitioning design docs.
rgallen
QNX Master
 
Posts: 671
Joined: Thu Jul 11, 2002 6:48 pm

Postby ninja123 » Mon Jan 11, 2010 9:03 am

you mean I have to mount the driver here in the net partition??
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am

Postby rgallen » Tue Jan 12, 2010 12:53 am

ninja123 wrote:you mean I have to mount the driver here in the net partition??


No. But you do need to issue the mount from the partition within which you want the interrupt handler thread to run, since the thread that mounts the driver runs in the partition of the mount command, and consequently when the driver attaches the interrupt event, it does so in the context of the partition that the mount command was running in.

try this (where you mount the driver) and see if it helps.

# on -Xaps=net-partition mount -T io-pkt /lib/dll/devnp-XXX.so
rgallen
QNX Master
 
Posts: 671
Joined: Thu Jul 11, 2002 6:48 pm

Postby ninja123 » Tue Jan 12, 2010 8:55 am

I looked into the boot(build) file, in rc.local, in sysinit and all relevant start script. But nowhere is this mounted other than in /etc/system/ebum/devices (where along with other drivers this particular one is also there).

After I booted. I slayed all io-pkt and in the command line typed:

the 'on mount' command you have mentioned below.

I then checked up in 'sloginfo' command but my driver never got mounted..as in I dont see it there.
When I issue an ifconfig en0 command I only get SIOCSIFFLAGS error :(

Where is the driver mounted?
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am

Postby ninja123 » Tue Jan 12, 2010 10:24 am

Hello all, Problem solved. Thanks rgallen. I mounted my driver in the parition in rc.local file. However that dint work. Ultimately I found a similar problem by someone in Foundry27 site. The answer was: i have to slay the stack at start up and then start stack in my partition and then mount driver in the partition. Also wait for the en0 to show up before I set address using ifconfig. thanks for all your inputs :)
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am

Postby rgallen » Tue Jan 12, 2010 5:49 pm

ninja123 wrote:Hello all, Problem solved. Thanks rgallen. I mounted my driver in the parition in rc.local file. However that dint work. Ultimately I found a similar problem by someone in Foundry27 site. The answer was: i have to slay the stack at start up and then start stack in my partition and then mount driver in the partition. Also wait for the en0 to show up before I set address using ifconfig. thanks for all your inputs :)


Alternatively, you can simply edit /etc/system/enum/include/net and change the line:

set(IOPKT_CMD, io-pkt-v4-hc -ptcpip

to:

set(IOPKT_CMD, on -Xaps=net-partition io-pkt-v4-hc -ptcpip

and /etc/rc.d/rc.devices to start two invocations of enum-devices (one that will only find network devices, and one that finds only non-network devices) and start the appropriate enum-devices in the network partition.

Then you wouldn't need to start io-pkt in the ifs startup, and you don't need any commands in /etc/rc.d/rc.local. In addition, this will automatically place any newly added network hardware in the network partition, without any further config changes.

Ideally QSSL should add a partition attribute to the mount command in the /etc/system/enum config files, such that one could specify which partition the mount thread should run in.
rgallen
QNX Master
 
Posts: 671
Joined: Thu Jul 11, 2002 6:48 pm

Postby ninja123 » Wed Jan 13, 2010 9:29 am

Thanks rgallen!
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am

Postby princi » Wed Feb 10, 2010 12:13 pm

Hi,
I did following to move entire qnx netwoking to a partiton
.....
Alternatively, you can simply edit /etc/system/enum/include/net and change the line:

set(IOPKT_CMD, io-pkt-v4-hc -ptcpip

to:

set(IOPKT_CMD, on -Xaps=net-partition io-pkt-v4-hc -ptcpip
.....
It is working as expected. Thank You

Similarly I want to move io-graphics to GUI partition as it consumes lot of CPU on playing flash player. How do I configure this at start up? I tried modifying /etc/system/enum/include/graphics as above. It only moved io-display to GUI partition. Please help.
princi
Active Member
 
Posts: 12
Joined: Mon Feb 01, 2010 5:50 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 4 guests

cron