SIGN IN SIGN UP

Implement the RDMA netlink protocol for device discovery.

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.
A
Alan Duan committed
ff02bc5c5932ac8dcc1933d2663b0147855c5841
Parent: 373368b