Skip to content

Commit 3bd8223

Browse files
committed
Add auto corepining path
This patch adds support in VPP for pinning workers to the CPU cores that are assigned by a static allocator. When k8s is configured to run with a static allocator [0] and that VPP starts with requests.CPU equal to limits.CPU and both integer numbers. having VPP configured with cpu { main-core 0 corelist-workers 2-3 relative } Will make it so that numbers 0,2,3 do not refer to absolutes CPU IDs but to the 0th, 2nd and 3rd CPU of those allotted by the static core allocator in k8s. [0] https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy Signed-off-by: Nathan Skrzypczak <[email protected]>
1 parent 84ed1e9 commit 3bd8223

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed

Diff for: docs/corepinning.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Core Pinning for Calico/VPP
2+
3+
This patch adds support in VPP for pinning workers to the CPU
4+
cores that are assigned by a static allocator.
5+
6+
When kubernetes is configured to run with a [static allocator](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy
7+
) and that VPP starts with requests.CPU equal to limits.CPU
8+
and both integer numbers.
9+
10+
having VPP configured with
11+
12+
```console
13+
cpu {
14+
main-core 0
15+
corelist-workers 2-3
16+
relative
17+
}
18+
```
19+
20+
Will make it so that numbers 0,2,3 do not refer to absolutes CPU
21+
IDs but to the 0th, 2nd and 3rd CPU of those allotted by the static
22+
core allocator in kubernetes.

Diff for: vpplink/generated/generate.log

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VPP Version : 24.10.0-7~ga51f8b435
1+
VPP Version : 24.10.0-8~g110dae32f
22
Binapi-generator version : v0.11.0
33
VPP Base commit : b91e15387 misc: Initial changes for stable/2410 branch
44
------------------ Cherry picked commits --------------------
@@ -8,6 +8,7 @@ acl: acl-plugin custom policies
88
cnat: [WIP] no k8s maglev from pods
99
pbl: Port based balancer
1010
gerrit:revert:39675/5 Revert "ip-neighbor: do not use sas to determine NS source address"
11+
gerrit:41094/20 vlib: improve core pinning
1112
gerrit:34726/3 interface: add buffer stats api
1213
misc: VPP 24.10 Release Notes
1314
build: fix dpdk mellanox driver build setting

Diff for: vpplink/generated/vpp.go

+31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: vpplink/generated/vpp_clone_current.sh

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ function git_clone_cd_and_reset ()
9696
git_clone_cd_and_reset "$1" cfa0953251cbab435307baf3dcd249fd95afaf1f # misc: VPP 24.10 Release Notes
9797

9898
git_cherry_pick refs/changes/26/34726/3 # 34726: interface: add buffer stats api | https://gerrit.fd.io/r/c/vpp/+/34726
99+
git_cherry_pick refs/changes/94/41094/20 # 41094: vlib: improve core pinning | https://gerrit.fd.io/r/c/vpp/+/41094
99100

100101
# This is the commit which broke IPv6 from v3.28.0 onwards.
101102
git_revert refs/changes/75/39675/5 # ip-neighbor: do not use sas to determine NS source address

0 commit comments

Comments
 (0)