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
If pkt is a valid geneve pkt
[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
[x] if src ip is not a valid geneve pkt (e.g. sent from another gateway), pass pkt to user space
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
gateway_host_ip is obtained from work in #63.
On the gateway host
On none-gateway host ("Muggle" host)