Skip to content

Commit ae91334

Browse files
committed
Integrate UPF feature and tests
Signed-off-by: char-1ee <[email protected]>
1 parent 18c38f9 commit ae91334

File tree

9 files changed

+10
-36
lines changed

9 files changed

+10
-36
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ SUBDIRS:=ctriface taps misc profile
2424
EXTRAGOARGS:=-v -race -cover
2525
EXTRAGOARGS_NORACE:=-v
2626
EXTRATESTFILES:=vhive_test.go stats.go vhive.go functions.go
27-
# User-level page faults are temporarily disabled (gh-807)
28-
# WITHUPF:=-upfTest
29-
# WITHLAZY:=-lazyTest
30-
WITHUPF:=
31-
WITHLAZY:=
27+
WITHUPF:=-upfTest
28+
WITHLAZY:=-lazyTest
3229
WITHSNAPSHOTS:=-snapshotsTest
3330
CTRDLOGDIR:=/tmp/ctrd-logs
3431

bin/default-rootfs.img

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:58d378a908efd9b604da4659c64c81cb835932a00d382c10b0e2d0d8770fc7d7
3-
size 64409600
2+
oid sha256:e7f5439985a3bc40e6257e3da089e85cc9235f59402f0982bba3587b89ec4afe
3+
size 64577536

ctriface/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@
2323
EXTRAGOARGS:=-v -race -cover
2424
EXTRATESTFILES:=iface_test.go iface.go orch_options.go orch.go
2525
BENCHFILES:=bench_test.go iface.go orch_options.go orch.go
26-
# User-level page faults are temporarily disabled (gh-807)
27-
# WITHUPF:=-upf
28-
# WITHLAZY:=-lazy
29-
WITHUPF:=
30-
WITHLAZY:=
26+
WITHUPF:=-upf
27+
WITHLAZY:=-lazy
3128
GOBENCH:=-v -timeout 1500s
3229
CTRDLOGDIR:=/tmp/ctrd-logs
3330

ctriface/iface_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,6 @@ var (
4545
isWithCache = flag.Bool("withCache", false, "Do not drop the cache before measurements")
4646
)
4747

48-
func TestMain(m *testing.M) {
49-
flag.Parse()
50-
51-
if *isUPFEnabled {
52-
log.Error("User-level page faults are temporarily disabled (gh-807)")
53-
os.Exit(-1)
54-
}
55-
56-
os.Exit(m.Run())
57-
}
58-
5948
func TestPauseSnapResume(t *testing.T) {
6049
log.SetFormatter(&log.TextFormatter{
6150
TimestampFormat: ctrdlog.RFC3339NanoFixed,

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ replace (
3939
)
4040

4141
replace (
42-
github.com/firecracker-microvm/firecracker-containerd => github.com/vhive-serverless/firecracker-containerd v0.0.0-20230912063208-ad6383f05e45
42+
github.com/firecracker-microvm/firecracker-containerd => github.com/char-1ee/firecracker-containerd v0.0.0-20231018191519-49cac5eea134
4343
github.com/vhive-serverless/vhive/examples/protobuf/helloworld => ./examples/protobuf/helloworld
4444
)
4545

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6Z
147147
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
148148
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
149149
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw=
150+
github.com/char-1ee/firecracker-containerd v0.0.0-20231018191519-49cac5eea134 h1:InrwKCxhDU1PJTNJ0wOHM/PvsIruaz2HriViJ5swrX4=
151+
github.com/char-1ee/firecracker-containerd v0.0.0-20231018191519-49cac5eea134/go.mod h1:XC5a/4PWbzipD5Ron745odZxoVy/J6d8xFldwTZJbSU=
150152
github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho=
151153
github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
152154
github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M=
@@ -1022,8 +1024,6 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC
10221024
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
10231025
github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
10241026
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
1025-
github.com/vhive-serverless/firecracker-containerd v0.0.0-20230912063208-ad6383f05e45 h1:B+2NmtrRoWgfYkaqqG9Dyqud5HRjfibFpB8wbqER/PQ=
1026-
github.com/vhive-serverless/firecracker-containerd v0.0.0-20230912063208-ad6383f05e45/go.mod h1:XC5a/4PWbzipD5Ron745odZxoVy/J6d8xFldwTZJbSU=
10271027
github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
10281028
github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
10291029
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=

scripts/setup_firecracker_containerd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ done
4646
# rootfs image
4747
sudo cp $BINS/default-rootfs.img /var/lib/firecracker-containerd/runtime/
4848
# kernel image
49-
sudo curl -fsSL -o /var/lib/firecracker-containerd/runtime/hello-vmlinux.bin https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin
49+
sudo curl -fsSL -o /var/lib/firecracker-containerd/runtime/hello-vmlinux.bin https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.5/x86_64/vmlinux-5.10.186
5050

5151
sudo cp $CONFIGS/config.toml /etc/firecracker-containerd/
5252

vhive.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ func main() {
9191
return
9292
}
9393

94-
if *isUPFEnabled {
95-
log.Error("User-level page faults are temporarily disabled (gh-807)")
96-
return
97-
}
9894

9995
if *isUPFEnabled && !*isSnapshotsEnabled {
10096
log.Error("User-level page faults are not supported without snapshots")

vhive_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ func TestMain(m *testing.M) {
6565

6666
flag.Parse()
6767

68-
if *isUPFEnabledTest {
69-
log.Error("User-level page faults are temporarily disabled (gh-807)")
70-
os.Exit(-1)
71-
}
72-
7368
log.Infof("Orchestrator snapshots enabled: %t", *isSnapshotsEnabledTest)
7469
log.Infof("Orchestrator UPF enabled: %t", *isUPFEnabledTest)
7570
log.Infof("Orchestrator lazy serving mode enabled: %t", *isLazyModeTest)

0 commit comments

Comments
 (0)