Commit Graph

12 Commits

Author SHA1 Message Date
Stefan Kalkowski c767f6ccf1 os: explicit cache policy in Nic::Session_component
To enable the use of uncached DMA buffers as RX and TX communication
buffers in between driver (service) and client, introduce a cache
attribute in the constructor of Nic::Session_component

Ref #3291
2019-05-06 16:15:26 +02:00
Ehmry - a2bdcc68c2 Throw exception for invalid packets at packet streams
Some application code is dereferencing the pointer returned by
'packet_content' at packet streams without checking that it is valid.
Throw an exception rather than return a null pointer, except for
zero-length packets, which have somewhat implicit invalid content and
that we believe to be properly handled in all current cases.

The client-side of a packet stream cannot take corrective action if the
server-side is sending packets with invalid content, but the servers
that provide packet streams should catch this exception to detect
misbehaving clients.

Ref #3059
2018-11-29 11:54:29 +01:00
Stefan Kalkowski 1ec2f43713 dde_linux: use correct type in lx_emul's `min`
* use a macro for `min` inside lx_emul/kernel.h
* unify the definition of the clamp function

Fix #2964
2018-09-13 14:54:20 +02:00
Norman Feske 6609aafb05 Replace Quota_exceeded by Insufficient_ram_quota
This patch replaces the 'Parent::Quota_exceeded',
'Service::Quota_exceeded', and 'Root::Quota_exceeded' exceptions
by the single 'Insufficient_ram_quota' exception type.

Furthermore, the 'Parent' interface distinguished now between
'Out_of_ram' (the child's RAM is exhausted) from
'Insufficient_ram_quota' (the child's RAM donation does not suffice to
establish the session).

This eliminates ambiguities and removes the need to convert exception
types along the path of the session creation.

Issue #2398
2017-05-31 13:16:05 +02:00
Norman Feske 29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Josef Söntgen 15821e32ec nic: remove usage of deprecated env()
This commit includes changes to the Nic::Session_component interface.
We now pass the entire env to the component instead of only ram, rm and
the ep because we need the env to open connections from within the
Session_component implemenation. So far only the cadence_gem driver
needs this, though.

Issue #2280.
2017-02-28 12:59:18 +01:00
Christian Prochaska 9be07d2244 os/include/nic: API transition (fix 'deprecated' warnings)
...and adaptation of the users of 'Nic::Root' and 'Nic::Session_component'
to the modified interface.

Issue #1987
2017-01-20 16:46:56 +01:00
Norman Feske e370e08e01 Define Genode::size_t as unsigned long
Fixes #2105
2016-10-21 12:39:29 +02:00
Sebastian Sumpf d48219138c usb: transition to the new base API
* remove all 'Genode::env()' calls
* use attached roms to read configuration
* use compoenent framework
* remove all PDBG, PINF, PWRN macros

Issue #1987
Fixes #2019
2016-06-28 11:09:25 +02:00
Sebastian Sumpf 4994616346 os: packets without playload in packet stream
issue #1988
2016-06-04 13:45:26 +02:00
Sebastian Sumpf 78e18981fb nic session: fix quota check
Check for overflow.

Issue #1735
2015-10-09 16:38:48 +02:00
Sebastian Sumpf 463c9bec17 Replace Nic driver interface by customizable component
Removed the Nic::Driver implementation. All nic servers now inherit from
Nic::Session_component. Packet stream signals are dispatched to
the 'handle_packet_stream' function within a session component. Thus, nic
servers now have direct access to the packet stream channels, making handling
more flexible.

Adjusted nic_loobpack, dde_ipxe, wifi, usb, lan9118, Linux nic, and OpenVPN to
the new interface.

Fixes #1602
2015-07-01 14:46:16 +02:00