The KPI allows to store arbitrary data within struct device, retrieve it back by name, and update the value. The data is automatically destroyed on the device deletion. Also, the user can request to clear the named property from all devices. My need for this interface is due to IOMMU needing to save some indicator on device, which must survive the re-creation of the domain context.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
osd was my initial thought when I realized that I need this. But looking closely at interface, and realizing that I need to modify osd.h just to add my new osd type made me much less enthusiastic.
Also, osd would need too much rituals to be used: slots are identified by ints, while I can name them directly by iommu devunit name, etc, the overhead of osd is by order higher both in locking and in memory use. My code also has a way to conveniently destroy properties on either device or consumer destruction.