Low-latency multicast module
Syntax:
mount -Tio-pkt lsm-llmcast.so [option[,option...]] ...
or:
io-pkt-variant -p llmcast [option[,option...]] ...
where variant is v4-hc or v6-hc.
Description:
The lsm-llmcast.so shared object is the module that supports a low-latency method
of receiving and transmitting raw Ethernet multicast frames for a third-party AVB stack to run on
io-pkt-*.
It provides a separate resource manager so that AVB traffic is independent of all other io-pkt-*
activity above the driver layer.
The lsm-llmcast.so binds in to the path manager under io-pkt-* as
llmcast and then the interface name.
For example on the Jacinto 6 with interfaces of dm0 and dm1 and io-pkt-*
running without a prefix, there will be directories under /dev/socket/llmcast of
dm0 and dm1.
The io-pkt-* prefix specified on the command line with -p tcpip prefix=...
is respected.
The lsm-llmcast.so supports the following operations:
- Open for read
- A file may be opened for read.
The name of the file determines the Ethernet multicast address that's added to the receive filter for the
interface, and the directory it's opened in determines the interface that's used.
For example, if you open /dev/socket/llmcast/dm0/91e0f0000001 for reading,
91:e0:f0:00:00:01 is added to the multicast filter on dm0,
and any Ethernet packets received with that destination MAC address may be read from this file.
Note:
This is an exclusive open; a file opened for reading can be opened only once and must be opened for read only.
- Open for write
- A file may be opened for write.
The name of the file determines the Ethernet multicast address and VLAN priority that are used for
transmitting the packet.
Note that these parameters are not validated on the write.
The VLAN priority from the file name is used to determine the queue that's used for transmitting any packets written.
For example, if you open /dev/socket/llmcast/dm0/91e0f0000002:3 for writing,
any Ethernet packets written to that file are transmitted on the queue that maps in the driver to VLAN priority 3.
Note:
This is an exclusive open; a file opened for writing can be opened only once and must be opened for write only.
- Blocking read
- Received packets may be read by a blocking read call on the previously opened file descriptor.
Up to 10 packets will be queued on each opened file descriptor if a read isn't blocked on that file.
Each read returns a single packet if it's available, or it blocks until a packet is available.
- Nonblocking read
- Similar to a blocking read, except that if there's no packet available, the read immediately returns with
an error of EAGAIN.
- Blocking write
- A blocking write on the previously opened file descriptor results in the data's being passed to the driver
for immediate transmission on the queue associated with the VLAN priority of the opened file descriptor.
No validation is performed on the data by lsm-llmcast.so.
Note that the driver may pad, overwrite the source MAC address, and add the Ethernet FCS,
but this is driver-dependent and not part of lsm-llmcast.so.
The write is blocked until the data is passed to the driver for transmission.
- Select for read
- The IO_NOTIFY mechanism is supported on a previously opened file descriptor to support
poll().
- List current open streams
- As a debugging aid, directory listing of the currently open file names on interfaces is supported.
- Close
- Previously opened file descriptors may be closed.
This results in the freeing of all resources associated with that entry in lsm-llmcast.so
and in the case of a previous open for read, causes the multicast address to be removed from the interface's
receive filter.