containernetworking / cni

Container Network Interface - networking for Linux containers
https://cni.dev
Apache License 2.0
5.57k stars 1.08k forks source link

GC Improvement #1091

Open s1061123 opened 6 months ago

s1061123 commented 6 months ago

Currently GC calls with cni.dev/valid-attachments arguments, to specify current valid attachments based on network config.

https://github.com/containernetworking/cni/blob/c04330ee9e0bb932e1e3eda757813e2f212e746b/libcni/api.go#L113

If there is multiple network config (one or more CNI is configured in container runtime or by multus), then one plugin may receives multiple GC calls for each network config. (e.g. pluginA GC for config1 and pluignA GC for config2). GC takes a bit huge computation cost, so we should optimize it as much as we can.

Hence we could improve GC calls by

maiqueb commented 5 months ago

/cc