This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat kind support map pinning v3 (#67)
* bpf: map pinning support * cleanup: comments in bpfWrapper.c * dpcnisyncer: basic signalling from CNI to DP * dpcnisyncer: delete BPFFS signalled from CNI * pool-manager: dp-cni-syncer cleanup * SyncServer: one server for all BPF map managers * pool-manager: remove map cleanup * dpcnisyncer: add clean up * Makefile: Add missing copyright tag * fixup: unit tests * fixup: static analysis * linter: add directive to ignore generated code * fixup: fuzzing test * Add missing protobuf dependency * syncer: explicit configuration * plugin: updates after rebase * bpfwrapper: use libxdp for redirect program * cleanup: dead/commented code * linter error: run clang format --------- Signed-off-by: Maryam Tahhan <[email protected]>
- Loading branch information
1 parent
db2fd90
commit 0ccf674
Showing
29 changed files
with
1,212 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# A working example of BPF MAP PINNING | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: cndp-0-0 | ||
annotations: | ||
k8s.v1.cni.cncf.io/networks: afxdp-network | ||
spec: | ||
containers: | ||
- name: cndp-0 | ||
command: ["/bin/bash"] | ||
args: ["-c", "./jsonc_gen.sh -kp ; cndpfwd -c config.jsonc lb;"] | ||
image: quay.io/mtahhan/cndp-map-pinning:latest | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
privileged: true | ||
#capabilities: | ||
#add: | ||
# - NET_RAW | ||
# - IPC_LOCK | ||
# - BPF | ||
resources: | ||
requests: | ||
afxdp/myPool: '1' | ||
limits: | ||
afxdp/myPool: '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# WARNING: This is an example definition only. Remove all comments before use. | ||
|
||
apiVersion: "k8s.cni.cncf.io/v1" | ||
kind: NetworkAttachmentDefinition | ||
metadata: | ||
name: afxdp-network # Name of this network, pods will request this network by name | ||
annotations: | ||
k8s.v1.cni.cncf.io/resourceName: afxdp/myPool # Needs to match the device plugin pool name / resource type | ||
spec: | ||
config: '{ | ||
"cniVersion": "0.3.0", | ||
"type": "afxdp", # CNI binary, leave as afxdp | ||
"mode": "primary", # CNI mode setting (required) | ||
"logFile": "afxdp-cni.log", # CNI log file location (optional) | ||
"logLevel": "debug", # CNI logging level (optional) | ||
"dpSyncer": true, # Sync with Device Plugin over gRPC MUST BE SET for bpf map pinning | ||
"ipam": { # CNI IPAM plugin and associated config (optional) | ||
"type": "host-local", | ||
"subnet": "192.168.1.0/24", | ||
"rangeStart": "192.168.1.200", | ||
"rangeEnd": "192.168.1.220", | ||
"routes": [ | ||
{ "dst": "0.0.0.0/0" } | ||
], | ||
"gateway": "192.168.1.1" | ||
} | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.