tjcw / bpf-examples

Making eBPF programming easier via build env and examples
0 stars 1 forks source link

Reinject packet to source node's transmit queue #5

Open tjcw opened 1 year ago

tjcw commented 1 year ago

At the moment, packets are reinjected to the destination node's transmit queue. This is OK when there are only 2 namespaces involved, but becomes cumbersome as the number of namespaces increases as would be the case in a Kubernetes system. This issue will change to using the source node's transmit queue, from where linux kerne; routing weill get the packet to the right destination. The packet will not be directed to user space a second time because the map is updated before the packet arrives again.

tjcw commented 1 year ago

This works now in branch tjcw-integration-1.6 at commit aef2a5f51837effba86951ae9dc3917cf4b21715 . The run scripty for this version of the test case is AF_XDP-filter/ping-namespace-direct-with-dummy-at-source/run.sh .