PF_ZIO (Allessandro Rubini)

Basic concepts:

  • channel = a single wire. Channels are grouped into channel sets and devices.
  • Block = atomic data + metadata combination. Metadata = “control”.
  • Everything is timestamped at sub-nanosecond level (which is the reason why existing things don’t work).

Device types: analog, digital, time. Time is for using a channel to synchronize devices. It has no data, just pulses. Every devices does timing by itself, so there are no very strict timing requirements on the distribution of data.

Plain ZIO configuration is through sysfs, not ioctl.

There is a separate device node for control and for data. This allows e.g. mmap() access for the data (which allows zerocopy) while the control uses normal reads (because it has to be processed by the kernel).

PF_ZIO creates a new address family that contains ZIO addresses. Then you can connect(), bind(), recv() and the typical network way. In SOCK_RAW, you get the control + data in one block. in SOCK_DGRAM, the control is stripped off; in SOCK_STREAM, you can read()/write().

PF_ZIO makes it possible to send ZIO data directly over a network link. But the main use case it to replace hundreds of char devices by a single socket on which you recvmsg() – much more efficient than select()-ing hundreds of fds. You can also use it for sniffing (wireshark), because the infrastructure is there.

Sorry for the bad explanation, but I didn’t understand much of it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s