2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(files(
|
2019-07-22 21:47:50 +02:00
|
|
|
'announce.c',
|
|
|
|
'checksum.c',
|
|
|
|
'dump.c',
|
|
|
|
'eth.c',
|
|
|
|
'filter-buffer.c',
|
|
|
|
'filter-mirror.c',
|
|
|
|
'filter.c',
|
|
|
|
'hub.c',
|
2023-01-24 13:19:29 +01:00
|
|
|
'net-hmp-cmds.c',
|
2019-07-22 21:47:50 +02:00
|
|
|
'net.c',
|
|
|
|
'queue.c',
|
|
|
|
'socket.c',
|
qapi: net: add stream and dgram netdevs
Copied from socket netdev file and modified to use SocketAddress
to be able to introduce new features like unix socket.
"udp" and "mcast" are squashed into dgram netdev, multicast is detected
according to the IP address type.
"listen" and "connect" modes are managed by stream netdev. An optional
parameter "server" defines the mode (off by default)
The two new types need to be parsed the modern way with -netdev, because
with the traditional way, the "type" field of netdev structure collides with
the "type" field of SocketAddress and prevents the correct evaluation of the
command line option. Moreover the traditional way doesn't allow to use
the same type (SocketAddress) several times with the -netdev option
(needed to specify "local" and "remote" addresses).
The previous commit paved the way for parsing the modern way, but
omitted one detail: how to pick modern vs. traditional, in
netdev_is_modern().
We want to pick based on the value of parameter "type". But how to
extract it from the option argument?
Parsing the option argument, either the modern or the traditional way,
extracts it for us, but only if parsing succeeds.
If parsing fails, there is no good option. No matter which parser we
pick, it'll be the wrong one for some arguments, and the error
reporting will be confusing.
Fortunately, the traditional parser accepts *anything* when called in
a certain way. This maximizes our chance to extract the value of
"type", and in turn minimizes the risk of confusing error reporting.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2022-10-21 11:09:11 +02:00
|
|
|
'stream.c',
|
|
|
|
'dgram.c',
|
2019-07-22 21:47:50 +02:00
|
|
|
'util.c',
|
|
|
|
))
|
|
|
|
|
2023-05-15 15:06:38 +02:00
|
|
|
if get_option('replication').allowed() or \
|
|
|
|
get_option('colo_proxy').allowed()
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(files('colo-compare.c'))
|
|
|
|
system_ss.add(files('colo.c'))
|
2023-05-15 15:06:38 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('colo_proxy').allowed()
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(files('filter-rewriter.c'))
|
2023-05-15 15:06:38 +02:00
|
|
|
endif
|
|
|
|
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))
|
replay: do not build if TCG is not available
this fixes non-TCG builds broken recently by replay reverse debugging.
Stub the needed functions in stub/, splitting roughly between functions
needed only by system emulation, by system emulation and tools,
and by everyone. This includes duplicating some code in replay/, and
puts the logic for non-replay related events in the replay/ module (+
the stubs), so this should be revisited in the future.
Surprisingly, only _one_ qtest was affected by this, ide-test.c, which
resulted in a buzz as the bh events were never delivered, and the bh
never executed.
Many other subsystems _should_ have been affected.
This fixes the immediate issue, however a better way to group replay
functionality to TCG-only code could be developed in the long term.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20201013192123.22632-4-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-13 21:21:23 +02:00
|
|
|
|
2021-10-28 20:59:08 +02:00
|
|
|
if have_l2tpv3
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(files('l2tpv3.c'))
|
2021-10-28 20:59:08 +02:00
|
|
|
endif
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(when: slirp, if_true: files('slirp.c'))
|
|
|
|
system_ss.add(when: vde, if_true: files('vde.c'))
|
2021-10-07 15:08:22 +02:00
|
|
|
if have_netmap
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(files('netmap.c'))
|
2021-10-07 15:08:22 +02:00
|
|
|
endif
|
2022-04-20 17:34:06 +02:00
|
|
|
if have_vhost_net_user
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
|
2022-04-20 17:34:06 +02:00
|
|
|
endif
|
2019-07-22 21:47:50 +02:00
|
|
|
|
2021-09-28 16:45:39 +02:00
|
|
|
if targetos == 'windows'
|
|
|
|
system_ss.add(files('tap-win32.c'))
|
|
|
|
elif targetos == 'linux'
|
|
|
|
system_ss.add(files('tap.c', 'tap-linux.c'))
|
|
|
|
elif targetos in bsd_oses
|
|
|
|
system_ss.add(files('tap.c', 'tap-bsd.c'))
|
2023-09-08 19:45:42 +02:00
|
|
|
elif targetos == 'sunos'
|
2021-09-28 16:45:39 +02:00
|
|
|
system_ss.add(files('tap.c', 'tap-solaris.c'))
|
|
|
|
else
|
|
|
|
system_ss.add(files('tap.c', 'tap-stub.c'))
|
2019-07-22 21:47:50 +02:00
|
|
|
endif
|
2022-04-20 17:34:06 +02:00
|
|
|
if have_vhost_net_vdpa
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c'))
|
2022-04-20 17:34:06 +02:00
|
|
|
endif
|
2019-07-22 21:47:50 +02:00
|
|
|
|
2022-03-17 18:28:34 +01:00
|
|
|
vmnet_files = files(
|
|
|
|
'vmnet-common.m',
|
|
|
|
'vmnet-bridged.m',
|
|
|
|
'vmnet-host.c',
|
|
|
|
'vmnet-shared.c'
|
|
|
|
)
|
2023-06-13 15:33:47 +02:00
|
|
|
system_ss.add(when: vmnet, if_true: vmnet_files)
|
2019-07-22 21:47:50 +02:00
|
|
|
subdir('can')
|