CentaurusInfra / fornax

Fornax for autonomous and flexible edge computing
Apache License 2.0
8 stars 16 forks source link

Modify transit XDP to fork action based on gateway check #64

Closed pdgetrf closed 2 years ago

pdgetrf commented 2 years ago

The transit XDP on the gateway host behaves differently from it on none-gateway hosts. This host is to add the code to split function based on whether the XDP is on the gateway or not.

Determine whether we are on a gateway

if (pkt->ip->daddr == gateway_host_ip) {
...
}

gateway_host_ip is obtained from work in #63.

On the gateway host

  • [x] If dst ip is internal, process as usual. This is assuming gateway host could also run normal pods. Gateway host will not be bouncer or divider of internal subnets but still could accept traffic destined to pods.
  • [x] If dst ip is external (remote subnet), send to user space

On none-gateway host ("Muggle" host)

pdgetrf commented 2 years ago

pending #63 for actual control plane data to use