Revision 51d7f707c4d4e84599979e5859025d3ff2623d6b authored by gray on 26 May 2023, 03:18:40 UTC, committed by Daniel Borkmann on 20 June 2023, 14:46:04 UTC
The previous implementation of BPFProgram.Test() only allowed passing and returning bytes as *skb->data, without the ability to specify input skb metadata or check output skb metadata. This commit introduces a new function named runBpfProgram, which passes an additional []byte as input skb metadata and returns an additional []byte as output skb metadata. By utilizing this function, we ensure that the skb->mark set in PKTGEN can be properly passed to the SETUP , and any modifications to skb->mark or skb->cb can be accurately examined during the CHECK for validation purposes. The input ctx bytes will be set as the input skb, briefly you can expect `memcpy(skb, ctx, sizeof(*skb))` happening inside, and you can get skb->mark by `mark := ctx[offset(skb, mark): sizeof(skb->mark)]`. Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
1 parent 5039106
File | Mode | Size |
---|---|---|
.devcontainer | ||
.github | ||
.nvim | ||
.travis | ||
.vscode | ||
Documentation | ||
api | ||
bpf | ||
bugtool | ||
cilium | ||
cilium-health | ||
clustermesh-apiserver | ||
contrib | ||
daemon | ||
envoy | ||
examples | ||
hack | ||
hubble-relay | ||
images | ||
install | ||
jenkinsfiles | ||
kvstoremesh | ||
operator | ||
pkg | ||
plugins | ||
proxylib | ||
test | ||
tools | ||
vendor | ||
.authors.aux | -rw-r--r-- | 416 bytes |
.clang-format | -rw-r--r-- | 3.9 KB |
.clomonitor.yml | -rw-r--r-- | 984 bytes |
.gitattributes | -rw-r--r-- | 887 bytes |
.gitignore | -rw-r--r-- | 1.8 KB |
.golangci.yaml | -rw-r--r-- | 3.6 KB |
.mailmap | -rw-r--r-- | 6.4 KB |
.travis.yml | -rw-r--r-- | 506 bytes |
AUTHORS | -rw-r--r-- | 40.6 KB |
CODEOWNERS | -rw-r--r-- | 24.7 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 2.2 KB |
CONTRIBUTING.md | -rw-r--r-- | 691 bytes |
FURTHER_READINGS.rst | -rw-r--r-- | 6.4 KB |
LICENSE | -rw-r--r-- | 11.1 KB |
MAINTAINERS.md | -rw-r--r-- | 4.3 KB |
Makefile | -rw-r--r-- | 34.7 KB |
Makefile.defs | -rw-r--r-- | 6.9 KB |
Makefile.docker | -rw-r--r-- | 7.3 KB |
Makefile.quiet | -rw-r--r-- | 818 bytes |
README.rst | -rw-r--r-- | 19.4 KB |
SECURITY.md | -rw-r--r-- | 1.0 KB |
USERS.md | -rw-r--r-- | 28.3 KB |
VERSION | -rw-r--r-- | 11 bytes |
Vagrantfile | -rw-r--r-- | 14.9 KB |
go.mod | -rw-r--r-- | 12.3 KB |
go.sum | -rw-r--r-- | 154.9 KB |
netlify.toml | -rw-r--r-- | 92 bytes |
stable.txt | -rw-r--r-- | 8 bytes |
vagrant_box_defaults.rb | -rw-r--r-- | 334 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...