-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass DeviceID to each plugin in configuration list #448
Pass DeviceID to each plugin in configuration list #448
Conversation
Until today, it was hardcoded that DeviceID will only be injected for the first CNI in the chain. This commit modifies multus to pass DeviceID to each network configuration element in a network configuration list. This will allow multiple CNI's to act on DeviceID when CNI plugins are being chained for a specific network. The change is required to allow CNI's to ensure network isolation (introduced in kernel >= 5.2.0 see [1]) for RDMA devices when exist. e.g for SR-IOV network: sriov-cni moves network device associated with the provided DeviceID to to the container's network namespace. An "RDMA cni" would do the same for the corresponding RDMA device when RDMA traffic is desired on the network. [1] https://patchwork.kernel.org/cover/10810451/
General direction looks good to me, and makes sense -- looks like this fills a gap that we're missing by only catching the first one. Any input from @zshi-redhat or @ahalim-intel from an SR-IOV point of view? |
I agree with Doug on this is a reasonable change. I got one question regarding the example:
when using RoCE mode, we only need one VF device in pod/container which is moved to pod net namespace by sriov-cni, how above example differs from RoCE usage? I assume the application will need two device specs or descriptors in pod, one is for normal VF net dev spec, the other is for infiniband dev spec? |
To send RDMA traffic you need an RDMA device(regardless of the underlying protocol e.g RoCE, Infiniband, iWARP) Today RDMA subsystem network namespace awareness mode is set to if Kernel RDMA subsystem network namespace awareness mode is set to The mounts under /dev/infiniband are still needed but are not related to CNI. |
So for using RDMA in |
you just run rdma tool on a setup with RDMA capable devices root# rdma dev show |
exactly |
thanks! this looks good tome. |
@zshi-redhat thank you for the review! LGTM, so let's merge it tomorrow (to wait more q). |
@adrianchiris merged, thank you so much for that! |
Thank you :) |
Until today, it was hardcoded that DeviceID will only be
injected for the first CNI in the chain.
This commit modifies multus to pass DeviceID to each network
configuration element in a network configuration list.
This will allow multiple CNI's to act on DeviceID when CNI
plugins are being chained for a specific network.
The change is required to allow CNI's to ensure network
isolation (introduced in kernel >= 5.2.0 see [1]) for RDMA devices
when exist.
e.g for SR-IOV network:
sriov-cni moves network device associated with the provided DeviceID
to to the container's network namespace.
An "RDMA cni" would do the same for the corresponding RDMA device when
RDMA traffic is desired on the network.
[1] https://patchwork.kernel.org/cover/10810451/