DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dpdklibs
include
dpdklibs
sender
DpdkTxBackend.hpp
Go to the documentation of this file.
1
13
#ifndef DPDKLIBS_INCLUDE_DPDKLIBS_SENDER_DPDKTXBACKEND_HPP_
14
#define DPDKLIBS_INCLUDE_DPDKLIBS_SENDER_DPDKTXBACKEND_HPP_
15
16
#include <rte_mempool.h>
17
18
#include <cstddef>
19
#include <cstdint>
20
21
namespace
dunedaq::dpdklibs::sender
{
22
23
struct
DpdkTxBackend
24
{
25
rte_mempool*
pool
=
nullptr
;
26
std::uint16_t
port
= 0;
// NOLINT(build/unsigned)
27
std::uint16_t
queue
= 0;
// NOLINT(build/unsigned)
28
29
// Returns nullptr if the pool is exhausted.
30
void
*
alloc
();
31
32
// Appends bytes to the mbuf and sets l2_len, l3_len and l4_len. Returns the
33
// start of the appended region, or nullptr if the tailroom is smaller than
34
// bytes.
35
std::uint8_t*
prepare
(
void
* buf, std::size_t bytes);
// NOLINT(build/unsigned)
36
37
// Enqueues one mbuf. Returns false if the TX ring did not accept it, in
38
// which case the caller still owns buf.
39
bool
transmit
(
void
* buf);
40
41
void
free
(
void
* buf);
42
};
43
44
}
// namespace dunedaq::dpdklibs::sender
45
46
#endif
// DPDKLIBS_INCLUDE_DPDKLIBS_SENDER_DPDKTXBACKEND_HPP_
dunedaq::dpdklibs::sender
Definition
CallbackGate.hpp:35
dunedaq::dpdklibs::sender::DpdkTxBackend
Definition
DpdkTxBackend.hpp:24
dunedaq::dpdklibs::sender::DpdkTxBackend::free
void free(void *buf)
Definition
DpdkTxBackend.cpp:50
dunedaq::dpdklibs::sender::DpdkTxBackend::alloc
void * alloc()
Definition
DpdkTxBackend.cpp:22
dunedaq::dpdklibs::sender::DpdkTxBackend::prepare
std::uint8_t * prepare(void *buf, std::size_t bytes)
Definition
DpdkTxBackend.cpp:28
dunedaq::dpdklibs::sender::DpdkTxBackend::queue
std::uint16_t queue
Definition
DpdkTxBackend.hpp:27
dunedaq::dpdklibs::sender::DpdkTxBackend::port
std::uint16_t port
Definition
DpdkTxBackend.hpp:26
dunedaq::dpdklibs::sender::DpdkTxBackend::transmit
bool transmit(void *buf)
Definition
DpdkTxBackend.cpp:42
dunedaq::dpdklibs::sender::DpdkTxBackend::pool
rte_mempool * pool
Definition
DpdkTxBackend.hpp:25
Generated on
for DUNE-DAQ by
1.18.0