1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-15 17:50:49 +00:00
Commit graph

14 commits

Author SHA1 Message Date
Carlos Eduardo Arango Gutierrez
1230945564
make golint happy
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2021-06-14 12:27:58 -05:00
Jorik Jonker
d857f88d2d Add support for using USB device serial number
In my homelab, I have different FTDI serial converters connected to
several utility meters. They all have identical vendor/device, but
different serials.

In order to detect a specific FTDI unit (eg.  the one connected to my
electricity meter), I'd like feature labels triggered by a specific USB
serial.

Signed-off-by: Jorik Jonker <jorik@kippendief.biz>
2021-05-06 13:34:39 +00:00
Jan Schintag
5871207588 Mount /usr/lib and /usr/src inside the Pod
Mount /usr/lib and /usr/src as /host-usr/lib and /host-usr/src inside the pod
to allow NFD to search for the kernel configuration file inside /usr.
This solves the problem of the kernel config file not being present in /boot
on s390x RHCOS.

Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
2021-04-26 16:47:37 +02:00
Carlos Eduardo Arango Gutierrez
389a8f87cf
logging: start log messages with lower case
Standarize logs to be lower case.

Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2021-03-01 10:07:21 -05:00
Markus Lehtonen
7da7fde8f6 nfd-worker: switch to klog
Greatly expands logging capabilities and flexibility with verbosity
options, among other things.
2021-02-25 16:10:43 +02:00
Mikko Ylinen
07bc50d5a8 go.mod: update to klauspost/cpuid/v2@v2.02
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-12-15 15:56:15 +02:00
Mikko Ylinen
94f49b9418 go.mod: update klauspost/cpuid
The latest changes in klauspost/cpuid add detection for Sapphire Rapids
new instructions.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-11-30 19:04:41 +02:00
Mikko Ylinen
8b156d49fc source/kernel: add internal helper to get kernel version
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-14 12:07:35 +03:00
Mikko Ylinen
aeb7583315 source/kernel: move kconfig to a shared internal package
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-14 12:07:33 +03:00
Mikko Ylinen
109da6c980 source/cpu: move cpuid code to a shared internal package
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-14 10:32:04 +03:00
Markus Lehtonen
67d7887949 source: perform all sysfs discovery under host sysfs
Be consistent and do all sysfs based feature discovery under the same
sysfs directory.
2020-05-20 22:15:41 +03:00
Markus Lehtonen
640dc9fbf3 source: miscellaneous lint fixes 2020-05-20 21:48:06 +03:00
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
Adrian Chiris
a1a2429df1 Move PCI introspection logic to its own internal package
This will enable code reuse across sources while preventing
packages which are not under 'source' to import it.

subsequent commits will introduce the 'custom' source which
will use the logic.
2020-03-12 15:09:27 +02:00