| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |
#include <inttypes.h>#include <time.h>#include <doca_buf.h>#include <doca_common_defines.h>#include <doca_ctx.h>#include <doca_eth_rxq.h>#include <doca_eth_rxq_cpu_data_path.h>#include <doca_eth_txq.h>#include <doca_eth_txq_cpu_data_path.h>#include <doca_log.h>#include <doca_pe.h>#include <samples/common.h>#include <samples/doca_eth/eth_rxq_common.h>#include "eth_l2_fwd_core.h"
Go to the source code of this file.
Data Structures | |
| struct | eth_l2_fwd_dev_stats |
| struct | eth_l2_fwd_stats |
Macros | |
| #define | NS_PER_SEC 1E9 /* Nano-seconds per second */ |
| #define | STATS_MAX_BUFF_SIZE 1024 /* Max buffer size to hold statistics string */ |
Functions | |
| DOCA_LOG_REGISTER (ETH_L2_FWD :Core) | |
| static void | eth_l2_fwd_show_stats (void) |
| static doca_error_t | check_device_caps (struct doca_devinfo *devinfo) |
| static doca_error_t | create_mmap (struct doca_dev *dev1, struct doca_dev *dev2, struct mmap_resources *mmap_res) |
| static void | rx_success_cb1 (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 | rx_success_cb2 (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 | rx_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 void | tx_success_cb1 (struct doca_task_batch *task_batch, uint16_t tasks_num, union doca_data ctx_user_data, union doca_data task_batch_user_data, union doca_data *task_user_data_array, struct doca_buf **pkt_array, doca_error_t *status_array) |
| static void | tx_success_cb2 (struct doca_task_batch *task_batch, uint16_t tasks_num, union doca_data ctx_user_data, union doca_data task_batch_user_data, union doca_data *task_user_data_array, struct doca_buf **pkt_array, doca_error_t *status_array) |
| static void | tx_error_cb (struct doca_task_batch *task_batch, uint16_t tasks_num, union doca_data ctx_user_data, union doca_data task_batch_user_data, union doca_data *task_user_data_array, struct doca_buf **pkt_array, doca_error_t *status_array) |
| static doca_error_t | init_eth_rxq_ctx (struct eth_l2_fwd_cfg *cfg, struct eth_l2_fwd_dev_resources *dev_resrc, struct doca_pe *pe, doca_eth_rxq_event_batch_managed_recv_handler_cb_t rx_success_cb, void *data) |
| static doca_error_t | init_eth_txq_ctx (struct eth_l2_fwd_cfg *cfg, struct eth_l2_fwd_dev_resources *dev_resrc, struct doca_pe *pe, doca_eth_txq_task_batch_send_completion_cb_t tx_success_cb) |
| static doca_error_t | forward_pkts (struct doca_pe *pe) |
| doca_error_t | eth_l2_fwd_execute (struct eth_l2_fwd_cfg *cfg, struct eth_l2_fwd_resources *state) |
| void | eth_l2_fwd_force_stop (void) |
| doca_error_t | eth_l2_fwd_cleanup (struct eth_l2_fwd_resources *state) |
Variables | |
| static bool | force_app_stop = false |
| static uint32_t | total_forwardings = 0 |
| uint32_t | max_forwardings = 0 |
| static struct eth_l2_fwd_stats | stats |
| #define NS_PER_SEC 1E9 /* Nano-seconds per second */ |
Definition at line 44 of file eth_l2_fwd_core.c.
| #define STATS_MAX_BUFF_SIZE 1024 /* Max buffer size to hold statistics string */ |
Definition at line 45 of file eth_l2_fwd_core.c.
|
static |
Definition at line 202 of file eth_l2_fwd_core.c.
|
static |
Create a DOCA mmap, initialize and start it
@dev1 [in]: DOCA device to set to mmap @dev2 [in]: DOCA device to set to mmap @mmap_res [in/out]: DOCA mmap resources to use for mmap creation
Definition at line 228 of file eth_l2_fwd_core.c.
| DOCA_LOG_REGISTER | ( | ETH_L2_FWD :Core | ) |
| doca_error_t eth_l2_fwd_cleanup | ( | struct eth_l2_fwd_resources * | state | ) |
Definition at line 891 of file eth_l2_fwd_core.c.
| doca_error_t eth_l2_fwd_execute | ( | struct eth_l2_fwd_cfg * | cfg, |
| struct eth_l2_fwd_resources * | state | ||
| ) |
Definition at line 736 of file eth_l2_fwd_core.c.
| void eth_l2_fwd_force_stop | ( | void | ) |
Definition at line 886 of file eth_l2_fwd_core.c.
|
static |
Definition at line 85 of file eth_l2_fwd_core.c.
|
static |
Definition at line 708 of file eth_l2_fwd_core.c.
|
static |
Definition at line 537 of file eth_l2_fwd_core.c.
|
static |
Definition at line 639 of file eth_l2_fwd_core.c.
|
static |
Definition at line 392 of file eth_l2_fwd_core.c.
|
static |
Definition at line 292 of file eth_l2_fwd_core.c.
|
static |
Definition at line 342 of file eth_l2_fwd_core.c.
|
static |
Definition at line 496 of file eth_l2_fwd_core.c.
|
static |
Definition at line 426 of file eth_l2_fwd_core.c.
|
static |
Definition at line 461 of file eth_l2_fwd_core.c.
Definition at line 50 of file eth_l2_fwd_core.c.
| uint32_t max_forwardings = 0 |
Definition at line 55 of file eth_l2_fwd_core.c.
|
static |
Definition at line 55 of file eth_l2_fwd_core.c.
|
static |
Definition at line 52 of file eth_l2_fwd_core.c.