rdmaproxy: Adding support for Google NICs with netlink-based device discovery and generic driver - #14119
Merged
Merged
Conversation
Libibverbs, in the function ibv_get_device_list, uses netlink to discover devices available on a machine. If netlink is not supported, it will scan the sysfs tree and collect information about devices there as a fallback. In the second phase of device discovery, any devices are matched with a known driver. If a device was found through netlink, a driver is automatically matched, while devices found with sysfs will have to be matched to a driver through a known vendor PCI ID table. Google's custom rNICs are not in the rdma-core table, and so device discovery does not work with the current form of rdmaproxy out of the box. All information required by the protocol is gathered during the RDMA sysfs snapshot collection, before chroot. Then any netlink messages produced by a guest process will be served using the data collected in the snapshot, so the sentry never has to make a real netlink request to the kernel. We also add "resource" to the list of pciAttrNames because pcilib needs it to be exposed to consider a device non-corrupt.
…lugin. We create a new generic plugin for rdmaproxy. Such a plugin is needed because in iRDMA, CQ and QPs are actually implemented as MRs, which already get handled correctly by rdmaproxy core. Furthermore, these MRs are indexed by virtual addresses, so a guest VA is never dereferenced in kernel space for CQ/QP operations. Therefore a specialized driver plugin to rdmaproxy is not required. Since we still have to register a driver-plugin for each device at registration time, we instead register a generic plugin which does nothing. We only register the generic plugin for an allow-list of drivers such as idpf or ice, which are all managed by the irdma subsystem.
copybara-service
Bot
force-pushed
the
test/cl962956856
branch
2 times, most recently
from
August 14, 2026 18:26
0b8cd6b to
cee1372
Compare
PiperOrigin-RevId: 964820056
copybara-service
Bot
force-pushed
the
test/cl962956856
branch
from
August 14, 2026 19:11
cee1372 to
32d6f00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rdmaproxy: Adding support for Google NICs with netlink-based device discovery and generic driver
Addresses #13686.
This PR adds support for Google NICs using the RDMA-Falcon stack. It adds two main features:
In libibverbs, in the function
ibv_get_device_list, uses netlink to discoverdevices available on a machine. If netlink is not supported, it will scan the
sysfs tree and collect information about devices there as a fallback. In the
second phase of device discovery, any devices are matched with a known driver.
If a device was found through netlink, a driver is automatically matched, while
devices found with sysfs will have to be matched to a driver through a known
vendor PCI ID table. Google's custom rNICs are not in the rdma-core table, and
so device discovery does not work with the current form of rdmaproxy out of the
box.
All information required by the protocol is gathered during the RDMA sysfs
snapshot collection, before chroot. Then any netlink messages produced by a
guest process will be served using the data collected in the snapshot, so the
sentry never has to make a real netlink request to the kernel.
A generic plugin is needed because in iRDMA, CQ and QPs are actually implemented
as MRs, which already get handled correctly by rdmaproxy core. Furthermore, these
MRs are indexed by virtual addresses, so a guest VA is never dereferenced in kernel
space for CQ/QP operations. Therefore a specialized driver plugin to rdmaproxy is not
required.
Since we still have to register a driver-plugin for each device at registration
time, we instead register a generic plugin which does nothing. We only register
the generic plugin for an allow-list of drivers such as idpf or ice, which are
all managed by the irdma subsystem.
Tested with successful completion of
ib_write_bw,ibv_rc_pingpongbetween two h4dGCE VMs that achieves parity with un-sandboxed bandwidth rates.
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14021 from TheCoolDinosuar:rdma-proxy 863a49d