#include <time.h>
#include <stdint.h>
#include <unistd.h>
#include <doca_flow.h>
#include <doca_buf.h>
#include <doca_buf_inventory.h>
#include <doca_ctx.h>
#include <doca_eth_rxq.h>
#include <doca_eth_rxq_cpu_data_path.h>
#include <doca_error.h>
#include <doca_log.h>
#include "common.h"
#include "eth_common.h"
#include "eth_rxq_common.h"
Go to the source code of this file.
|
| #define | SLEEP_IN_NANOS (10 * 1000) /* sample for event batch every 10 microseconds */ |
| |
| #define | MAX_BURST_SIZE 2048 /* Max burst size to set for eth_rxq */ |
| |
| #define | MAX_PKT_SIZE 1600 /* Max packet size to set for eth_rxq */ |
| |
| #define | RATE 10000 /* Traffic max rate in [MB/s] */ |
| |
| #define | LOG_MAX_LRO_PKT_SIZE 15 /* Log of max LRO packet size */ |
| |
| #define | PKT_MAX_TIME 10 /* Max time in [μs] to process a packet */ |
| |
| #define | COUNTERS_NUM (1 << 19) /* Number of counters to configure for DOCA flow*/ |
| |
| #define | SAMPLE_RUNS_TIME 30 /* Sample total run-time in [s] */ |
| |
|
| | DOCA_LOG_REGISTER (ETH_RXQ_BATCH_MANAGED_MEMPOOL_RECEIVE) |
| |
| static void | event_batch_managed_rcv_success_cb (struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, uint16_t events_number, union doca_data event_batch_user_data, doca_error_t status, struct doca_buf **pkt_array) |
| |
| static void | event_batch_managed_rcv_error_cb (struct doca_eth_rxq_event_batch_managed_recv *event_batch_managed_recv, uint16_t events_number, union doca_data event_batch_user_data, doca_error_t status, struct doca_buf **pkt_array) |
| |
| static doca_error_t | destroy_eth_rxq_ctx (struct eth_rxq_sample_objects *state) |
| |
| static void | retrieve_rxq_managed_recv_event_batches (struct eth_rxq_sample_objects *state) |
| |
| static doca_error_t | create_eth_rxq_ctx (struct eth_rxq_sample_objects *state) |
| |
| static void | eth_rxq_cleanup (struct eth_rxq_sample_objects *state) |
| |
| static doca_error_t | check_device (struct doca_devinfo *devinfo) |
| |
| doca_error_t | eth_rxq_batch_managed_mempool_receive (const char *ib_dev_name, bool timestamp_enable, uint16_t headroom_size, uint16_t tailroom_size) |
| |
◆ COUNTERS_NUM
| #define COUNTERS_NUM (1 << 19) /* Number of counters to configure for DOCA flow*/ |
◆ LOG_MAX_LRO_PKT_SIZE
| #define LOG_MAX_LRO_PKT_SIZE 15 /* Log of max LRO packet size */ |
◆ MAX_BURST_SIZE
| #define MAX_BURST_SIZE 2048 /* Max burst size to set for eth_rxq */ |
◆ MAX_PKT_SIZE
| #define MAX_PKT_SIZE 1600 /* Max packet size to set for eth_rxq */ |
◆ PKT_MAX_TIME
| #define PKT_MAX_TIME 10 /* Max time in [μs] to process a packet */ |
◆ RATE
| #define RATE 10000 /* Traffic max rate in [MB/s] */ |
◆ SAMPLE_RUNS_TIME
| #define SAMPLE_RUNS_TIME 30 /* Sample total run-time in [s] */ |
◆ SLEEP_IN_NANOS
| #define SLEEP_IN_NANOS (10 * 1000) /* sample for event batch every 10 microseconds */ |
◆ check_device()
| static doca_error_t check_device |
( |
struct doca_devinfo * |
devinfo | ) |
|
|
static |
◆ create_eth_rxq_ctx()
◆ destroy_eth_rxq_ctx()
◆ DOCA_LOG_REGISTER()
| DOCA_LOG_REGISTER |
( |
ETH_RXQ_BATCH_MANAGED_MEMPOOL_RECEIVE |
| ) |
|
◆ eth_rxq_batch_managed_mempool_receive()
| doca_error_t eth_rxq_batch_managed_mempool_receive |
( |
const char * |
ib_dev_name, |
|
|
bool |
timestamp_enable, |
|
|
uint16_t |
headroom_size, |
|
|
uint16_t |
tailroom_size |
|
) |
| |
◆ eth_rxq_cleanup()
◆ event_batch_managed_rcv_error_cb()
| static void event_batch_managed_rcv_error_cb |
( |
struct doca_eth_rxq_event_batch_managed_recv * |
event_batch_managed_recv, |
|
|
uint16_t |
events_number, |
|
|
union doca_data |
event_batch_user_data, |
|
|
doca_error_t |
status, |
|
|
struct doca_buf ** |
pkt_array |
|
) |
| |
|
static |
◆ event_batch_managed_rcv_success_cb()
| static void event_batch_managed_rcv_success_cb |
( |
struct doca_eth_rxq_event_batch_managed_recv * |
event_batch_managed_recv, |
|
|
uint16_t |
events_number, |
|
|
union doca_data |
event_batch_user_data, |
|
|
doca_error_t |
status, |
|
|
struct doca_buf ** |
pkt_array |
|
) |
| |
|
static |
◆ retrieve_rxq_managed_recv_event_batches()