Commit Graph

11548 Commits

Author SHA1 Message Date
Johannes Schlatow
be20b715ca trace_recorder: add ctf policy
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
758ba3855e trace: add types for trace_recorder policies
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
062881a484 trace: add types for ctf tracing
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
810bbc0484 nic_router: add trace_packets config option
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
cee0c9858c trace_buffer: add object() accessor
genodelabs/genode#4352
2022-08-17 12:03:07 +02:00
Johannes Schlatow
086f3efef2 trace: add trace_eth_packet event
genodelabs/genode#4352
2022-08-17 12:03:07 +02:00
Johannes Schlatow
80a422e590 trace: add GENODE_TRACE_CHECKPOINT macros
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Johannes Schlatow
73dad70356 trace: add checkpoint event
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Johannes Schlatow
cf904e0a5d vfs: add append mode to New_file
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Christian Helmuth
2e266dfe3c vbox5_genode_usb_hid_raw: support --depot-auto-update
... in nested run.
2022-08-10 13:33:04 +02:00
Christian Helmuth
eeb40d0cc2 vbox5_genode_usb_hid_raw: configure static RTC
This prevents

  Warning: clock_gettime(): missing real-time clock

log messages.

Related to #4561
2022-08-10 13:33:04 +02:00
Peter Krummenacher
11b964b759 audio_in_session: fix wrong buffer in content
Fixes #4573
2022-08-10 13:33:04 +02:00
Christian Prochaska
3f8bde1254 vbox6: don't call blocking 'read()' to start audio recording
Fixes #4580
2022-08-10 13:33:04 +02:00
Christian Prochaska
bda276f498 vfs_oss: implement 'SNDCTL_DSP_SETTRIGGER' command
Fixes #4579
2022-08-10 13:33:04 +02:00
Martin Stein
a4ec06a3b7 nic_router: no empty DNS servers opt in DHCP reply
The NIC router used to add the DNS servers field to DHCP replies regardless of
whether there were DNS servers or not. As reported by a Genode user, the empty
DNS server field irritated at least Windows 10 guests (Vbox 6) that connected
to the NIC router. This resulted in Windows 10 ignoring DHCP offers from the
router with such characteristic.

With this commit adding the DNS server DHCP option is skipped if there are no
DNS servers at the corresponding DHCP server or the domain IP config the server
shall fetch its DNS servers from.

Fixes #4581
2022-08-10 13:33:04 +02:00
Christian Helmuth
1dd69eeb6c lx_emul: skip USB config setting if already set
Skip SET_CONFIGURATION requests if the device already has the selected
config as active config. This workaround prevents issues with Linux
guests in VirtualBox and SDC-reader passthrough.

Thanks to Peter for the patch.
2022-08-10 13:33:04 +02:00
Josef Söntgen
3d8c1080b1 dde_linux: remove exited tasks
The commit introduces means to mark a task for destruction that is
removed on the next scheduling cycle. This fixes stack leakage from
dynamic kworker tasks.

Issue #4575.
2022-08-10 13:33:04 +02:00
Josef Söntgen
bc665384c3 dde_linux: free stack on task destruction
Issue #4575.
2022-08-10 13:33:04 +02:00
Stefan Kalkowski
8255053242 platform_drv: export Intel graphics PCI infos
Provide additional PCI register information inside the pci-config part
of the devices ROM for clients able to access an Intel graphic card,
namely the GMCH control register content, which contains for instance
the GTT size and stolen memory size.

Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
9dfc2caa11 platform_drv: add UHCI PCI quirks
Implement BIOS handover and Intel resume register update
apart from device driver to circumvent export of PCI
config space to drivers.

Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
413e2baa1c platform_drv: PCI assignment failure is no error
When there is no I/O MMU available the assignment is failing too,
although this is no error but normal behaviour.

Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
8f9b5e9bd2 depot: src package for pci_decode
Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
2cc6c1adef pci: export BAR indices, sub-vendor, -product, rev
The pci_decode has to extract the additional fields from the PCI configuration
space. The platform driver again has to parse and forward the knowledge too.
The PCI BAR indices are exported when info="yes" is set in the policy node for
the corresponding session.

