I am trying to understand how the AF_XDP plugin for K8s works, correct me if I am wrong.
In Primary mode
Packets Flow:
packets -> primary device(physical NIC) -> NIC Driver(applies the XDP program at the hook) -> AF_XDP socket(outside the pod) -> pod
Components Role:
AF_XDP plugin is responsible to create af_xdp sockets for each pod
AF_XDP CNI is responsible for configuring the network interfaces of the pods
In CDQ mode
Packets Flow:
packets -> primary device(physical NIC) -> NIC Driver(applies the XDP program at the hook) -> subfunction(resides outside the pod but in the userspace) -> AF_XDP socket(outside the pod) -> pod
Components Role:
NIC Driver creates the subfunction and assigns it to AF_XDP CNI to manage.
AF_XDP plugin creates the AF_XDP socket at the userspace, outside the pod. it commands the driver to create a new subfunction(outside the pod) based on requirements.
AF_XDP CNI is responsible for assigning subfunctions to the respective pods.
Note: I had seen the image of AF_XDP high-level Arch, but not sure about the implementation of the subfunction and AF_XDP socket inside the pod. Correct me if it is implemented the same as what was there.
Working of AF_XDP Plugin
I am trying to understand how the AF_XDP plugin for K8s works, correct me if I am wrong.
In Primary mode
Packets Flow:
packets -> primary device(physical NIC) -> NIC Driver(applies the XDP program at the hook) -> AF_XDP socket(outside the pod) -> pod
Components Role:
In CDQ mode
Packets Flow:
packets -> primary device(physical NIC) -> NIC Driver(applies the XDP program at the hook) -> subfunction(resides outside the pod but in the userspace) -> AF_XDP socket(outside the pod) -> pod
Components Role:
Note: I had seen the image of AF_XDP high-level Arch, but not sure about the implementation of the subfunction and AF_XDP socket inside the pod. Correct me if it is implemented the same as what was there.
Thank you in advance!