Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki1652: Qnet_wiki_page (Version 13)

Transparent Distributed Processing#

The transparent distributed processing capability is implemented using the QNET protocol.

Source Code Layout#

Amazingly enough, the source code for all of Qnet is available at sys/lsm/qnet (here) . Snowballs in Hell, I know. Thing to keep in mind here is that there are many different variants of Qnet, most of which you probably haven't heard of. The original Qnet variant (classic or "compat") specific source is found under l3_qnx and l4_qnx. This version of Qnet has been deprecated and was replaced some years ago by the "lightweight" or lwl4 qnet which keeps it's variant specific source under the l4_lite and qos directories. Generic Qnet source is found under the nr directory (node resolver), the ndb directory (node database) the kif directory (Kernel InterFace - get it?) directory, and the public directory. The arm, mips, ppc, sh and x86 directories are pretty obviously where you will find the compiled binaries. To avoid confusion, disregard the l4_ixp2800 and l4_rio and l4_tcp directories - think of them as science experiments that never saw the light of day.

The source tree also includes all of the source for io-net (although this source base has only been tested with io-pkt at this time) and will build the associated io-net npm-qnet shared libraries.

How do I use TDP with Core Networking 6.4.0?#

Qnet really hasn't changed a whole lot over the years. Heck, even QNX2 had Qnet, albeit only with ARCnet media. QNX4 had a more generic Qnet, which had support for loadable and unloadable drivers for various media, including ARCNet, ethernet, token ring, FDDI, etc. QNX6 Qnet functions the same under the old io-net and new io-pkt infrastructures - the packet format and protocol is the same, so if you're familiar with using Qnet with io-net, you hopefully won't see much of a change with io-pkt. For both io-net and io-pkt, Qnet is just another protocol (like TCP/IP) which transmits and receives packets.

The QNET module in Core Networking 6.4 is now a loadable shared module (lsm-qnet.so). We only support the "l4_lw_lite" variant. qnet-compat (compatible with neutrino 6.2.1) is no longer supported.

To start the stack with qnet,

  • io-pkt-v4 -ddriver -pqnet

will do the trick (as long as you have your PATH and LD_LIBRARY_PATH environment variables set up properly). You can also mount the protocol after the stack has started

  • mount -Tio-pkt full_path_to_dll/lsm-qnet.so

Note that the "io-net" option to mount is also supported to provide backward compatibility with existing scripts.

The command line options and general configuration information is the same as it was with io-net (please see the online docs for more information). Our on-line docs are located here (replace "io-net" with "io-pkt" and "npm-qnet.so" with "lsm-qnet.so").

How do I use TDP over IP?#

TDP supports two modes of communications: one directly over ethernet and one over IP. The "straight to ethernet" L4 layer is faster and more dynamic than the IP layer, but it isn't possible to route TDP packets out of a single layer 2 domain. Using TDP over IP is the means whereby you can connect to any remote machine over the Internet. This can be accomplished as follows:

1) TDP must use the dns resolver to get an IP address from a hostname (this is the "resolve=dns" option). Configure the local host name and domain and make sure that that all hostnames that you want to talk to (including the local machine) are resolvable by "gethostbyname".

  • Use "hostname" to set the hostname
  • Use "setconf _CS_DOMAIN" to set your domain
  • If the hosts aren't in a DNS database, set each node up to use /etc/hosts to resolve DNS queries.
    • This is accomplished by adding the line "lookup file bind" to /etc/resolv.conf and populating the /etc/hosts file with the IP addresses and names.

2) Start (or mount) qnet with the bind=ip,resolve=dns option.

  • io-pkt-v4-hc -di82544 -pqnet bind=ip,resolve=dns
or
  • mount -Tio-pkt -o bind-ip,resolve=dns "full_path_to_dll"/lsm-qnet.so

Unlike raw Ethernet transport, names won't automatically appear in the /net directory. As you perform TDP operations (e.g. ls /net/host1), the entries will be created as required.