mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 22:58:26 +00:00
Unify buffer sizes of RX and TX in nic_session
In fact, the sizes were the same the whole time, but by using the same enum in both cases to instantiate the Packet_stream_tx and Packet_stream_rx members of the e.g. RPC object, it allows for more flexible generalization between e.g. source or, sink objects, when programming event-driven, and implementing generic handlers for their signals.
This commit is contained in:
committed by
Norman Feske
parent
973efe945b
commit
8fae7131c8
@ -36,8 +36,7 @@ int main(int, char **)
|
||||
|
||||
enum {
|
||||
PACKET_SIZE = Nic::Packet_allocator::DEFAULT_PACKET_SIZE,
|
||||
RX_BUF_SIZE = Nic::Session::RX_QUEUE_SIZE * PACKET_SIZE,
|
||||
TX_BUF_SIZE = Nic::Session::TX_QUEUE_SIZE * PACKET_SIZE
|
||||
BUF_SIZE = Nic::Session::QUEUE_SIZE * PACKET_SIZE,
|
||||
};
|
||||
|
||||
/* read MAC address prefix from config file */
|
||||
@ -50,7 +49,7 @@ int main(int, char **)
|
||||
|
||||
Root_capability nic_root_cap;
|
||||
try {
|
||||
static Nic::Connection nic(&tx_block_alloc, TX_BUF_SIZE, RX_BUF_SIZE);
|
||||
static Nic::Connection nic(&tx_block_alloc, BUF_SIZE, BUF_SIZE);
|
||||
static Net::Rx_handler rx_handler(&nic);
|
||||
static Net::Root nic_root(&ep, env()->heap(), &nic);
|
||||
|
||||
|
Reference in New Issue
Block a user