add_config
add_config(conf, param, value[0], 0, 0, value[1]);
add_config(conf, param, value[0], value[1], value[2], value[3]);
ret = add_config(dev, &configs, &num_configs, config);
const struct vdpa_dev_set_config *add_config)
if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_FEATURES)) {
if (add_config->device_features & ~device_features) {
add_config->device_features, device_features);
device_features &= add_config->device_features;
if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MAX_VQP)) {
if (add_config->net.max_vq_pairs > max_vqs / 2)
max_vqs = min_t(u32, max_vqs, 2 * add_config->net.max_vq_pairs);
if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MTU)) {
err = config_func_mtu(mdev, add_config->net.mtu);
if (add_config->mask & (1 << VDPA_ATTR_DEV_NET_CFG_MACADDR)) {
memcpy(ndev->config.mac, add_config->net.mac, ETH_ALEN);
} else if ((add_config->mask & BIT_ULL(VDPA_ATTR_DEV_FEATURES)) == 0 ||
} else if ((add_config->mask & BIT_ULL(VDPA_ATTR_DEV_FEATURES)) == 0) {
const struct vdpa_dev_set_config *add_config)
if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MACADDR)) {
(u8 *)add_config->net.mac);
const struct vdpa_dev_set_config *add_config)
if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_FEATURES)) {
add_config->device_features & ~pdsv->supported_features;
pdsv->supported_features = add_config->device_features;
if (add_config->mask & (1 << VDPA_ATTR_DEV_NET_CFG_MAX_VQP))
vq_pairs = add_config->net.max_vq_pairs;
if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MACADDR)) {
ether_addr_copy(pdsv->mac, add_config->net.mac);
const struct vdpa_dev_set_config *add_config)
if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_FEATURES)) {
if (add_config->device_features & ~device_features) {
device_features, add_config->device_features);
device_features = add_config->device_features;