NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
flow_acl_sample.c File Reference
#include <string.h>
#include <unistd.h>
#include <doca_log.h>
#include <doca_flow.h>
#include "flow_common.h"
Include dependency graph for flow_acl_sample.c:

Go to the source code of this file.

Macros

#define ACL_MEM_REQ_PER_ENTRY   (32)
 
#define ACL_ACTIONS_MEM_SIZE(nr_queues, entries)
 

Functions

 DOCA_LOG_REGISTER (FLOW_ACL)
 
doca_error_t create_rx_pipe (struct doca_flow_port *port, int port_id, struct doca_flow_pipe **pipe)
 
doca_error_t create_acl_pipe (struct doca_flow_port *port, bool is_root, struct doca_flow_pipe **pipe)
 
doca_error_t add_acl_specific_entry (struct doca_flow_pipe *pipe, int port_id, struct entries_status *status, doca_be32_t src_ip_addr, doca_be32_t dst_ip_addr, doca_be16_t src_port, doca_be16_t dst_port, uint8_t l4_type, doca_be32_t src_ip_addr_mask, doca_be32_t dst_ip_addr_mask, doca_be16_t src_port_mask, doca_be16_t dst_port_mask, uint16_t priority, bool is_allow, enum doca_flow_flags_type flag)
 
doca_error_t add_acl_pipe_entries (struct doca_flow_pipe *pipe, int port_id, struct entries_status *status)
 
doca_error_t flow_acl (int nb_queues)
 

Variables

static enum doca_flow_pipe_domain domain = DOCA_FLOW_PIPE_DOMAIN_DEFAULT
 

Macro Definition Documentation

◆ ACL_ACTIONS_MEM_SIZE

#define ACL_ACTIONS_MEM_SIZE (   nr_queues,
  entries 
)
Value:
(uint32_t)(nr_queues * MIN_ACTIONS_MEM_SIZE_PER_QUEUE))) /* Total actions memory size */
#define MAX(X, Y)
Definition: utils.h:34
#define ACL_MEM_REQ_PER_ENTRY
static struct doca_flow_pipe_entry * entries[NB_ENTRIES]
#define DOCA_FLOW_MAX_ENTRY_ACTIONS_MEM_SIZE
meter mark color
Definition: doca_flow.h:264
#define MIN_ACTIONS_MEM_SIZE_PER_QUEUE
Definition: flow_common.h:64

Definition at line 38 of file flow_acl_sample.c.

◆ ACL_MEM_REQ_PER_ENTRY

#define ACL_MEM_REQ_PER_ENTRY   (32)

Definition at line 36 of file flow_acl_sample.c.

Function Documentation

◆ add_acl_pipe_entries()

doca_error_t add_acl_pipe_entries ( struct doca_flow_pipe *  pipe,
int  port_id,
struct entries_status status 
)

Definition at line 285 of file flow_acl_sample.c.

◆ add_acl_specific_entry()

doca_error_t add_acl_specific_entry ( struct doca_flow_pipe *  pipe,
int  port_id,
struct entries_status status,
doca_be32_t  src_ip_addr,
doca_be32_t  dst_ip_addr,
doca_be16_t  src_port,
doca_be16_t  dst_port,
uint8_t  l4_type,
doca_be32_t  src_ip_addr_mask,
doca_be32_t  dst_ip_addr_mask,
doca_be16_t  src_port_mask,
doca_be16_t  dst_port_mask,
uint16_t  priority,
bool  is_allow,
enum doca_flow_flags_type  flag 
)

Definition at line 207 of file flow_acl_sample.c.

◆ create_acl_pipe()

doca_error_t create_acl_pipe ( struct doca_flow_port *  port,
bool  is_root,
struct doca_flow_pipe **  pipe 
)

Definition at line 113 of file flow_acl_sample.c.

◆ create_rx_pipe()

doca_error_t create_rx_pipe ( struct doca_flow_port *  port,
int  port_id,
struct doca_flow_pipe **  pipe 
)

Definition at line 53 of file flow_acl_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( FLOW_ACL  )

◆ flow_acl()

doca_error_t flow_acl ( int  nb_queues)

Definition at line 373 of file flow_acl_sample.c.

Variable Documentation

◆ domain

Definition at line 34 of file flow_acl_sample.c.