Lines Matching refs:schema

156 pci_iov_schema_add_bool(nvlist_t *schema, const char *name, uint32_t flags,
163 nvlist_set_error(schema, ENOMEM);
172 nvlist_move_nvlist(schema, name, entry);
176 pci_iov_schema_add_string(nvlist_t *schema, const char *name, uint32_t flags,
183 nvlist_set_error(schema, ENOMEM);
192 nvlist_move_nvlist(schema, name, entry);
196 pci_iov_schema_int(nvlist_t *schema, const char *name, const char *type,
203 nvlist_set_error(schema, ENOMEM);
212 nvlist_move_nvlist(schema, name, entry);
216 pci_iov_schema_add_uint8(nvlist_t *schema, const char *name, uint32_t flags,
220 pci_iov_schema_int(schema, name, "uint8_t", flags, defaultVal);
224 pci_iov_schema_add_uint16(nvlist_t *schema, const char *name, uint32_t flags,
228 pci_iov_schema_int(schema, name, "uint16_t", flags, defaultVal);
232 pci_iov_schema_add_uint32(nvlist_t *schema, const char *name, uint32_t flags,
236 pci_iov_schema_int(schema, name, "uint32_t", flags, defaultVal);
240 pci_iov_schema_add_uint64(nvlist_t *schema, const char *name, uint32_t flags,
244 pci_iov_schema_int(schema, name, "uint64_t", flags, defaultVal);
248 pci_iov_schema_add_unicast_mac(nvlist_t *schema, const char *name,
255 nvlist_set_error(schema, ENOMEM);
264 nvlist_move_nvlist(schema, name, entry);
407 pci_iov_validate_param_schema(const nvlist_t *schema)
414 if (!nvlist_exists_string(schema, TYPE_SCHEMA_NAME))
416 type = nvlist_get_string(schema, TYPE_SCHEMA_NAME);
423 if (nvlist_exists(schema, DEFAULT_SCHEMA_NAME)) {
424 error = validator->default_validate(validator, schema);
429 if (nvlist_exists(schema, REQUIRED_SCHEMA_NAME))
434 if (nvlist_exists(schema, REQUIRED_SCHEMA_NAME)) {
435 if (!nvlist_exists_bool(schema, REQUIRED_SCHEMA_NAME))
469 * Validate that the driver schema does not define any configuration parameters
470 * whose names collide with configuration parameters defined in the iov schema.
494 * device schema node.
514 pci_iov_validate_device_schema(const nvlist_t *schema, const char *name)
519 if (!nvlist_exists_nvlist(schema, name))
521 dev_schema = nvlist_get_nvlist(schema, name);
539 /* Validate that we only have PF and VF devices beneath the top-level schema. */
558 pci_iov_validate_schema(const nvlist_t *schema)
562 error = pci_iov_validate_device_schema(schema, PF_CONFIG_NAME);
566 error = pci_iov_validate_device_schema(schema, VF_SCHEMA_NAME);
570 return (pci_iov_validate_schema_devices(schema));
574 * Validate that all required parameters from the schema are specified in the
579 pci_iov_schema_validate_required(const nvlist_t *schema, nvlist_t *config)
587 while ((name = nvlist_next(schema, &type, &cookie)) != NULL) {
588 param_schema = nvlist_get_nvlist(schema, name);
620 * Validate that all parameters in config are defined in the schema. Also
621 * validate that the type of the parameter matches the type in the schema.
624 pci_iov_schema_validate_types(const nvlist_t *schema, const nvlist_t *config)
633 if (!nvlist_exists_nvlist(schema, name))
636 schema_param = nvlist_get_nvlist(schema, name);
649 pci_iov_schema_validate_device(const nvlist_t *schema, nvlist_t *config,
660 device_schema = nvlist_get_nvlist(schema, schema_device);
709 pci_iov_schema_validate_vfs(const nvlist_t *schema, nvlist_t *config,
718 error = pci_iov_schema_validate_device(schema, config,
830 pci_iov_schema_validate_config(const nvlist_t *schema, nvlist_t *config)
835 error = pci_iov_schema_validate_device(schema, config, PF_CONFIG_NAME,
842 error = pci_iov_schema_validate_vfs(schema, config, num_vfs);
863 /* Allocate a new empty schema node. */