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
This commit is contained in:
Stefan Kalkowski
2019-04-15 14:59:22 +02:00
committed by Christian Helmuth
parent 0b9916cae2
commit c767f6ccf1
11 changed files with 39 additions and 29 deletions

View File

@ -174,7 +174,8 @@ Session_component::Session_component(Genode::size_t const tx_buf_size,
Genode::Allocator & rx_block_md_alloc,
Genode::Env & env,
Genode::Session_label label)
: Nic::Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, env),
: Nic::Session_component(tx_buf_size, rx_buf_size, Genode::CACHED,
rx_block_md_alloc, env),
_ndev(_register_session_component(*this, label)),
_has_link(_ndev ? !(_ndev->state & (1UL << __LINK_STATE_NOCARRIER)) : false)
{

View File

@ -174,7 +174,7 @@ Session_component::Session_component(Genode::size_t const tx_buf_size,
Genode::Allocator & rx_block_md_alloc,
Genode::Env & env,
Genode::Session_label label)
: Nic::Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, env),
: Nic::Session_component(tx_buf_size, rx_buf_size, Genode::CACHED, rx_block_md_alloc, env),
_ndev(_register_session_component(*this, label)),
_has_link(_ndev ? !(_ndev->state & (1UL << __LINK_STATE_NOCARRIER)) : false)
{

View File

@ -188,7 +188,8 @@ class Usb_nic::Session_component : public Nic::Session_component
Genode::Allocator &rx_block_md_alloc,
Genode::Env &env,
Device *device)
: Nic::Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, env),
: Nic::Session_component(tx_buf_size, rx_buf_size, Genode::CACHED,
rx_block_md_alloc, env),
_device(device)
{ _device->session(this); }

View File

@ -181,7 +181,8 @@ class Wifi_session_component : public Nic::Session_component
Genode::size_t const rx_buf_size,
Genode::Allocator &rx_block_md_alloc,
Genode::Env &env, net_device *ndev)
: Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, env),
: Session_component(tx_buf_size, rx_buf_size, Genode::CACHED,
rx_block_md_alloc, env),
_ndev(ndev)
{
_ndev->lx_nic_device = this;