mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 08:25:38 +00:00
packet_stream: always emit ack_avail
When using signal batching, ack_avail and packet_avail should always be emitted and preferred over ready_to_submit and ready_to_ack. A signal receiver might decide to not register the ready_to_* signals when it handles congestion by dropping packets. The Nic router is an example of such a signal receiver. genodelabs/genode#4555
This commit is contained in:
parent
8193f5571a
commit
6a308dacd7
@ -772,11 +772,12 @@ class Genode::Packet_stream_source : private Packet_stream_base
|
||||
* Wake up the packet sink if needed
|
||||
*
|
||||
* This method assumes that the same signal handler is used for
|
||||
* the submit transmitter and the ack receiver.
|
||||
* the submit transmitter and the ack receiver. The ack receiver is not
|
||||
* signalled if the submit transmitter was already signalled.
|
||||
*/
|
||||
void wakeup()
|
||||
{
|
||||
/* submit only one signal */
|
||||
/* submit only one signal, prefer submit transmitter over ack receiver */
|
||||
_submit_transmitter.tx_wakeup() || _ack_receiver.rx_wakeup();
|
||||
}
|
||||
|
||||
@ -930,12 +931,13 @@ class Genode::Packet_stream_sink : private Packet_stream_base
|
||||
* Wake up the packet source if needed
|
||||
*
|
||||
* This method assumes that the same signal handler is used for
|
||||
* the submit receiver and the ack transmitter.
|
||||
* the submit receiver and the ack transmitter. The submit receiver
|
||||
* is not signalled if the ack transmitter was already signalled.
|
||||
*/
|
||||
void wakeup()
|
||||
{
|
||||
/* submit only one signal */
|
||||
_submit_receiver.rx_wakeup() || _ack_transmitter.tx_wakeup();
|
||||
/* submit only one signal, prefer ack_avail signal over ready_to_submit */
|
||||
_ack_transmitter.tx_wakeup() || _submit_receiver.rx_wakeup();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user