|
@@ -289,7 +289,7 @@ NICState *qemu_new_nic(NetClientInfo *info,
|
|
NICState *nic;
|
|
NICState *nic;
|
|
int i, queues = MAX(1, conf->peers.queues);
|
|
int i, queues = MAX(1, conf->peers.queues);
|
|
|
|
|
|
- assert(info->type == NET_CLIENT_OPTIONS_KIND_NIC);
|
|
|
|
|
|
+ assert(info->type == NET_CLIENT_DRIVER_NIC);
|
|
assert(info->size >= sizeof(NICState));
|
|
assert(info->size >= sizeof(NICState));
|
|
|
|
|
|
nic = g_malloc0(info->size + sizeof(NetClientState) * queues);
|
|
nic = g_malloc0(info->size + sizeof(NetClientState) * queues);
|
|
@@ -360,13 +360,13 @@ void qemu_del_net_client(NetClientState *nc)
|
|
int queues, i;
|
|
int queues, i;
|
|
NetFilterState *nf, *next;
|
|
NetFilterState *nf, *next;
|
|
|
|
|
|
- assert(nc->info->type != NET_CLIENT_OPTIONS_KIND_NIC);
|
|
|
|
|
|
+ assert(nc->info->type != NET_CLIENT_DRIVER_NIC);
|
|
|
|
|
|
/* If the NetClientState belongs to a multiqueue backend, we will change all
|
|
/* If the NetClientState belongs to a multiqueue backend, we will change all
|
|
* other NetClientStates also.
|
|
* other NetClientStates also.
|
|
*/
|
|
*/
|
|
queues = qemu_find_net_clients_except(nc->name, ncs,
|
|
queues = qemu_find_net_clients_except(nc->name, ncs,
|
|
- NET_CLIENT_OPTIONS_KIND_NIC,
|
|
|
|
|
|
+ NET_CLIENT_DRIVER_NIC,
|
|
MAX_QUEUE_NUM);
|
|
MAX_QUEUE_NUM);
|
|
assert(queues != 0);
|
|
assert(queues != 0);
|
|
|
|
|
|
@@ -375,7 +375,7 @@ void qemu_del_net_client(NetClientState *nc)
|
|
}
|
|
}
|
|
|
|
|
|
/* If there is a peer NIC, delete and cleanup client, but do not free. */
|
|
/* If there is a peer NIC, delete and cleanup client, but do not free. */
|
|
- if (nc->peer && nc->peer->info->type == NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (nc->peer && nc->peer->info->type == NET_CLIENT_DRIVER_NIC) {
|
|
NICState *nic = qemu_get_nic(nc->peer);
|
|
NICState *nic = qemu_get_nic(nc->peer);
|
|
if (nic->peer_deleted) {
|
|
if (nic->peer_deleted) {
|
|
return;
|
|
return;
|
|
@@ -431,7 +431,7 @@ void qemu_foreach_nic(qemu_nic_foreach func, void *opaque)
|
|
NetClientState *nc;
|
|
NetClientState *nc;
|
|
|
|
|
|
QTAILQ_FOREACH(nc, &net_clients, next) {
|
|
QTAILQ_FOREACH(nc, &net_clients, next) {
|
|
- if (nc->info->type == NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (nc->info->type == NET_CLIENT_DRIVER_NIC) {
|
|
if (nc->queue_index == 0) {
|
|
if (nc->queue_index == 0) {
|
|
func(qemu_get_nic(nc), opaque);
|
|
func(qemu_get_nic(nc), opaque);
|
|
}
|
|
}
|
|
@@ -603,7 +603,7 @@ void qemu_flush_or_purge_queued_packets(NetClientState *nc, bool purge)
|
|
{
|
|
{
|
|
nc->receive_disabled = 0;
|
|
nc->receive_disabled = 0;
|
|
|
|
|
|
- if (nc->peer && nc->peer->info->type == NET_CLIENT_OPTIONS_KIND_HUBPORT) {
|
|
|
|
|
|
+ if (nc->peer && nc->peer->info->type == NET_CLIENT_DRIVER_HUBPORT) {
|
|
if (net_hub_flush(nc->peer)) {
|
|
if (net_hub_flush(nc->peer)) {
|
|
qemu_notify_event();
|
|
qemu_notify_event();
|
|
}
|
|
}
|
|
@@ -777,7 +777,7 @@ NetClientState *qemu_find_netdev(const char *id)
|
|
NetClientState *nc;
|
|
NetClientState *nc;
|
|
|
|
|
|
QTAILQ_FOREACH(nc, &net_clients, next) {
|
|
QTAILQ_FOREACH(nc, &net_clients, next) {
|
|
- if (nc->info->type == NET_CLIENT_OPTIONS_KIND_NIC)
|
|
|
|
|
|
+ if (nc->info->type == NET_CLIENT_DRIVER_NIC)
|
|
continue;
|
|
continue;
|
|
if (!strcmp(nc->name, id)) {
|
|
if (!strcmp(nc->name, id)) {
|
|
return nc;
|
|
return nc;
|
|
@@ -788,7 +788,7 @@ NetClientState *qemu_find_netdev(const char *id)
|
|
}
|
|
}
|
|
|
|
|
|
int qemu_find_net_clients_except(const char *id, NetClientState **ncs,
|
|
int qemu_find_net_clients_except(const char *id, NetClientState **ncs,
|
|
- NetClientOptionsKind type, int max)
|
|
|
|
|
|
+ NetClientDriver type, int max)
|
|
{
|
|
{
|
|
NetClientState *nc;
|
|
NetClientState *nc;
|
|
int ret = 0;
|
|
int ret = 0;
|
|
@@ -869,8 +869,8 @@ static int net_init_nic(const Netdev *netdev, const char *name,
|
|
NICInfo *nd;
|
|
NICInfo *nd;
|
|
const NetLegacyNicOptions *nic;
|
|
const NetLegacyNicOptions *nic;
|
|
|
|
|
|
- assert(netdev->opts->type == NET_CLIENT_OPTIONS_KIND_NIC);
|
|
|
|
- nic = netdev->opts->u.nic.data;
|
|
|
|
|
|
+ assert(netdev->type == NET_CLIENT_DRIVER_NIC);
|
|
|
|
+ nic = &netdev->u.nic;
|
|
|
|
|
|
idx = nic_get_free_idx();
|
|
idx = nic_get_free_idx();
|
|
if (idx == -1 || nb_nics >= MAX_NICS) {
|
|
if (idx == -1 || nb_nics >= MAX_NICS) {
|
|
@@ -930,39 +930,38 @@ static int net_init_nic(const Netdev *netdev, const char *name,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND__MAX])(
|
|
|
|
|
|
+static int (* const net_client_init_fun[NET_CLIENT_DRIVER__MAX])(
|
|
const Netdev *netdev,
|
|
const Netdev *netdev,
|
|
const char *name,
|
|
const char *name,
|
|
NetClientState *peer, Error **errp) = {
|
|
NetClientState *peer, Error **errp) = {
|
|
- [NET_CLIENT_OPTIONS_KIND_NIC] = net_init_nic,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_NIC] = net_init_nic,
|
|
#ifdef CONFIG_SLIRP
|
|
#ifdef CONFIG_SLIRP
|
|
- [NET_CLIENT_OPTIONS_KIND_USER] = net_init_slirp,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_USER] = net_init_slirp,
|
|
#endif
|
|
#endif
|
|
- [NET_CLIENT_OPTIONS_KIND_TAP] = net_init_tap,
|
|
|
|
- [NET_CLIENT_OPTIONS_KIND_SOCKET] = net_init_socket,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_TAP] = net_init_tap,
|
|
|
|
+ [NET_CLIENT_DRIVER_SOCKET] = net_init_socket,
|
|
#ifdef CONFIG_VDE
|
|
#ifdef CONFIG_VDE
|
|
- [NET_CLIENT_OPTIONS_KIND_VDE] = net_init_vde,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_VDE] = net_init_vde,
|
|
#endif
|
|
#endif
|
|
#ifdef CONFIG_NETMAP
|
|
#ifdef CONFIG_NETMAP
|
|
- [NET_CLIENT_OPTIONS_KIND_NETMAP] = net_init_netmap,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_NETMAP] = net_init_netmap,
|
|
#endif
|
|
#endif
|
|
- [NET_CLIENT_OPTIONS_KIND_DUMP] = net_init_dump,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_DUMP] = net_init_dump,
|
|
#ifdef CONFIG_NET_BRIDGE
|
|
#ifdef CONFIG_NET_BRIDGE
|
|
- [NET_CLIENT_OPTIONS_KIND_BRIDGE] = net_init_bridge,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_BRIDGE] = net_init_bridge,
|
|
#endif
|
|
#endif
|
|
- [NET_CLIENT_OPTIONS_KIND_HUBPORT] = net_init_hubport,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_HUBPORT] = net_init_hubport,
|
|
#ifdef CONFIG_VHOST_NET_USED
|
|
#ifdef CONFIG_VHOST_NET_USED
|
|
- [NET_CLIENT_OPTIONS_KIND_VHOST_USER] = net_init_vhost_user,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_VHOST_USER] = net_init_vhost_user,
|
|
#endif
|
|
#endif
|
|
#ifdef CONFIG_L2TPV3
|
|
#ifdef CONFIG_L2TPV3
|
|
- [NET_CLIENT_OPTIONS_KIND_L2TPV3] = net_init_l2tpv3,
|
|
|
|
|
|
+ [NET_CLIENT_DRIVER_L2TPV3] = net_init_l2tpv3,
|
|
#endif
|
|
#endif
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
static int net_client_init1(const void *object, int is_netdev, Error **errp)
|
|
static int net_client_init1(const void *object, int is_netdev, Error **errp)
|
|
{
|
|
{
|
|
- const NetClientOptions *opts;
|
|
|
|
Netdev legacy = {0};
|
|
Netdev legacy = {0};
|
|
const Netdev *netdev;
|
|
const Netdev *netdev;
|
|
const char *name;
|
|
const char *name;
|
|
@@ -970,34 +969,72 @@ static int net_client_init1(const void *object, int is_netdev, Error **errp)
|
|
|
|
|
|
if (is_netdev) {
|
|
if (is_netdev) {
|
|
netdev = object;
|
|
netdev = object;
|
|
- opts = netdev->opts;
|
|
|
|
name = netdev->id;
|
|
name = netdev->id;
|
|
|
|
|
|
- if (opts->type == NET_CLIENT_OPTIONS_KIND_DUMP ||
|
|
|
|
- opts->type == NET_CLIENT_OPTIONS_KIND_NIC ||
|
|
|
|
- !net_client_init_fun[opts->type]) {
|
|
|
|
|
|
+ if (netdev->type == NET_CLIENT_DRIVER_DUMP ||
|
|
|
|
+ netdev->type == NET_CLIENT_DRIVER_NIC ||
|
|
|
|
+ !net_client_init_fun[netdev->type]) {
|
|
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "type",
|
|
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "type",
|
|
"a netdev backend type");
|
|
"a netdev backend type");
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
const NetLegacy *net = object;
|
|
const NetLegacy *net = object;
|
|
|
|
+ const NetLegacyOptions *opts = net->opts;
|
|
legacy.id = net->id;
|
|
legacy.id = net->id;
|
|
- opts = legacy.opts = net->opts;
|
|
|
|
netdev = &legacy;
|
|
netdev = &legacy;
|
|
/* missing optional values have been initialized to "all bits zero" */
|
|
/* missing optional values have been initialized to "all bits zero" */
|
|
name = net->has_id ? net->id : net->name;
|
|
name = net->has_id ? net->id : net->name;
|
|
|
|
|
|
- if (opts->type == NET_CLIENT_OPTIONS_KIND_NONE) {
|
|
|
|
|
|
+ /* Map the old options to the new flat type */
|
|
|
|
+ switch (opts->type) {
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_NONE:
|
|
return 0; /* nothing to do */
|
|
return 0; /* nothing to do */
|
|
- }
|
|
|
|
- if (opts->type == NET_CLIENT_OPTIONS_KIND_HUBPORT) {
|
|
|
|
- error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "type",
|
|
|
|
- "a net type");
|
|
|
|
- return -1;
|
|
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_NIC:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_NIC;
|
|
|
|
+ legacy.u.nic = *opts->u.nic.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_USER:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_USER;
|
|
|
|
+ legacy.u.user = *opts->u.user.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_TAP:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_TAP;
|
|
|
|
+ legacy.u.tap = *opts->u.tap.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_L2TPV3:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_L2TPV3;
|
|
|
|
+ legacy.u.l2tpv3 = *opts->u.l2tpv3.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_SOCKET:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_SOCKET;
|
|
|
|
+ legacy.u.socket = *opts->u.socket.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_VDE:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_VDE;
|
|
|
|
+ legacy.u.vde = *opts->u.vde.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_DUMP:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_DUMP;
|
|
|
|
+ legacy.u.dump = *opts->u.dump.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_BRIDGE:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_BRIDGE;
|
|
|
|
+ legacy.u.bridge = *opts->u.bridge.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_NETMAP:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_NETMAP;
|
|
|
|
+ legacy.u.netmap = *opts->u.netmap.data;
|
|
|
|
+ break;
|
|
|
|
+ case NET_LEGACY_OPTIONS_KIND_VHOST_USER:
|
|
|
|
+ legacy.type = NET_CLIENT_DRIVER_VHOST_USER;
|
|
|
|
+ legacy.u.vhost_user = *opts->u.vhost_user.data;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ abort();
|
|
}
|
|
}
|
|
|
|
|
|
- if (!net_client_init_fun[opts->type]) {
|
|
|
|
|
|
+ if (!net_client_init_fun[netdev->type]) {
|
|
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "type",
|
|
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "type",
|
|
"a net backend type (maybe it is not compiled "
|
|
"a net backend type (maybe it is not compiled "
|
|
"into this binary)");
|
|
"into this binary)");
|
|
@@ -1005,17 +1042,17 @@ static int net_client_init1(const void *object, int is_netdev, Error **errp)
|
|
}
|
|
}
|
|
|
|
|
|
/* Do not add to a vlan if it's a nic with a netdev= parameter. */
|
|
/* Do not add to a vlan if it's a nic with a netdev= parameter. */
|
|
- if (opts->type != NET_CLIENT_OPTIONS_KIND_NIC ||
|
|
|
|
|
|
+ if (netdev->type != NET_CLIENT_DRIVER_NIC ||
|
|
!opts->u.nic.data->has_netdev) {
|
|
!opts->u.nic.data->has_netdev) {
|
|
peer = net_hub_add_port(net->has_vlan ? net->vlan : 0, NULL);
|
|
peer = net_hub_add_port(net->has_vlan ? net->vlan : 0, NULL);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (net_client_init_fun[opts->type](netdev, name, peer, errp) < 0) {
|
|
|
|
|
|
+ if (net_client_init_fun[netdev->type](netdev, name, peer, errp) < 0) {
|
|
/* FIXME drop when all init functions store an Error */
|
|
/* FIXME drop when all init functions store an Error */
|
|
if (errp && !*errp) {
|
|
if (errp && !*errp) {
|
|
error_setg(errp, QERR_DEVICE_INIT_FAILED,
|
|
error_setg(errp, QERR_DEVICE_INIT_FAILED,
|
|
- NetClientOptionsKind_lookup[opts->type]);
|
|
|
|
|
|
+ NetClientDriver_lookup[netdev->type]);
|
|
}
|
|
}
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
@@ -1135,7 +1172,7 @@ void hmp_host_net_remove(Monitor *mon, const QDict *qdict)
|
|
device, vlan_id);
|
|
device, vlan_id);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (nc->info->type == NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (nc->info->type == NET_CLIENT_DRIVER_NIC) {
|
|
error_report("invalid host network device '%s'", device);
|
|
error_report("invalid host network device '%s'", device);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -1226,7 +1263,7 @@ void print_net_client(Monitor *mon, NetClientState *nc)
|
|
|
|
|
|
monitor_printf(mon, "%s: index=%d,type=%s,%s\n", nc->name,
|
|
monitor_printf(mon, "%s: index=%d,type=%s,%s\n", nc->name,
|
|
nc->queue_index,
|
|
nc->queue_index,
|
|
- NetClientOptionsKind_lookup[nc->info->type],
|
|
|
|
|
|
+ NetClientDriver_lookup[nc->info->type],
|
|
nc->info_str);
|
|
nc->info_str);
|
|
if (!QTAILQ_EMPTY(&nc->filters)) {
|
|
if (!QTAILQ_EMPTY(&nc->filters)) {
|
|
monitor_printf(mon, "filters:\n");
|
|
monitor_printf(mon, "filters:\n");
|
|
@@ -1256,7 +1293,7 @@ RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name,
|
|
}
|
|
}
|
|
|
|
|
|
/* only query rx-filter information of NIC */
|
|
/* only query rx-filter information of NIC */
|
|
- if (nc->info->type != NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (nc->info->type != NET_CLIENT_DRIVER_NIC) {
|
|
if (has_name) {
|
|
if (has_name) {
|
|
error_setg(errp, "net client(%s) isn't a NIC", name);
|
|
error_setg(errp, "net client(%s) isn't a NIC", name);
|
|
return NULL;
|
|
return NULL;
|
|
@@ -1302,7 +1339,7 @@ RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name,
|
|
void hmp_info_network(Monitor *mon, const QDict *qdict)
|
|
void hmp_info_network(Monitor *mon, const QDict *qdict)
|
|
{
|
|
{
|
|
NetClientState *nc, *peer;
|
|
NetClientState *nc, *peer;
|
|
- NetClientOptionsKind type;
|
|
|
|
|
|
+ NetClientDriver type;
|
|
|
|
|
|
net_hub_info(mon);
|
|
net_hub_info(mon);
|
|
|
|
|
|
@@ -1315,10 +1352,10 @@ void hmp_info_network(Monitor *mon, const QDict *qdict)
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!peer || type == NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (!peer || type == NET_CLIENT_DRIVER_NIC) {
|
|
print_net_client(mon, nc);
|
|
print_net_client(mon, nc);
|
|
} /* else it's a netdev connected to a NIC, printed with the NIC */
|
|
} /* else it's a netdev connected to a NIC, printed with the NIC */
|
|
- if (peer && type == NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (peer && type == NET_CLIENT_DRIVER_NIC) {
|
|
monitor_printf(mon, " \\ ");
|
|
monitor_printf(mon, " \\ ");
|
|
print_net_client(mon, peer);
|
|
print_net_client(mon, peer);
|
|
}
|
|
}
|
|
@@ -1332,7 +1369,7 @@ void qmp_set_link(const char *name, bool up, Error **errp)
|
|
int queues, i;
|
|
int queues, i;
|
|
|
|
|
|
queues = qemu_find_net_clients_except(name, ncs,
|
|
queues = qemu_find_net_clients_except(name, ncs,
|
|
- NET_CLIENT_OPTIONS_KIND__MAX,
|
|
|
|
|
|
+ NET_CLIENT_DRIVER__MAX,
|
|
MAX_QUEUE_NUM);
|
|
MAX_QUEUE_NUM);
|
|
|
|
|
|
if (queues == 0) {
|
|
if (queues == 0) {
|
|
@@ -1359,7 +1396,7 @@ void qmp_set_link(const char *name, bool up, Error **errp)
|
|
* multiple clients that can still communicate with each other in
|
|
* multiple clients that can still communicate with each other in
|
|
* disconnected mode. For now maintain this compatibility.
|
|
* disconnected mode. For now maintain this compatibility.
|
|
*/
|
|
*/
|
|
- if (nc->peer->info->type == NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (nc->peer->info->type == NET_CLIENT_DRIVER_NIC) {
|
|
for (i = 0; i < queues; i++) {
|
|
for (i = 0; i < queues; i++) {
|
|
ncs[i]->peer->link_down = !up;
|
|
ncs[i]->peer->link_down = !up;
|
|
}
|
|
}
|
|
@@ -1400,7 +1437,7 @@ void net_cleanup(void)
|
|
*/
|
|
*/
|
|
while (!QTAILQ_EMPTY(&net_clients)) {
|
|
while (!QTAILQ_EMPTY(&net_clients)) {
|
|
nc = QTAILQ_FIRST(&net_clients);
|
|
nc = QTAILQ_FIRST(&net_clients);
|
|
- if (nc->info->type == NET_CLIENT_OPTIONS_KIND_NIC) {
|
|
|
|
|
|
+ if (nc->info->type == NET_CLIENT_DRIVER_NIC) {
|
|
qemu_del_nic(qemu_get_nic(nc));
|
|
qemu_del_nic(qemu_get_nic(nc));
|
|
} else {
|
|
} else {
|
|
qemu_del_net_client(nc);
|
|
qemu_del_net_client(nc);
|
|
@@ -1420,7 +1457,7 @@ void net_check_clients(void)
|
|
QTAILQ_FOREACH(nc, &net_clients, next) {
|
|
QTAILQ_FOREACH(nc, &net_clients, next) {
|
|
if (!nc->peer) {
|
|
if (!nc->peer) {
|
|
fprintf(stderr, "Warning: %s %s has no peer\n",
|
|
fprintf(stderr, "Warning: %s %s has no peer\n",
|
|
- nc->info->type == NET_CLIENT_OPTIONS_KIND_NIC ?
|
|
|
|
|
|
+ nc->info->type == NET_CLIENT_DRIVER_NIC ?
|
|
"nic" : "netdev", nc->name);
|
|
"nic" : "netdev", nc->name);
|
|
}
|
|
}
|
|
}
|
|
}
|