NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
simple_fwd_pkt.c File Reference
#include <rte_ether.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
#include <rte_tcp.h>
#include <rte_udp.h>
#include <rte_gre.h>
#include <rte_gtp.h>
#include <rte_vxlan.h>
#include <doca_log.h>
#include "simple_fwd_pkt.h"
Include dependency graph for simple_fwd_pkt.c:

Go to the source code of this file.

Macros

#define GTP_ESPN_FLAGS_ON(p)   (p & 0x7) /* A macro for setting GTP ESPN flags on */
 
#define GTP_EXT_FLAGS_ON(p)   (p & 0x4) /* A macro for setting GTP EXT flags on */
 

Functions

 DOCA_LOG_REGISTER (SIMPLE_FWD_PKT)
 
uint8_t * simple_fwd_pinfo_outer_mac_dst (struct simple_fwd_pkt_info *pinfo)
 
uint8_t * simple_fwd_pinfo_outer_mac_src (struct simple_fwd_pkt_info *pinfo)
 
doca_be32_t simple_fwd_pinfo_outer_ipv4_dst (struct simple_fwd_pkt_info *pinfo)
 
doca_be32_t simple_fwd_pinfo_outer_ipv4_src (struct simple_fwd_pkt_info *pinfo)
 
doca_be32_t simple_fwd_pinfo_inner_ipv4_dst (struct simple_fwd_pkt_info *pinfo)
 
doca_be32_t simple_fwd_pinfo_inner_ipv4_src (struct simple_fwd_pkt_info *pinfo)
 
static doca_be16_t simple_fwd_pinfo_src_port (struct simple_fwd_pkt_format *fmt)
 
static doca_be16_t simple_fwd_pinfo_dst_port (struct simple_fwd_pkt_format *fmt)
 
doca_be16_t simple_fwd_pinfo_inner_src_port (struct simple_fwd_pkt_info *pinfo)
 
doca_be16_t simple_fwd_pinfo_inner_dst_port (struct simple_fwd_pkt_info *pinfo)
 
doca_be16_t simple_fwd_pinfo_outer_src_port (struct simple_fwd_pkt_info *pinfo)
 
doca_be16_t simple_fwd_pinfo_outer_dst_port (struct simple_fwd_pkt_info *pinfo)
 
static int simple_fwd_parse_pkt_format (uint8_t *data, int len, bool l2, struct simple_fwd_pkt_format *fmt)
 
static int simple_fwd_parse_is_tun (struct simple_fwd_pkt_info *pinfo)
 
int simple_fwd_parse_packet (uint8_t *data, int len, struct simple_fwd_pkt_info *pinfo)
 
void simple_fwd_pinfo_decap (struct simple_fwd_pkt_info *pinfo)
 

Macro Definition Documentation

◆ GTP_ESPN_FLAGS_ON

#define GTP_ESPN_FLAGS_ON (   p)    (p & 0x7) /* A macro for setting GTP ESPN flags on */

Definition at line 41 of file simple_fwd_pkt.c.

◆ GTP_EXT_FLAGS_ON

#define GTP_EXT_FLAGS_ON (   p)    (p & 0x4) /* A macro for setting GTP EXT flags on */

Definition at line 42 of file simple_fwd_pkt.c.

Function Documentation

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( SIMPLE_FWD_PKT  )

◆ simple_fwd_parse_is_tun()

static int simple_fwd_parse_is_tun ( struct simple_fwd_pkt_info pinfo)
static

Definition at line 220 of file simple_fwd_pkt.c.

◆ simple_fwd_parse_packet()

int simple_fwd_parse_packet ( uint8_t *  data,
int  len,
struct simple_fwd_pkt_info pinfo 
)

Definition at line 279 of file simple_fwd_pkt.c.

◆ simple_fwd_parse_pkt_format()

static int simple_fwd_parse_pkt_format ( uint8_t *  data,
int  len,
bool  l2,
struct simple_fwd_pkt_format fmt 
)
static

Definition at line 143 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_decap()

void simple_fwd_pinfo_decap ( struct simple_fwd_pkt_info pinfo)

Definition at line 318 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_dst_port()

static doca_be16_t simple_fwd_pinfo_dst_port ( struct simple_fwd_pkt_format fmt)
static

Definition at line 102 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_inner_dst_port()

doca_be16_t simple_fwd_pinfo_inner_dst_port ( struct simple_fwd_pkt_info pinfo)

Definition at line 119 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_inner_ipv4_dst()

doca_be32_t simple_fwd_pinfo_inner_ipv4_dst ( struct simple_fwd_pkt_info pinfo)

Definition at line 64 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_inner_ipv4_src()

doca_be32_t simple_fwd_pinfo_inner_ipv4_src ( struct simple_fwd_pkt_info pinfo)

Definition at line 69 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_inner_src_port()

doca_be16_t simple_fwd_pinfo_inner_src_port ( struct simple_fwd_pkt_info pinfo)

Definition at line 114 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_outer_dst_port()

doca_be16_t simple_fwd_pinfo_outer_dst_port ( struct simple_fwd_pkt_info pinfo)

Definition at line 129 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_outer_ipv4_dst()

doca_be32_t simple_fwd_pinfo_outer_ipv4_dst ( struct simple_fwd_pkt_info pinfo)

Definition at line 54 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_outer_ipv4_src()

doca_be32_t simple_fwd_pinfo_outer_ipv4_src ( struct simple_fwd_pkt_info pinfo)

Definition at line 59 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_outer_mac_dst()

uint8_t* simple_fwd_pinfo_outer_mac_dst ( struct simple_fwd_pkt_info pinfo)

Definition at line 44 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_outer_mac_src()

uint8_t* simple_fwd_pinfo_outer_mac_src ( struct simple_fwd_pkt_info pinfo)

Definition at line 49 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_outer_src_port()

doca_be16_t simple_fwd_pinfo_outer_src_port ( struct simple_fwd_pkt_info pinfo)

Definition at line 124 of file simple_fwd_pkt.c.

◆ simple_fwd_pinfo_src_port()

static doca_be16_t simple_fwd_pinfo_src_port ( struct simple_fwd_pkt_format fmt)
static

Definition at line 82 of file simple_fwd_pkt.c.