Fix genodelabs/genode#4577
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
5bf3e72d37 pci: return correct I/O port base from BAR
The base address of I/O ports has a different encoding than
those of I/O memory. This needs to be encountered in the PCI
config helper utilities.

Fix genodelabs/genode#4576
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
49c6e01049 qemu-usb: ignore invalid USB data packets
Fix genodelabs/genode#4574
2022-08-10 13:33:03 +02:00
Johannes Schlatow
a6a856cb70 dde_ipxe: fix allocation errors under high TX load
Under high TX load, 'irq_handler()' is rarely executed but packets
are still received since 'netdev_poll()' is called for every TX packet.

'netdev_poll()' not only handles completed transmissions but also
puts the IO buffers of received packets into the RX queue and refills the RX
ring by allocating more IO buffers. However, the IO buffers can only be freed
after they have been dequeued and passed to the 'rx_callback()'. Since
this was only done by 'irq_handler()', we exhaust the slab allocator
under high TX load.

A fix for this is to process the RX queue not only in the IRQ handler
but also when transmitting packets.

genodelabs/genode#4555
2022-08-10 13:33:03 +02:00
Alexander Boettcher
e2b61231ae pc: avoid use usleep_range in m/udelay emulation
m/udelay is called with closed interrupts. Linux contrib code expects no
other task to be run respectively to be re-scheduled. usleep_range leads to
executing other tasks, which causes assertions in "spinlock taken twice" or
"unexpected preempt count" errors, seen on runtime with wifi_drv and intel_fb.
The assertion triggered with the changes by #4562.
2022-08-10 13:33:03 +02:00
Alexander Boettcher
6c5d2253c9 sel4: increase caps in filesystem tests
fixes x86_32/64 libc_vfs_fs_ext2 and libc_vfs_fs_fat
2022-08-10 13:33:03 +02:00
Martin Stein
3868df9f8b nic_router_dhcp_*: raise timeouts
On okl4, pistachio, sel4 the test didn't come up fast enough in order to still
experience the first configuration of NIC router #1. This commit doubles the
lifetime of the first configuration of NIC router #1 to 4 seconds and raises
the overall test timeout accordingly.

Ref #4555
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
89f9e7a3ee lx_emul: consolidate SMP + NO_HZ_IDLE
* Move common SMP and NO_HZ_IDLE variables and functions into
  generic lx_emul shadow implementations, and integrate them
  into the common lx_emul import rules
* Enable SMP and NO_HZ_IDLE within virt_linux kernel configuration
* Adapt pc drivers and wireguard accordingly
* Use original Linux softirq implementation in wireguard
* Remove erroneous softirq shadow implementation

Ref genodelabs/genode#4540
Ref genodelabs/genode#4562
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
48eacb6f79 qemu-usb: handle Interface_not_found exceptions
Fix genodelabs/genode#4572
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
560747c22e lx_emul: active config validation in usb driver
Fix genodelabs/genode#4567
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
92a5fa9bed lx_emul: remove usb device reset in session close
Ref genodelabs/genode#4566
2022-08-10 13:33:03 +02:00
Martin Stein
e32157e21b nic_router: packet allocation w/o exceptions
In overload situations, i.e. when a sender fills up the entire buffer, we land
in situations where the sender receives an ack_avail signal, releases one
packet, allocates and sends a packet and fails to allocate a second packet.
This is especially relevant if the receiver does not batch ack_avail signals
(such as vfs_lwip). In those ping-pong scheduling scenarios, the overhead from
catching the Packet_alloc_failed exception becomes significant. In case of the
NIC router, we will land in an overload situation if the sender is faster than
the receiver. The packet buffer will be filled up at some point and the NIC
router starts to drop packets. For every dropped packet, we currently have to
catch the Packet_alloc_failed exception.

This commit adds a new method alloc_packet_attempt to Packet_stream_source that
has almost the same signature as the older alloc_packet method but returns
an Attempt<Packet_descriptor, Alloc_packet_error> object. As the method already
used the allocator back end exception-less, changes on lower levels were not
needed. Furthermore, the NIC router was modified to use the new exception-less
alloc_packet_attempt instead of alloc_packet.

