diff --git a/repos/ports/ports/seoul.hash b/repos/ports/ports/seoul.hash index 2f5d89c18..82dd574a5 100644 --- a/repos/ports/ports/seoul.hash +++ b/repos/ports/ports/seoul.hash @@ -1 +1 @@ -17edd2a944f378c3d7243eca9e7ed3da80d14e77 +49c315a92108ed1c7e0f356b2e6c72ad6a9422bb diff --git a/repos/ports/ports/seoul.port b/repos/ports/ports/seoul.port index 91ce3688c..57d70af90 100644 --- a/repos/ports/ports/seoul.port +++ b/repos/ports/ports/seoul.port @@ -4,7 +4,7 @@ DOWNLOADS := seoul.git URL(seoul) := https://github.com/alex-ab/seoul.git # branch genode_18_05 -REV(seoul) := c1f9575c30c66abffc9b7db86cf52ecb12a45ca7 +REV(seoul) := 01482004511abec65704ff9c32355f0e79ecf84a DIR(seoul) := src/app/seoul # diff --git a/repos/ports/src/app/seoul/network.cc b/repos/ports/src/app/seoul/network.cc index 330a8ece2..76e159a5c 100644 --- a/repos/ports/src/app/seoul/network.cc +++ b/repos/ports/src/app/seoul/network.cc @@ -48,6 +48,9 @@ void Seoul::Network::_handle_packets() _forward_pkt = 0; /* acknowledge received packet */ + if (!_nic.rx()->ready_to_ack()) + Logging::printf("not ready for acks"); + _nic.rx()->acknowledge_packet(rx_packet); } } @@ -59,6 +62,12 @@ bool Seoul::Network::transmit(void const * const packet, Genode::size_t len) /* don't end in an endless forwarding loop */ return false; + /* check for acknowledgements */ + while (_nic.tx()->ack_avail()) { + Nic::Packet_descriptor const ack = _nic.tx()->get_acked_packet(); + _nic.tx()->release_packet(ack); + } + /* allocate transmit packet */ Nic::Packet_descriptor tx_packet; try { @@ -70,20 +79,9 @@ bool Seoul::Network::transmit(void const * const packet, Genode::size_t len) /* fill packet with content */ char * const tx_content = _nic.tx()->packet_content(tx_packet); - _forward_pkt = tx_content; memcpy(tx_content, packet, len); _nic.tx()->submit_packet(tx_packet); - /* wait for acknowledgement */ - Nic::Packet_descriptor ack_tx_packet = _nic.tx()->get_acked_packet(); - - if (ack_tx_packet.size() != tx_packet.size() || - ack_tx_packet.offset() != tx_packet.offset()) - Logging::printf("error: unexpected acked packet\n"); - - /* release sent packet to free the space in the tx communication buffer */ - _nic.tx()->release_packet(tx_packet); - return true; }