1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/source
Paul Mundt c0ea69411b usb: Add support for USB device discovery
This builds on the PCI support to enable the discovery of USB devices.

This is primarily intended to be used for the discovery of Edge-based
heterogeneous accelerators that are connected via USB, such as the Coral
USB Accelerator and the Intel NCS2 - our main motivation for adding this
capability to NFD, and as part of our work in the SODALITE H2020
project.

USB devices may define their base class at either the device or
interface levels. In the case where no device class is set, the
per-device interfaces are enumerated instead. USB devices may
furthermore have multiple interfaces, which may or may not use the
identical class across each interface. We therefore report device
existence for each unique class definition to enable more fine-grained
labelling and node selection.

The default labelling format includes the class, vendor and device
(product) IDs, as follows:

	feature.node.kubernetes.io/usb-fe_1a6e_089a.present=true

As with PCI, a subset of device classes are whitelisted for matching.
By default, there are only a subset of device classes under which
accelerators tend to be mapped, which is used as the basis for
the whitelist. These are:

	- Video
	- Miscellaneous
	- Application Specific
	- Vendor Specific

For those interested in matching other classes, this may be extended
by using the UsbId rule provided through the custom source. A full
list of class codes is provided by the USB-IF at:

	https://www.usb.org/defined-class-codes

For the moment, owing to a lack of a demonstrable use case, neither
the subclass nor the protocol information are exposed. If this
becomes necessary, support for these attributes can be trivially
added.

Signed-off-by: Paul Mundt <paul.mundt@adaptant.io>
2020-05-20 16:18:39 +02:00
..
cpu source/cpu: drop leftover debug print 2020-04-22 21:29:19 +03:00
custom usb: Add support for USB device discovery 2020-05-20 16:18:39 +02:00
fake Import from sigs.k8s.io/node-feature-discovery 2018-12-04 15:15:46 +02:00
internal usb: Add support for USB device discovery 2020-05-20 16:18:39 +02:00
iommu Import from sigs.k8s.io/node-feature-discovery 2018-12-04 15:15:46 +02:00
kernel kernel: fix undefined symbol error 2019-06-10 15:25:41 +03:00
local Allow to change labels namespace 2019-05-09 13:17:52 -07:00
memory source/memory: detect NVDIMM DAX mode 2019-06-11 09:58:30 +03:00
network Drop glog based logging 2019-04-25 17:14:58 +03:00
panic_fake Import from sigs.k8s.io/node-feature-discovery 2018-12-04 15:15:46 +02:00
pci usb: Add support for USB device discovery 2020-05-20 16:18:39 +02:00
storage Import from sigs.k8s.io/node-feature-discovery 2018-12-04 15:15:46 +02:00
system source/system: do not publish empty version labels 2020-03-20 10:16:01 +02:00
usb usb: Add support for USB device discovery 2020-05-20 16:18:39 +02:00
mock_FeatureSource.go Re-generate mock sources 2019-04-04 22:40:24 +03:00
source.go Support for non-binary labels 2018-10-10 13:21:49 +03:00