NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
eth_rxq_common.c File Reference
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <doca_bitfield.h>
#include <doca_log.h>
#include <doca_flow.h>
#include "eth_rxq_common.h"
Include dependency graph for eth_rxq_common.c:

Go to the source code of this file.

Macros

#define COUNTERS_NUM   (1 << 19)
 
#define DEFAULT_METADATA   1234
 
#define DEFAULT_FLOW_TAG   5678
 

Functions

 DOCA_LOG_REGISTER (ETH::RXQ::COMMON)
 
static doca_error_t init_doca_flow (void)
 
static doca_error_t start_doca_flow_port (struct doca_dev *dev, struct doca_flow_port **df_port)
 
static doca_error_t create_root_pipe (struct doca_flow_port *df_port, uint16_t *rxq_flow_queue_ids, uint16_t nb_queues, struct doca_flow_pipe **root_pipe, struct doca_flow_pipe_entry **root_entry)
 
doca_error_t rxq_common_init_doca_flow (struct doca_dev *dev, struct eth_rxq_flow_resources *resources)
 
doca_error_t allocate_eth_rxq_flow_resources (struct eth_rxq_flow_config *cfg, struct eth_rxq_flow_resources *resources)
 
doca_error_t destroy_eth_rxq_flow_resources (struct eth_rxq_flow_resources *resources)
 
doca_error_t get_pkt_headroom (struct doca_buf *pkt, uint16_t *headroom_size)
 
doca_error_t get_pkt_tailroom (struct doca_buf *pkt, uint16_t *tailroom_size)
 

Variables

static bool is_flow_initialized = false
 

Macro Definition Documentation

◆ COUNTERS_NUM

#define COUNTERS_NUM   (1 << 19)

Definition at line 38 of file eth_rxq_common.c.

◆ DEFAULT_FLOW_TAG

#define DEFAULT_FLOW_TAG   5678

Definition at line 40 of file eth_rxq_common.c.

◆ DEFAULT_METADATA

#define DEFAULT_METADATA   1234

Definition at line 39 of file eth_rxq_common.c.

Function Documentation

◆ allocate_eth_rxq_flow_resources()

doca_error_t allocate_eth_rxq_flow_resources ( struct eth_rxq_flow_config cfg,
struct eth_rxq_flow_resources resources 
)

Definition at line 272 of file eth_rxq_common.c.

◆ create_root_pipe()

static doca_error_t create_root_pipe ( struct doca_flow_port *  df_port,
uint16_t *  rxq_flow_queue_ids,
uint16_t  nb_queues,
struct doca_flow_pipe **  root_pipe,
struct doca_flow_pipe_entry **  root_entry 
)
static

Definition at line 145 of file eth_rxq_common.c.

◆ destroy_eth_rxq_flow_resources()

doca_error_t destroy_eth_rxq_flow_resources ( struct eth_rxq_flow_resources resources)

Definition at line 298 of file eth_rxq_common.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( ETH::RXQ::COMMON  )

◆ get_pkt_headroom()

doca_error_t get_pkt_headroom ( struct doca_buf *  pkt,
uint16_t *  headroom_size 
)

Definition at line 321 of file eth_rxq_common.c.

◆ get_pkt_tailroom()

doca_error_t get_pkt_tailroom ( struct doca_buf *  pkt,
uint16_t *  tailroom_size 
)

Definition at line 341 of file eth_rxq_common.c.

◆ init_doca_flow()

static doca_error_t init_doca_flow ( void  )
static

Definition at line 49 of file eth_rxq_common.c.

◆ rxq_common_init_doca_flow()

doca_error_t rxq_common_init_doca_flow ( struct doca_dev *  dev,
struct eth_rxq_flow_resources resources 
)

Definition at line 238 of file eth_rxq_common.c.

◆ start_doca_flow_port()

static doca_error_t start_doca_flow_port ( struct doca_dev *  dev,
struct doca_flow_port **  df_port 
)
static

Definition at line 97 of file eth_rxq_common.c.

Variable Documentation

◆ is_flow_initialized

bool is_flow_initialized = false
static

Definition at line 42 of file eth_rxq_common.c.