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:
Stefan Kalkowski
2013-05-27 14:58:44 +02:00
committed by Norman Feske
parent 973efe945b
commit 8fae7131c8
5 changed files with 13 additions and 22 deletions

View File

@ -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);