Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/build-vmlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Build vmlinux
on:
push:
paths:
- 'configs/kernel-oc9.config'
- 'configs/kernel-oc9.aarch64.config'
- 'configs/kernel-oc9.x86_64.config'
- '.github/workflows/build-vmlinux.yml'
workflow_dispatch:

Expand Down Expand Up @@ -31,7 +32,7 @@ jobs:
- name: Compute vmlinux cache metadata
id: vmlinux_metadata
run: |
config_hash="$(sha256sum configs/kernel-oc9.config | awk '{print $1}')"
config_hash="$(sha256sum configs/kernel-oc9.$(uname -m).config | awk '{print $1}')"
echo "config_hash=${config_hash}" >> "${GITHUB_OUTPUT}"
echo "cache_key=vmlinux-opencloudos-${KERNEL_TAG}-${config_hash}-ubuntu-latest" >> "${GITHUB_OUTPUT}"
echo "artifact_name=vmlinux-opencloudos-${KERNEL_TAG}-${config_hash}" >> "${GITHUB_OUTPUT}"
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
- name: Configure kernel
if: steps.restore_vmlinux.outputs.cache-hit != 'true'
run: |
cp configs/kernel-oc9.config "${KERNEL_SRC}/.config"
cp configs/kernel-oc9.$(uname -m).config "${KERNEL_SRC}/.config"
make -C "${KERNEL_SRC}" olddefconfig

- name: Build vmlinux
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-one-click.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Compute vmlinux cache metadata
id: vmlinux_metadata
run: |
config_hash="$(sha256sum configs/kernel-oc9.config | awk '{print $1}')"
config_hash="$(sha256sum configs/kernel-oc9.$(uname -m).config | awk '{print $1}')"
echo "config_hash=${config_hash}" >> "${GITHUB_OUTPUT}"
echo "cache_key=vmlinux-opencloudos-${KERNEL_TAG}-${config_hash}-ubuntu-latest" >> "${GITHUB_OUTPUT}"
echo "artifact_name=vmlinux-opencloudos-${KERNEL_TAG}-${config_hash}" >> "${GITHUB_OUTPUT}"
Expand Down
1 change: 0 additions & 1 deletion CubeMaster/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ MAKEFLAGS += --no-print-directory
endif

export GO111MODULE=on
export GOARCH=amd64
export GOOS=linux
GO_BIN_DIR := $(shell if [ -n "$$(go env GOBIN)" ]; then printf "%s" "$$(go env GOBIN)"; else printf "%s/bin" "$$(go env GOPATH)"; fi)
PROTOBUF_INCLUDE_DIR := $(shell python3 -c 'import glob, os, subprocess; candidates = ["/usr/include", "/usr/local/include"]; gopath = subprocess.check_output(["go", "env", "GOPATH"], text=True).strip(); candidates = (glob.glob(os.path.join(gopath, "pkg/mod/github.com/google/gnostic-models@*/third_party")) + glob.glob(os.path.join(gopath, "pkg/mod/github.com/gogo/protobuf@*/protobuf")) + candidates) if gopath else candidates; print(next((c for c in candidates if os.path.exists(os.path.join(c, "google/protobuf/empty.proto")) and os.path.exists(os.path.join(c, "google/protobuf/any.proto"))), ""))')
Expand Down
1 change: 0 additions & 1 deletion CubeMaster/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.25.7
// toolchain go1.22.9

require (
github.com/agiledragon/gomonkey v2.0.2+incompatible
github.com/agiledragon/gomonkey/v2 v2.9.0
github.com/alicebob/miniredis/v2 v2.35.0
github.com/charmbracelet/bubbles v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion CubeMaster/integration/mock_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"testing"
"time"

"github.com/agiledragon/gomonkey"
"github.com/agiledragon/gomonkey/v2"
"github.com/alicebob/miniredis/v2"
"github.com/gomodule/redigo/redis"
"github.com/google/uuid"
Expand Down
2 changes: 2 additions & 0 deletions CubeNet/cubevs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.coverage
coverage.html
/*_bpfel.go
/*_bpfel.o
3 changes: 2 additions & 1 deletion CubeNet/cubevs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
COVERAGE_PROFILE=.coverage
COVERAGE_REPORT=coverage.html

BPF_GENS := $(wildcard *_bpfel.go)
BPF_OBJS := $(wildcard *_bpfel.o)

ifeq ($(V),1)
Expand Down Expand Up @@ -48,4 +49,4 @@ $(BPF_OBJS):
.PHONY: clean
clean:
$(call msg,CLEAN)
$(Q)rm -f $(COVERAGE_PROFILE) $(COVERAGE_REPORT)
$(Q)rm -f $(COVERAGE_PROFILE) $(COVERAGE_REPORT) $(BPF_GENS) $(BPF_OBJS)
6 changes: 3 additions & 3 deletions CubeNet/cubevs/cubevs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/florianl/go-tc"
)

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64 localgw ../src/localgw.bpf.c -- -I../vmlinux/x86
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64 mvmtap ../src/mvmtap.bpf.c -- -I../vmlinux/x86
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64 nodenic ../src/nodenic.bpf.c -- -I../vmlinux/x86
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target $GOARCH localgw ../src/localgw.bpf.c -- -I../vmlinux/$GOARCH
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target $GOARCH mvmtap ../src/mvmtap.bpf.c -- -I../vmlinux/$GOARCH
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target $GOARCH nodenic ../src/nodenic.bpf.c -- -I../vmlinux/$GOARCH

// Params is used to initialize CubeVS.
type Params struct {
Expand Down
Loading
Loading