Ref #4555
2022-08-10 13:33:03 +02:00
Alexander Boettcher
3f69457a94 pc/intel: add intel_fb test to autopilot 2022-08-10 13:33:03 +02:00
Martin Stein
433029c3a6 nic_router: find ARP cache entries w/o exceptions
Replaces the former implementation of the 'find_by_ip' method at the data
structure for ARP cache entries. This method used to return a reference to the
found object and threw an exception if no matching object was found.

The new implementation doesn't return anything and doesn't throw exceptions. It
takes two lambda arguments instead. One for handling the case that a match was
found with a reference to the matching object as argument and another for
handling the case that no object matches.

This way, expensive exception handling can be avoided and object references
stay in a local scope.

Ref #4555
2022-08-10 13:33:03 +02:00
Johannes Schlatow
e2086ac8e4 nic_router: change max_packets_per_signal default
According to a benchmarking series on Zynq (base-hw) and x260 (base-nova) using
test-nic_perf_router, increasing the 'max_packets_per_signal' has a significant
effect on the packet throughput. By increasing the default value from 32
to 150, we could gain a few hundred Mbit/s. Increasing the value further
does not seem to have such a strong effect, though.

genodelabs/genode#4555
2022-08-10 13:33:03 +02:00
Johannes Schlatow
a2b74af59a depot: add nic_perf recipes
genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
3e562bc9bb os: add nic_perf component
The nic_perf component is used for benchmarking the throughput of Nic
and Uplink sessions.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
8df8f78fe2 nic_router_dhcp: fix signal handler in test client
The test client did not react upon packet_avail and ack_avail signals.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Martin Stein
9a37ccfe29 nic_router: incremental L4 checksum updates
The checksums for forwarded/routed UDP, TCP and ICMP, used to be always
re-calculated from scratch in the NIC router although the router changes only
a few packet fields. This commit replaces the old approach whereever sensible
with an algorithm for incremental checksum updates suggested in RFC 1071.
The goal is to improve router performance.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
b6d15fa3ab nic_router: incremental IPv4 checksum updates
The checksums for forwarded/routed IPv4, used to be always re-calculated from
scratch in the NIC router although the router changes only a few packet fields.
This commit replaces the old approach whereever sensible with an algorithm for
incremental checksum updates suggested in RFC 1071. The goal is to improve
router performance.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
d69e89f5cb internet checksum: use signed long for accumulator
We used to use 'unsigned long' for the accumulating variable when calculating
internet checksums. However, 'signed long' is more in accordance with RFC 1071
and will allow us to share the same back end for folding, once we implement
incremental updating of internet checksums.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
6b3ed6c75b internet checksum: no default arg value
Prevent public reflection of the only internally used 'init_sum' argument in
'uint16_t internet_checksum(...)' that, in addition, added a default value to
the function interface.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
07d4a7c11f nic_router: no IPv4 checksum update on ICMP echo
When sending an ICMP ECHO reply, the router merely swaps SRC and DST of the
IPv4 header of the corresponding request and these changes cancel each other
out in checksum calculation. Therefore, with this commit, the router skips
updating the IPv4 checksum in this context.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
865ee192b4 nic_router: no checksum update on IP routing
The router used to update IPv4 checksums when routing via an <ip> rule
despite the fact that it doesn't change any IPv4 header fields in this case.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
95b3b36cd9 nic_router: update checksums only once per packet
The NIC router used to update IPv4 and layer 4 checksums of a packet for each
interface it was sent to (say, all interfaces of the domain the packet was
routed to). However, there was and is no technical reason for not doing it
only once and then iterating over the interfaces with the already updated
packet. This is what this commit does in an intent to raise the router's
performance.

Ref #4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
01c9c32573 nic_router: relax timer accuracy for timestamps
The NIC router uses the timer for relatively coarse-grained timeouts.
It therefore suffices to update and store the current time when the NIC router
is signalled and use the cached time instead. This prevents frequent
syscalls or RPCs when acquiring the current time for every packet.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
735abca1b6 nic_router: avoid marginal timeout updates
The link dissolve timeout is updated for every packet, which leads to
trigger_once() RPCs that only marginally change the scheduled timeout but
significantly slow down the packet throughput.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
3ea910bf83 packet_stream: reset wakeup_needed on wakeup()
The wakeup call only emits a single signal as it assumed both are
handled by the same signal handler. However, the original implementation
did not reset the wakeup_needed variable properly.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00