Lines Matching full:nic

332     NICState *nic;  in qemu_new_nic()  local
338 nic = g_malloc0(info->size + sizeof(NetClientState) * queues); in qemu_new_nic()
339 nic->ncs = (void *)nic + info->size; in qemu_new_nic()
340 nic->conf = conf; in qemu_new_nic()
341 nic->reentrancy_guard = reentrancy_guard, in qemu_new_nic()
342 nic->opaque = opaque; in qemu_new_nic()
345 qemu_net_client_setup(&nic->ncs[i], info, peers[i], model, name, in qemu_new_nic()
347 nic->ncs[i].queue_index = i; in qemu_new_nic()
350 return nic; in qemu_new_nic()
353 NetClientState *qemu_get_subqueue(NICState *nic, int queue_index) in qemu_get_subqueue() argument
355 return nic->ncs + queue_index; in qemu_get_subqueue()
358 NetClientState *qemu_get_queue(NICState *nic) in qemu_get_queue() argument
360 return qemu_get_subqueue(nic, 0); in qemu_get_queue()
372 NICState *nic = qemu_get_nic(nc); in qemu_get_nic_opaque() local
374 return nic->opaque; in qemu_get_nic_opaque()
432 * If there is a peer NIC, transfer ownership to it. Delete the client in qemu_del_net_client()
433 * from net_client list but do not cleanup nor free. This way NIC can in qemu_del_net_client()
436 * The cleanup and free will be done when the NIC is free. in qemu_del_net_client()
439 NICState *nic = qemu_get_nic(nc->peer); in qemu_del_net_client() local
440 if (nic->peer_deleted) { in qemu_del_net_client()
443 nic->peer_deleted = true; in qemu_del_net_client()
463 void qemu_del_nic(NICState *nic) in qemu_del_nic() argument
465 int i, queues = MAX(nic->conf->peers.queues, 1); in qemu_del_nic()
467 qemu_macaddr_set_free(&nic->conf->macaddr); in qemu_del_nic()
470 NetClientState *nc = qemu_get_subqueue(nic, i); in qemu_del_nic()
472 * If this is a peer NIC and peer has already been deleted, clean it up in qemu_del_nic()
475 if (nic->peer_deleted) { in qemu_del_nic()
485 NetClientState *nc = qemu_get_subqueue(nic, i); in qemu_del_nic()
491 g_free(nic); in qemu_del_nic()
965 * A network device might also be something else than a NIC, see in qemu_get_nic_models()
991 const NetLegacyNicOptions *nic; in net_init_nic() local
994 nic = &netdev->u.nic; in net_init_nic()
1006 if (nic->netdev) { in net_init_nic()
1007 nd->netdev = qemu_find_netdev(nic->netdev); in net_init_nic()
1009 error_setg(errp, "netdev '%s' not found", nic->netdev); in net_init_nic()
1017 if (nic->model) { in net_init_nic()
1018 nd->model = g_strdup(nic->model); in net_init_nic()
1020 if (nic->addr) { in net_init_nic()
1021 nd->devaddr = g_strdup(nic->addr); in net_init_nic()
1024 if (nic->macaddr && in net_init_nic()
1025 net_parse_macaddr(nd->macaddr.a, nic->macaddr) < 0) { in net_init_nic()
1029 if (nic->macaddr && in net_init_nic()
1032 "NIC cannot have multicast MAC address (odd 1st byte)"); in net_init_nic()
1037 if (nic->has_vectors) { in net_init_nic()
1038 if (nic->vectors > 0x7ffffff) { in net_init_nic()
1039 error_setg(errp, "invalid # of vectors: %"PRIu32, nic->vectors); in net_init_nic()
1042 nd->nvectors = nic->vectors; in net_init_nic()
1095 printf("Available NIC models for this configuration:\n"); in show_nic_models()
1243 /* This NIC does not live on this bus. */ in qemu_create_nic_bus_devices()
1317 error_setg(errp, "network backend '%s' is only supported with -netdev/-nic", in net_client_init1()
1328 /* Do not add to a hub if it's a nic with a netdev= parameter. */ in net_client_init1()
1330 !netdev->u.nic.netdev) { in net_client_init1()
1560 /* only query rx-filter information of NIC */ in qmp_query_rx_filter()
1563 error_setg(errp, "net client(%s) isn't a NIC", name); in qmp_query_rx_filter()
1570 /* only query information on queue 0 since the info is per nic, in qmp_query_rx_filter()
1633 /* Change peer link only if the peer is NIC and then notify peer. in net_client_set_link()
1703 * just delete its NIC from underneath it. in net_cleanup()
1712 * However, the NIC may have peers that trust to be clean beyond this in net_cleanup()
1722 NICState *nic = qemu_get_nic(nc); in net_cleanup() local
1724 if (nic->peer_deleted) { in net_cleanup()
1725 int queues = MAX(nic->conf->peers.queues, 1); in net_cleanup()
1728 nc = qemu_get_subqueue(nic, i); in net_cleanup()
1758 ? "nic" : "netdev", in net_check_clients()
1763 /* Check that all NICs requested via -net nic actually got created. in net_check_clients()
1770 warn_report("requested NIC (%s, model %s) " in net_check_clients()
1800 /* For the convenience "--nic" parameter */
1818 printf("Available NIC models " in net_param_nic()
1819 "(use -nic model=help for a filtered list):\n"); in net_param_nic()
1830 error_setg(errp, "no more on-board/default NIC slots available"); in net_param_nic()
1863 error_setg(errp, "NIC cannot have multicast MAC address"); in net_param_nic()
1908 qemu_opts_foreach(qemu_find_opts("nic"), net_param_nic, NULL, in net_init_clients()
2035 .name = "nic",