Lines Matching refs:info
524 static int vdpa_nl_cmd_mgmtdev_get_doit(struct sk_buff *skb, struct genl_info *info)
535 mdev = vdpa_mgmtdev_get_from_attr(info->attrs);
538 NL_SET_ERR_MSG_MOD(info->extack, "Fail to find the specified mgmt device");
543 err = vdpa_mgmtdev_fill(mdev, msg, info->snd_portid, info->snd_seq, 0);
547 err = genlmsg_reply(msg, info);
595 static int vdpa_nl_cmd_dev_add_set_doit(struct sk_buff *skb, struct genl_info *info)
598 struct nlattr **nl_attrs = info->attrs;
606 if (!info->attrs[VDPA_ATTR_DEV_NAME])
609 name = nla_data(info->attrs[VDPA_ATTR_DEV_NAME]);
625 NL_SET_ERR_MSG_MOD(info->extack,
647 NL_SET_ERR_MSG_FMT_MOD(info->extack,
665 mdev = vdpa_mgmtdev_get_from_attr(info->attrs);
667 NL_SET_ERR_MSG_MOD(info->extack, "Fail to find the specified management device");
673 NL_SET_ERR_MSG_FMT_MOD(info->extack,
683 NL_SET_ERR_MSG_MOD(info->extack,
692 NL_SET_ERR_MSG_MOD(info->extack,
704 static int vdpa_nl_cmd_dev_del_set_doit(struct sk_buff *skb, struct genl_info *info)
712 if (!info->attrs[VDPA_ATTR_DEV_NAME])
714 name = nla_data(info->attrs[VDPA_ATTR_DEV_NAME]);
719 NL_SET_ERR_MSG_MOD(info->extack, "device not found");
725 NL_SET_ERR_MSG_MOD(info->extack, "Only user created device can be deleted by user");
785 static int vdpa_nl_cmd_dev_get_doit(struct sk_buff *skb, struct genl_info *info)
793 if (!info->attrs[VDPA_ATTR_DEV_NAME])
795 devname = nla_data(info->attrs[VDPA_ATTR_DEV_NAME]);
803 NL_SET_ERR_MSG_MOD(info->extack, "device not found");
812 err = vdpa_dev_fill(vdev, msg, info->snd_portid, info->snd_seq, 0, info->extack);
816 err = genlmsg_reply(msg, info);
839 struct vdpa_dev_dump_info *info = data;
844 if (info->idx < info->start_idx) {
845 info->idx++;
848 err = vdpa_dev_fill(vdev, info->msg, NETLINK_CB(info->cb->skb).portid,
849 info->cb->nlh->nlmsg_seq, NLM_F_MULTI, info->cb->extack);
853 info->idx++;
859 struct vdpa_dev_dump_info info;
861 info.msg = msg;
862 info.cb = cb;
863 info.start_idx = cb->args[0];
864 info.idx = 0;
867 bus_for_each_dev(&vdpa_bus, NULL, &info, vdpa_dev_dump);
869 cb->args[0] = info.idx;
1010 struct genl_info *info, u32 index)
1019 NL_SET_ERR_MSG_MOD(info->extack, "feature negotiation not complete");
1036 err = vdev->config->get_vendor_vq_stats(vdev, index, msg, info->extack);
1044 struct genl_info *info, u32 index)
1054 err = vdpa_fill_stats_rec(vdev, msg, info, index);
1062 struct genl_info *info, u32 index)
1067 u32 portid = info->snd_portid;
1068 u32 seq = info->snd_seq;
1090 NL_SET_ERR_MSG_MOD(info->extack, "queue index exceeds max value");
1095 err = vendor_stats_fill(vdev, msg, info, index);
1110 static int vdpa_nl_cmd_dev_config_get_doit(struct sk_buff *skb, struct genl_info *info)
1118 if (!info->attrs[VDPA_ATTR_DEV_NAME])
1120 devname = nla_data(info->attrs[VDPA_ATTR_DEV_NAME]);
1128 NL_SET_ERR_MSG_MOD(info->extack, "device not found");
1134 NL_SET_ERR_MSG_MOD(info->extack, "unmanaged vdpa device");
1138 err = vdpa_dev_config_fill(vdev, msg, info->snd_portid, info->snd_seq,
1139 0, info->extack);
1141 err = genlmsg_reply(msg, info);
1155 struct vdpa_dev_dump_info *info = data;
1160 if (info->idx < info->start_idx) {
1161 info->idx++;
1164 err = vdpa_dev_config_fill(vdev, info->msg, NETLINK_CB(info->cb->skb).portid,
1165 info->cb->nlh->nlmsg_seq, NLM_F_MULTI,
1166 info->cb->extack);
1170 info->idx++;
1177 struct vdpa_dev_dump_info info;
1179 info.msg = msg;
1180 info.cb = cb;
1181 info.start_idx = cb->args[0];
1182 info.idx = 0;
1185 bus_for_each_dev(&vdpa_bus, NULL, &info, vdpa_dev_config_dump);
1187 cb->args[0] = info.idx;
1192 struct genl_info *info)
1201 if (!info->attrs[VDPA_ATTR_DEV_NAME])
1204 if (!info->attrs[VDPA_ATTR_DEV_QUEUE_INDEX])
1207 devname = nla_data(info->attrs[VDPA_ATTR_DEV_NAME]);
1212 index = nla_get_u32(info->attrs[VDPA_ATTR_DEV_QUEUE_INDEX]);
1216 NL_SET_ERR_MSG_MOD(info->extack, "device not found");
1222 NL_SET_ERR_MSG_MOD(info->extack, "unmanaged vdpa device");
1226 err = vdpa_dev_vendor_stats_fill(vdev, msg, info, index);
1230 err = genlmsg_reply(msg, info);