class RxQueue
Defined at line 35 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.h
Public Members
static const uint64_t kTriggerRxKey
static const uint64_t kSessionSwitchKey
static const uint64_t kFifoWatchKey
static const uint64_t kQuitWatchKey
static const uint64_t kTimerWatchKey
Public Methods
zx::result<std::unique_ptr<RxQueue>> Create (DeviceInterface * parent)
Defined at line 27 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void ~RxQueue ()
Defined at line 20 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void AssertParentRxLocked (DeviceInterface & parent)
Helper function with TA annotations that bridges the gap between parent's locks and local
locking requirements; TA is not otherwise able to tell that the |parent| and |parent_| are the
same entity.
Defined at line 49 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.h
void SetSession (Session * session)
Defined at line 70 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.h
uint64_t rx_completed_frame_index ()
Defined at line 97 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.h
void PurgeSession ()
Drops all queued buffers attributed to the given session, and marks the session as rx-disabled.
Called by the DeviceInterface parent when the session is marked as dead.
Defined at line 148 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void CompleteRxList (const fidl::VectorView< ::fuchsia_hardware_network_driver::wire::RxBuffer> & rx_buffer_list)
Returns rx buffers to their respective sessions.
Defined at line 216 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void TriggerSessionChanged ()
Notifies watcher thread that the session changed.
Defined at line 116 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void TriggerRxWatch ()
Poke watcher thread to try to fetch more rx descriptors.
Defined at line 101 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void JoinThread ()
Kills and joins the watcher thread.
Defined at line 130 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void MaybeDelegateRxLease ()
Helper function to verify if a pending rx lease can be delegated to the
session.
void SetRxBufferManagement (const netdriver::RxBufferManagement & management)
Defined at line 478 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void UpdatePeakRateInSamplePeriod (uint64_t sample_rate)
Updates the packet arrival rate for dynamic Rx buffer management.
Defined at line 513 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void TimerTick ()
Runs when a timer is fired for dynamic Rx buffer management to update target buffers and
evaluate VMO releases.
Defined at line 547 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
bool SetTargetRxBuffersIfMore (uint16_t target)
Like the |SetTargetRxBuffer|, but only updates the target buffer if requesting more.
Returns true if the target buffer number is increased.
Defined at line 575 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void RequestRxSpace (fit::callback<void (fit::result<std::tuple<zx_status_t, DataVmoList>>)> cb)
Requests for more Rx buffers if available to accommodate the target available buffers.
The optional callback is called after wanted VMOs are prepared. Note that the callback
is NOT called if |RequestRxSpace| does not schedule any VMOs to be prepared.
Defined at line 582 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void SetRxVmos (RxVmoList rx_vmos)
Sets the Rx VMOs in use for the queue. The list must be sorted by their VMO ids to allow
fast check whether a buffer descriptor belongs to a prepared VMO or not. These VMOs may
be dynamically managed based on the parameters provided by the device implementation driver.
Defined at line 441 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc
void VmoOpFinished (zx_status_t status)
Callback for VMO operation completion. When a preparation completes, it makes all previously
withheld buffers available. When a release completes, it decommits the VMO to finish memory
reclamation.
Defined at line 623 of file ../../src/connectivity/network/drivers/network-device/device/rx_queue.cc