Usage¶
In this section, it is assumed that Virtual Accelerator has been properly installed and configured. See Getting Started for more details.
Warning
The BPF filter is automatically synchronized.
To disable automatic synchronization, run the cache manager with the -D
option:
# cmgr -D
Then, to manually enable TAP per interface:
# fp-cli
<fp-0> tap-iface-set eth2 on
The tcpdump -i eth2 program will work the same as described in the case of automatic synchronization.
TAP management¶
Adding a trailer into tapped packets¶
Synopsis
A trailer (“FASTPATH OFFLOAD” in ascii) can be added into packets tapped in the fast path. This helps to identify if the packets have been tapped in the fast path or in the kernel. This command enables or disables this feature.
tap-trailer-set on|off
- on or off
Enable / disable trailer into tapped packets
Example
Enable the “FASTPATH OFFLOAD” trailer.
<fp-0> tap-trailer-set on
ICMP packets that are forwarded by the fast path when the trailer is enabled:
# tcpdump -nXi eth2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
16:51:02.537566 IP 10.100.0.1 > 10.200.0.1: ICMP echo request, id 347, seq 1, length 64
0x0000: 4500 0054 5d8b 4000 3f01 c8f0 0a64 0001 E..T].@.?....d..
0x0010: 0ac8 0001 0800 62d8 015b 0001 66b3 f35d ......b..[..f..]
0x0020: 0000 0000 72e7 0800 0000 0000 1011 1213 ....r...........
0x0030: 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 .............!"#
0x0040: 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 $%&'()*+,-./0123
0x0050: 3435 3637 4641 5354 5041 5448 204f 4646 4567FASTPATH.OFF
0x0060: 4c4f 4144 LOAD
Displaying the trailer status¶
Synopsis
tap-trailer
Example
<fp-0> tap-trailer
"FASTPATH OFFLOAD" trailer into tapped packet: off.
BPF management¶
Displaying BPF filters¶
Synopsis
tap-bpf [all [raw]]
- all
All BPF with decoded instructions.
- raw
All BPF in raw format.
Example
<fp-0> tap-bpf
BPF list (ifuid 0 is the virtual interface "any"):
8: eth1-vr0, instance 0 (# cmds: 1)
9: eth2-vr0, instance 0 (# cmds: 1)
Setting manually the interface for tapping¶
Synopsis
tap-iface-set <ifname>|any on|off
- <ifname> or any
Interface name or any for select all interface.
- on or off
Enable / disable TAP.
Example
Enable TAP on eth2
<fp-0> tap-iface-set eth2 on
Enabling or disabling TAP¶
Synopsis
tap-set on|off
- on or off
Enable / disable TAP.
Example
Enable TAP:
<fp-0> tap-set on
TAP is on (was off)