Agora
1.2.0
Agora project
|
Go to the documentation of this file.
6 #ifndef TXRX_WORKER_DPDK_H_
7 #define TXRX_WORKER_DPDK_H_
19 TxRxWorkerDpdk(
size_t core_offset,
size_t tid,
size_t interface_count,
20 size_t interface_offset,
Config*
const config,
21 size_t* rx_frame_start,
26 std::vector<RxPacket>& rx_memory,
std::byte*
const tx_memory,
27 std::mutex& sync_mutex, std::condition_variable& sync_cond,
28 std::atomic<bool>& can_proceed,
29 std::vector<std::pair<uint16_t, uint16_t>> dpdk_phy,
30 rte_mempool* mbuf_pool);
37 std::vector<Packet*>
RecvEnqueue(uint16_t port_id, uint16_t queue_id);
40 bool Filter(rte_mbuf* packet, uint16_t port_id, uint16_t queue_id);
51 #endif // TXRX_WORKER_DPDK_H_
static void InstallFlowRule(uint16_t port_id, uint16_t rx_q, uint32_t src_ip, uint32_t dest_ip, uint16_t src_port, uint16_t dst_port)
class RadioSocket __attribute__
std::vector< Packet * > RecvEnqueue(uint16_t port_id, uint16_t queue_id)
Definition: txrx_worker_dpdk.cc:153
size_t DequeueSend()
Definition: txrx_worker_dpdk.cc:222
byte
Definition: core.h:388
Definition: concurrentqueue.h:630
void Running(bool value)
Definition: config.h:33
uint32_t frame_id_
Definition: message.h:168
uint32_t bs_rru_addr_
Definition: txrx_worker_dpdk.h:42
auto printf(const S &fmt, const T &... args) -> int
Definition: printf.h:631
static rte_mbuf * AllocUdp(rte_mempool *mbuf_pool, rte_ether_addr src_mac_addr, rte_ether_addr dst_mac_addr, uint32_t src_ip_addr, uint32_t dst_ip_addr, uint16_t src_udp_port, uint16_t dst_udp_port, size_t buffer_length, uint16_t pkt_id)
uint16_t src_port
Definition: eth_common.h:60
size_t *const rx_frame_start_
Definition: txrx_worker.h:59
uint16_t symbol_id_
Definition: message.h:33
uint32_t ant_id_
Definition: message.h:171
std::vector< rte_ether_addr > src_mac_
Definition: txrx_worker_dpdk.h:48
std::vector< rte_ether_addr > dest_mac_
Definition: txrx_worker_dpdk.h:49
Packet * GetTxPacket(size_t frame, size_t symbol, size_t ant)
Definition: txrx_worker.cc:160
bool Running() const
Definition: txrx_worker.h:42
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
void DoTxRx() final
Definition: txrx_worker_dpdk.cc:105
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
Definition: message.h:227
void WaitSync()
Using a latch might be better but adds c++20 requirement.
Definition: txrx_worker.cc:64
txrx worker dpdk definition. This is the simulator declaration with dpdk enhancements
static void PrintPkt(rte_be32_t src_ip, rte_be32_t dst_ip, rte_be16_t src_port, rte_be16_t dst_port, size_t len, size_t tid)
void Start() final
Definition: txrx_worker_dpdk.cc:89
static constexpr bool kDebugPrintInTask
Definition: symbols.h:201
std::vector< EventData > GetPendingTxEvents(size_t max_events=0)
Definition: txrx_worker.cc:85
void Stop() final
Definition: txrx_worker_dpdk.cc:99
Definition: message.h:142
int BsRruPort() const
Definition: config.h:305
uint16_t ant_id_
Definition: message.h:38
Self defined functions for message storage and passing.
#define unlikely(x)
Definition: utils.h:16
int BsServerPort() const
Definition: config.h:304
for i
Definition: generate_data.m:107
rte_mempool * mbuf_pool_
Definition: txrx_worker_dpdk.h:47
static size_t Rdtsc()
Return the TSC.
Definition: gettime.h:25
~TxRxWorkerDpdk() final
Definition: txrx_worker_dpdk.cc:79
std::string BsServerAddr() const
Definition: config.h:299
Definition: message.h:164
Config * Configuration()
Definition: txrx_worker.h:46
uint32_t symbol_id_
Definition: message.h:169
size_t tag_
Definition: message.h:43
static constexpr size_t kNumStatsFrames
Definition: symbols.h:300
const std::vector< std::pair< uint16_t, uint16_t > > dpdk_phy_port_queues_
Definition: txrx_worker_dpdk.h:45
bool NotifyComplete(const EventData &complete_event)
Definition: txrx_worker.cc:75
Definition: txrx_worker.h:18
static constexpr bool kIsWorkerTimingEnabled
Definition: symbols.h:303
RxPacket & GetRxPacket()
Definition: txrx_worker.cc:104
const size_t channels_per_interface_
Definition: txrx_worker.h:58
const std::vector< size_t > & CellId() const
Definition: config.h:368
const size_t tid_
Definition: txrx_worker.h:54
uint32_t bs_server_addr_
Definition: txrx_worker_dpdk.h:43
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
Definition: json.hpp:5213
#define AGORA_LOG_FRAME(...)
Definition: logger.h:72
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
Definition: txrx_worker_dpdk.h:16
#define AGORA_LOG_WARN(...)
Definition: logger.h:53
uint16_t eth_type
Definition: eth_common.h:62
static constexpr bool kDebugDPDK
Definition: txrx_worker_dpdk.cc:19
static constexpr size_t kPayloadOffset
Offset to the payload starting from the beginning of the UDP frame.
Definition: dpdk_transport.h:48
bool Filter(rte_mbuf *packet, uint16_t port_id, uint16_t queue_id)
Definition: txrx_worker_dpdk.cc:285
static constexpr size_t kRxBatchSize
Maximum number of packets received in rx_burst.
Definition: dpdk_transport.h:40
static constexpr size_t kTxBatchSize
Definition: dpdk_transport.h:41
const size_t interface_offset_
Definition: txrx_worker.h:57
Declaration file for the DpdkTransport class.
const size_t num_interfaces_
Definition: txrx_worker.h:56
uint32_t frame_id_
Definition: message.h:32
txrx worker thread definition. This is the parent / interface
bool running_
Definition: txrx_worker.h:60
std::string BsRruAddr() const
Definition: config.h:302
static void ClassFunctioWrapper(TxRxWorkerDpdk *context)
Definition: txrx_worker_dpdk.cc:83