Skip to content

Commit 1aa73e6

Browse files
committed
doc: add pods troubleshooting doc
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
1 parent af46e69 commit 1aa73e6

File tree

6 files changed

+440
-110
lines changed

6 files changed

+440
-110
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ troubleshooting commands and tools.
1313
- [Configuration](config), [General troubleshooting](troubleshooting.md)
1414
- [BGP with CalicoVPP](bgp), [troubleshooting BGP](bgp/troubleshooting.md)
1515
- [network model](network), [troubleshooting networking](network/troubleshooting.md)
16-
- [Pods connectivity](pods)
16+
- [Pods connectivity](pods), [troubleshooting pods](pods/troubleshooting.md)
1717
- [Services](services), [troubleshooting services](services/troubleshooting.md)
1818
- [Policies](policies), [troubleshooting policies](policies/troubleshooting.md)
1919
- [Metrics](metrics)

docs/pods/README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,37 @@
22

33
CalicoVPP exposes three types of interaces
44

5-
- [tuntap](tuntap.md)
6-
- [memif](memif.md)
7-
- [vcl](vcl.md)
8-
- [tuntap](tuntap.md)
5+
- [tuntap](tuntap.md) - regular linux netdevs
6+
- [memif](memif.md) - performance oriented packet interaces
7+
- [vcl](vcl.md) - performance oriented host stack (TCP, UDP, TLS in VPP)
98

10-
## Pod interface configuration
9+
## Configuration
1110

12-
As part of user config, you can set specific configuration for pod interfaces
13-
using pod annotations.
11+
The pod interface sizing can be confiugred with annotations in the pod
12+
manifest.
1413

1514
````yaml
16-
1715
apiVersion: v1
1816
kind: Pod
1917
metadata:
2018
name: samplepod
2119
annotations:
2220
cni.projectcalico.org/vppInterfacesSpec: |-
2321
{
24-
"eth0": {"rx": 1, "tx": 2, "isl3": true }
22+
"eth0": {
23+
"rx": 1,
24+
"tx": 1,
25+
"rxqsz": 1024,
26+
"txqsz": 1024,
27+
"rxMode": "polling",
28+
"isl3": true
29+
}
2530
}
26-
2731
````
2832

33+
- `tx` and `rx` set the number of queues the interface receives in VPP
34+
- `rxqsz` and `txqsz` set the number of buffers the interface receives in VPP
35+
- `rxMode` sets the way VPP reads from this interface (`polling` `adaptive` or `interrupt`)
36+
- `isL3` sets the interface mode L3 for `tun` (default) or L2 for `tap`
37+
2938
Here is the full [specification reference](https://github.com/projectcalico/vpp-dataplane/blob/master/config/config.go)

docs/pods/memif.md

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ metadata:
8383
"cni.projectcalico.org/vppExtraMemifPorts": "tcp:4444-20000,udp:4444-20000"
8484
````
8585

86+
This meaning that ports `4444` to `20000` in both UDP and TCP will
87+
go to the memif interface while the rest of the traffic will flow
88+
normally to the tuntap.
89+
8690
This is called PBL (Port based balancer).
8791

8892
A pod supports having both memif and [vcl](vcl.md) interfaces at the same time
@@ -101,57 +105,6 @@ VPP api has a particular syntax for abstract sockets: using the keyword
101105
For example: `abstract:memif1,netns_name=/var/run/netns/cni-75e26661-4119-90a4-b9d2-0b00489f76f3`.
102106
This syntax appears in vppctl.
103107

104-
## Troubleshooting memif interface creation
105-
106-
To check abstract socket creation in linux, you can run the following command
107-
on the pod using memif:
108-
109-
````bash
110-
lsof -U | grep memif
111-
vpp_main 420448 root 41u unix 0xffdd 0t0 30888503 @memif1 type=SEQPACKET
112-
````
113-
114-
To check it in vpp cli:
115-
116-
````bash
117-
_______ _ _ _____ ___
118-
__/ __/ _ \ (_)__ | | / / _ \/ _ \
119-
_/ _// // / / / _ \ | |/ / ___/ ___/
120-
/_/ /____(_)_/\___/ |___/_/ /_/
121-
122-
vpp# sh memif
123-
sockets
124-
id listener filename
125-
0 no /run/vpp/memif.sock
126-
101 yes (1) abstract:memif1,netns_name=/var/run/netns/cni-75e61-4119-0b004
127-
128-
interface memif1013904223/0
129-
socket-id 1013904223 id 0 mode ethernet
130-
flags admin-up
131-
listener-fd 41 conn-fd 0
132-
num-s2m-rings 0 num-m2s-rings 0 buffer-size 0 num-regions 0
133-
````
134-
135-
To check memif interface creation:
136-
137-
````bash
138-
vpp# sh int addr
139-
...
140-
...
141-
memif1013904223/0 (up):
142-
unnumbered, use loop4
143-
L3 11.0.0.195/32 ip4 table-id 1649346937 fib-idx 12
144-
L3 fd20::58fd:b191:5c13:9cc2/128 ip6 table-id -1526094716 fib-idx 16
145-
...
146-
````
147-
148-
In multinet case, this interface has a unique address and it attaches to a
149-
dummy interface.
150-
However, in PBL, memif interface is attached to the same interface as tun/tap.
151-
152-
To check dummy interface created in multinet/memif, connect to the memif pod
153-
then type `ip address` to find memif dummy interfaces.
154-
155108
## Testing memif feature
156109

157110
Testing depends on the way memif interface is consumed. We present three

0 commit comments

Comments
 (0)