Agora  1.2.0
Agora project
TxRxWorkerDpdk Class Reference

#include <txrx_worker_dpdk.h>

Inheritance diagram for TxRxWorkerDpdk:
Collaboration diagram for TxRxWorkerDpdk:

Public Member Functions

 TxRxWorkerDpdk ()=delete
 
 TxRxWorkerDpdk (size_t core_offset, size_t tid, size_t interface_count, size_t interface_offset, Config *const config, size_t *rx_frame_start, moodycamel::ConcurrentQueue< EventData > *event_notify_q, moodycamel::ConcurrentQueue< EventData > *tx_pending_q, moodycamel::ProducerToken &tx_producer, moodycamel::ProducerToken &notify_producer, std::vector< RxPacket > &rx_memory, std::byte *const tx_memory, std::mutex &sync_mutex, std::condition_variable &sync_cond, std::atomic< bool > &can_proceed, std::vector< std::pair< uint16_t, uint16_t >> dpdk_phy, rte_mempool *mbuf_pool)
 
 ~TxRxWorkerDpdk () final
 
void DoTxRx () final
 
void Start () final
 
void Stop () final
 
- Public Member Functions inherited from TxRxWorker
 TxRxWorker (size_t core_offset, size_t tid, size_t interface_count, size_t interface_offset, size_t channels_per_interface, Config *const config, size_t *rx_frame_start, moodycamel::ConcurrentQueue< EventData > *event_notify_q, moodycamel::ConcurrentQueue< EventData > *tx_pending_q, moodycamel::ProducerToken &tx_producer, moodycamel::ProducerToken &notify_producer, std::vector< RxPacket > &rx_memory, std::byte *const tx_memory, std::mutex &sync_mutex, std::condition_variable &sync_cond, std::atomic< bool > &can_proceed)
 
 TxRxWorker ()=delete
 
virtual ~TxRxWorker ()
 
size_t Id () const
 
bool Started () const
 
bool Running () const
 

Private Member Functions

std::vector< Packet * > RecvEnqueue (uint16_t port_id, uint16_t queue_id)
 
size_t DequeueSend ()
 
bool Filter (rte_mbuf *packet, uint16_t port_id, uint16_t queue_id)
 

Private Attributes

uint32_t bs_rru_addr_
 
uint32_t bs_server_addr_
 
const std::vector< std::pair< uint16_t, uint16_t > > dpdk_phy_port_queues_
 
rte_mempool * mbuf_pool_
 
std::vector< rte_ether_addr > src_mac_
 
std::vector< rte_ether_addr > dest_mac_
 

Additional Inherited Members

- Static Public Attributes inherited from TxRxWorker
static constexpr bool kDebugTxMemory = false
 
- Protected Member Functions inherited from TxRxWorker
void WaitSync ()
 Using a latch might be better but adds c++20 requirement. More...
 
ConfigConfiguration ()
 
bool NotifyComplete (const EventData &complete_event)
 
std::vector< EventDataGetPendingTxEvents (size_t max_events=0)
 
RxPacketGetRxPacket ()
 
void ReturnRxPacket (RxPacket &unused_packet)
 
PacketGetTxPacket (size_t frame, size_t symbol, size_t ant)
 
PacketGetUlTxPacket (size_t frame, size_t symbol, size_t ant)
 
- Protected Attributes inherited from TxRxWorker
const size_t tid_
 
const size_t core_offset_
 
const size_t num_interfaces_
 
const size_t interface_offset_
 
const size_t channels_per_interface_
 
size_t *const rx_frame_start_
 
bool running_
 
std::mutex & mutex_
 Owned by the parent TxRx object for sync. More...
 
std::condition_variable & cond_
 
std::atomic< bool > & can_proceed_
 

Constructor & Destructor Documentation

◆ TxRxWorkerDpdk() [1/2]

TxRxWorkerDpdk::TxRxWorkerDpdk ( )
delete

◆ TxRxWorkerDpdk() [2/2]

TxRxWorkerDpdk::TxRxWorkerDpdk ( size_t  core_offset,
size_t  tid,
size_t  interface_count,
size_t  interface_offset,
Config *const  config,
size_t *  rx_frame_start,
moodycamel::ConcurrentQueue< EventData > *  event_notify_q,
moodycamel::ConcurrentQueue< EventData > *  tx_pending_q,
moodycamel::ProducerToken tx_producer,
moodycamel::ProducerToken notify_producer,
std::vector< RxPacket > &  rx_memory,
std::byte *const  tx_memory,
std::mutex &  sync_mutex,
std::condition_variable &  sync_cond,
std::atomic< bool > &  can_proceed,
std::vector< std::pair< uint16_t, uint16_t >>  dpdk_phy,
rte_mempool *  mbuf_pool 
)
Here is the call graph for this function:

◆ ~TxRxWorkerDpdk()

TxRxWorkerDpdk::~TxRxWorkerDpdk ( )
final
Here is the call graph for this function:

Member Function Documentation

◆ DequeueSend()

size_t TxRxWorkerDpdk::DequeueSend ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoTxRx()

void TxRxWorkerDpdk::DoTxRx ( )
finalvirtual

Implements TxRxWorker.

Here is the call graph for this function:

◆ Filter()

bool TxRxWorkerDpdk::Filter ( rte_mbuf *  packet,
uint16_t  port_id,
uint16_t  queue_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecvEnqueue()

std::vector< Packet * > TxRxWorkerDpdk::RecvEnqueue ( uint16_t  port_id,
uint16_t  queue_id 
)
private
Todo:
Add support / detection of fragmented packets
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Start()

void TxRxWorkerDpdk::Start ( )
finalvirtual

Reimplemented from TxRxWorker.

Here is the call graph for this function:

◆ Stop()

void TxRxWorkerDpdk::Stop ( )
finalvirtual

Reimplemented from TxRxWorker.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bs_rru_addr_

uint32_t TxRxWorkerDpdk::bs_rru_addr_
private

◆ bs_server_addr_

uint32_t TxRxWorkerDpdk::bs_server_addr_
private

◆ dest_mac_

std::vector<rte_ether_addr> TxRxWorkerDpdk::dest_mac_
private

◆ dpdk_phy_port_queues_

const std::vector<std::pair<uint16_t, uint16_t> > TxRxWorkerDpdk::dpdk_phy_port_queues_
private

◆ mbuf_pool_

rte_mempool* TxRxWorkerDpdk::mbuf_pool_
private

◆ src_mac_

std::vector<rte_ether_addr> TxRxWorkerDpdk::src_mac_
private

The documentation for this class was generated from the following files: