The administration of the EVL network stack is done via the evl-net
command line interface from the EVL command set.
The general syntax is as follows:
$ evl net --help
usage: evl-net [options]:
-e -i <ifname> enable out-of-band port in network interface <ifname>
-p <pool-size> max number of out-of-band socket buffers (0=default)
-b <buffer-size> size (in bytes) of out-of-band socket buffer (0=default)
-d -i <ifname> disable out-of-band port in network interface <ifname>
-s <ipaddr> -i <ifname> neighbour solicitation with <ipaddr>, forced via <ifname> if given
-S <ipaddr> -i <ifname> same as -s, marking ARP entry as permanent
-Q[RrTtosfa] -i <ifname> query network interface information about <ifname>
-F[<bpf-module.o>] -i <ifname> install/remove eBPF filter (RX)
In order for EVL to send and/or receive network traffic via a network
interface device, the latter should be enabled as an out-of-band
port. This can be done using the -e
switch from the evl net
command, where -i
specifies the network
interface to enable as an out-of-band port. In addition, you can
fine-tune the number of buffers in the per-device pool maintained by
EVL which should be pre-allocated for out-of-band use with the -p
switch. The size of this pool depends on the volume of the egress
traffic, since EVL consumes those buffers on the transmit path only,
the receive buffers are allocated by the NIC drivers instead. You can
also set the size (in bytes) of such buffer with the -b
switch,
which should accomodate for the largest MTU you intend to use with
your device.
~# evl net -ei eth1.42 -p 4096
Every buffer in the per-device pool is pre-mapped for DMA operation when the out-of-band port is brought up. Such mapping lasts as long as the port stays enabled. Changing the buffer count or buffer size requires bringing down the port then up again with the appropriate settings (dynamic update is not available for these parameters).
The converse operation to evl net -ei <interface>
is evl net -di <interface>
, which brings down an out-of-band port.
~# evl net -di eth1.42
Bringing down a network device automatically dismantles the out-of-band port enabled for it.
As explained in this document, EVL can guarantee that egress
traffic is sent from the out-of-band stage directly, only if its front
caches contain the routing information needed to reach the
peers. Otherwise, the outgoing traffic is offloaded to the in-band
stage. Both evl -Si <ipaddr> <interface>
and evl -si <ipaddr> <interface>
call forms issue a solicitation request to a particular
peer identified by its IPv4 address, in order to update those caches
appropriately. Unlike -s
, the -S
form makes the gathered
information permanent in
the ARP front cache, which is likely what you want.
You can get some statistics about any given port using the evl net -Q[<modifier>]
sub-command. <modifier>
indicates which particular
information you want to obtain, as a terse list of space-separated
values. The command outputs all of the available information in
verbose format if no modifier is given.
~# evl net -Q -i eth0.42
oob capability: yes
rx packets: 0
rx bytes: 0
tx packets: 0
tx bytes: 0
skb size: 4096
skb free: 2048 / 2048
~# evl net -QoRTf -i eth0.42
1 2092625 137399 2048
The data above only and specifically applies to out-of-band I/O, which is accounted separately from in-band I/O statistics as displayed by ethtool.
As mentioned in this document, you can load an eBPF program
module in order to implement complex selection rules of out-of-band
packets. evl -F[<modpath] -i <interface>
loads such a program if a
module path is given, or removes any module already loaded on the port
otherwise.
~# evl net -Fnetrx.o -i eth0.42
[ 782.270250] fec 2188000.ethernet eth0: out-of-band eBPF program installed
~# evl net -F -i eth0.42
[ 819.919746] fec 2188000.ethernet eth0: out-of-band eBPF program removed
Make sure to append the module path directly after the -F
option
letter if provided, without any space.