mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 00:24:51 +00:00
nic: add _custom_conn_tx_ack_avail_handler()
The custom ack avail handler is required for zero-copy nic drivers (e.g. the zynq nic driver), which must release the corresponding DMA buffers. Fixes genodelabs/genode#4277
This commit is contained in:
parent
332cfb38c1
commit
87bb81cd66
@ -66,6 +66,11 @@ class Genode::Uplink_client_base : Noncopyable
|
||||
|
||||
void _conn_tx_handle_ack_avail()
|
||||
{
|
||||
if (_custom_conn_tx_ack_avail_handler()) {
|
||||
_custom_conn_tx_handle_ack_avail();
|
||||
return;
|
||||
}
|
||||
|
||||
while (_conn->tx()->ack_avail()) {
|
||||
|
||||
_conn->tx()->release_packet(_conn->tx()->get_acked_packet());
|
||||
@ -310,8 +315,16 @@ class Genode::Uplink_client_base : Noncopyable
|
||||
throw Unexpected_call { };
|
||||
}
|
||||
|
||||
virtual void _custom_conn_tx_handle_ack_avail()
|
||||
{
|
||||
class Unexpected_call { };
|
||||
throw Unexpected_call { };
|
||||
}
|
||||
|
||||
virtual bool _custom_conn_rx_packet_avail_handler() { return false; }
|
||||
|
||||
virtual bool _custom_conn_tx_ack_avail_handler() { return false; }
|
||||
|
||||
public:
|
||||
|
||||
Uplink_client_base(Env &env,
|
||||
|
Loading…
x
Reference in New Issue
Block a user