mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-06 01:11:46 +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()
|
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()) {
|
while (_conn->tx()->ack_avail()) {
|
||||||
|
|
||||||
_conn->tx()->release_packet(_conn->tx()->get_acked_packet());
|
_conn->tx()->release_packet(_conn->tx()->get_acked_packet());
|
||||||
@ -310,8 +315,16 @@ class Genode::Uplink_client_base : Noncopyable
|
|||||||
throw Unexpected_call { };
|
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_rx_packet_avail_handler() { return false; }
|
||||||
|
|
||||||
|
virtual bool _custom_conn_tx_ack_avail_handler() { return false; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Uplink_client_base(Env &env,
|
Uplink_client_base(Env &env,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user