diff --git a/README.md b/README.md index 00348d05f..b5d8d470f 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ which are available on a Kubernetes host - Supports devices with both Kernel and userspace (UIO and VFIO) drivers - Allows resource grouping using "Selector" - User configurable resourceName +- User configurable policy for preferred device allocation - Detects Kubelet restarts and auto-re-register - Detects Link status (for Linux network devices) and updates associated VFs health accordingly - Extensible to support new device types with minimal effort if not already supported @@ -261,17 +262,27 @@ This plugin creates device plugin endpoints based on the configurations given in `"resourceList"` should contain a list of config objects. Each config object may consist of following fields: -| Field | Required | Description | Type/Defaults | Example/Accepted values | -|-------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|------------------------------------------------------------------------| -| "resourceName" | Y | Endpoint resource name. Should not contain special characters including hyphens and must be unique in the scope of the resource prefix | string | "sriov_net_A" | -| "resourcePrefix" | N | Endpoint resource prefix name override. Should not contain special characters | string Default : "intel.com" | "yourcompany.com" | -| "deviceType" | N | Device Type for a resource pool. | string value of supported types. Default: "netDevice" | Currently supported values: "accelerator", "netDevice", "auxNetDevice" | -| "excludeTopology" | N | Exclude advertising of device's NUMA topology | bool Default: "false" | "excludeTopology": true | -| "selectors" | N | A map of device selectors. The "deviceType" value determines the "selectors" options. | json object as string Default: null | Example: "selectors": {"vendors": ["8086"],"devices": ["154c"]} | -| "additionalInfo" | N | A map of map to add additional information to the pod via environment variables to devices | json object as string Default: null | Example: "additionalInfo": {"*": {"token": "3e49019f-412f-4f02-824e-4cd195944205"}} | +| Field | Required | Description | Type/Defaults | Example/Accepted values | +|--------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------| +| "resourceName" | Y | Endpoint resource name. Should not contain special characters including hyphens and must be unique in the scope of the resource prefix | string | "sriov_net_A" | +| "resourcePrefix" | N | Endpoint resource prefix name override. Should not contain special characters | string Default : "intel.com" | "yourcompany.com" | +| "deviceType" | N | Device Type for a resource pool. | string value of supported types. Default: "netDevice" | Currently supported values: "accelerator", "netDevice", "auxNetDevice" | +| "allocationPolicy" | N | Preferred device allocation policy for a resource pool | string value of supported allocation policy. Default: "" | Currently supported values: "", "packed" | +| "excludeTopology" | N | Exclude advertising of device's NUMA topology | bool Default: "false" | "excludeTopology": true | +| "selectors" | N | A map of device selectors. The "deviceType" value determines the "selectors" options. | json object as string Default: null | Example: "selectors": {"vendors": ["8086"],"devices": ["154c"]} | +| "additionalInfo" | N | A map of map to add additional information to the pod via environment variables to devices | json object as string Default: null | Example: "additionalInfo": {"*": {"token": "3e49019f-412f-4f02-824e-4cd195944205"}} | Note: "resourceName" must be unique only in the scope of a given prefix, including the one specified globally in the CLI params, e.g. "example.com/10G", "acme.com/10G" and "acme.com/40G" are perfectly valid names. +#### Allocation Policy + +The "allocationPolicy" value determines which device in a resource pool is allocated. Each policy acts as following: + +| Policy | Description | +|----------|---------------------------------------------------| +| "" | Disable preferred device allocation functionality | +| "packed" | Try to allocate VFs from same PF | + #### Device selectors The "deviceType" value determines which selectors are supported for that device. Each selector evaluated in order as listed in selector tables below.