[genode] Multiple sessions from usb_drv
norman.feske at ...1...
Fri Jan 11 11:50:38 CET 2013
I'd like to add that there is the nic_bridge if you need to make one NIC
device available to multiple NIC sessions at the same time. The
nic_bridge would be the only client of the usb_drv. Multiple networking
clients can then be connected to the nic_bridge.
The rule of thumb is that a device driver supports only one client for a
given physical device resource whereas a resource multiplexer
multiplexes one session interface to multiple clients. The usb_drv is a
device driver, nic_bridge is a matching resource multiplexer. By
combining them, multiple clients can use a single NIC. The benefit of
cleanly separating both concerns (device driver and resource
multiplexer) into different components is that the device driver becomes
uncritical for potential cross-talk between NIC sessions. So it does not
need to be trusted for maintaining the isolation between NIC clients. In
contrast, the multiplexer is in such a critical position. But because it
does not need to drive any device nor does it need to support high-level
interfaces (such as a socket interface), it can be implemented with very
low complexity and thoroughly analyzed for security.
That said, there may be performance reasons that would justify merging
both roles into a single component. But since that would weaken the
security, it should be considered as a special case.
Sebastian's email referred to the possibility to have multiple NICs
attached to USB. In this case, the usb_drv should make each NIC
available as a dedicated NIC session. Right now, usb_drv hands out only
the first NIC found on the USB.
On 01/11/2013 11:22 AM, Sebastian Sumpf wrote:
> Hello Jaeyong,
> On 01/11/2013 06:23 AM, jaeyong yoo wrote:
>> Is it possible to have multiple sessions from usb_drv?
>> If it is, how does usb_drv multiplex the receiving packets from NIC
>> device to the corresponding session?
> The usb_drv is almost ready to support multiple NICs. Currently a NIC
> device can be associated to a NIC session. What the driver is lacking,
> is configuration support in Genode's configuration file. There one would
> want to specify which client will receive which NIC session when
> connecting to the USB server, but that could be implemented pretty
> straight forward. Multiplexing is not necessary, since the NIC device is
> associated to the session. When a device interrupt occurs, the device
> will report it to the session and the session in turn to the client.
Dr.-Ing. Norman Feske
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users