NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
psp_gw_pkt_rss.h File Reference
#include <stdint.h>
Include dependency graph for psp_gw_pkt_rss.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lcore_params
 The parameters needed by each L-Core's main loop. More...
 

Functions

int lcore_pkt_proc_func (void *lcore_args)
 The entry point for each L-Core's main processing loop. Each L-Core polls a different Rx queue on the Host PF(s). If the packet indicates the need for a new tunnel to be established, it will be passed to the psp_svc object. Note multiple such packets may be received during the creation of the tunnel; in any case, they will be resubmitted to the encryption pipeline once the new flow has been created. More...
 
bool reinject_packet (struct rte_mbuf *packet, uint16_t port_id)
 Used by the psp_svc to re-inject a packet via the Host PF Tx queue after a new tunnel has been established. More...
 
uint16_t handle_arp (struct rte_mempool *mpool, uint16_t port_id, uint16_t queue_id, rte_ether_addr *port_src_mac, const struct rte_mbuf *request_pkt, uint32_t arp_response_meta_flag)
 Used to reply to an ARP request. More...
 
uint16_t handle_neighbor_solicitation (struct rte_mempool *mpool, uint16_t port_id, uint16_t queue_id, rte_ether_addr *port_src_mac, const struct rte_mbuf *request_pkt, uint32_t na_response_meta_flag)
 Used to reply to a Neighbor Solicitation packet. More...
 

Function Documentation

◆ handle_arp()

uint16_t handle_arp ( struct rte_mempool *  mpool,
uint16_t  port_id,
uint16_t  queue_id,
rte_ether_addr *  port_src_mac,
const struct rte_mbuf *  request_pkt,
uint32_t  arp_response_meta_flag 
)

Used to reply to an ARP request.

@mpool [in]: the mempool to allocate the response packet from @port_id [in]: the port on which to send the ARP response @queue_id [in]: the queue on which to send the ARP response @port_src_mac [in]: the source mac address of the port @request_pkt [in]: the ARP request packet @arp_response_meta_flag [in]: the metadata flag to set on the ARP response

Returns
: number of ARP packets handled (currently only one packet is supported)

Definition at line 199 of file psp_gw_pkt_rss.cpp.

◆ handle_neighbor_solicitation()

uint16_t handle_neighbor_solicitation ( struct rte_mempool *  mpool,
uint16_t  port_id,
uint16_t  queue_id,
rte_ether_addr *  port_src_mac,
const struct rte_mbuf *  request_pkt,
uint32_t  na_response_meta_flag 
)

Used to reply to a Neighbor Solicitation packet.

@mpool [in]: the mempool to allocate the response packet from @port_id [in]: the port on which to send the Neighbor Solicitation response @queue_id [in]: the queue on which to send the Neighbor Solicitation response @port_src_mac [in]: the source mac address of the port @request_pkt [in]: the Neighbor Solicitation packet @na_response_meta_flag [in]: the metadata flag to set on the Neighbor Solicitation response

Returns
: number of Neighbor Solicitation packets handled (currently only one packet is supported)

Definition at line 261 of file psp_gw_pkt_rss.cpp.

◆ lcore_pkt_proc_func()

int lcore_pkt_proc_func ( void *  lcore_args)

The entry point for each L-Core's main processing loop. Each L-Core polls a different Rx queue on the Host PF(s). If the packet indicates the need for a new tunnel to be established, it will be passed to the psp_svc object. Note multiple such packets may be received during the creation of the tunnel; in any case, they will be resubmitted to the encryption pipeline once the new flow has been created.

@lcore_args [in]: a pointer to an lcore_params struct

Returns
: 0 on success (the main loop exited normally), negative value otherwise

Definition at line 134 of file psp_gw_pkt_rss.cpp.

◆ reinject_packet()

bool reinject_packet ( struct rte_mbuf *  packet,
uint16_t  port_id 
)

Used by the psp_svc to re-inject a packet via the Host PF Tx queue after a new tunnel has been established.

@packet [in]: the packet to submit into the egress pipeline @port_id [in]: the port on which to send the packet, usually the host PF

Returns
: true if the packet was successfully sent, false if too many retries failed

Definition at line 182 of file psp_gw_pkt_rss.cpp.