NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
psp_gw_pkt_rss.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024-2025 NVIDIA CORPORATION AND AFFILIATES. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are permitted
5  * provided that the following conditions are met:
6  * * Redistributions of source code must retain the above copyright notice, this list of
7  * conditions and the following disclaimer.
8  * * Redistributions in binary form must reproduce the above copyright notice, this list of
9  * conditions and the following disclaimer in the documentation and/or other materials
10  * provided with the distribution.
11  * * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used
12  * to endorse or promote products derived from this software without specific prior written
13  * permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21  * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  */
25 
26 #ifndef _PSP_GW_PKT_RSS_H
27 #define _PSP_GW_PKT_RSS_H
28 
29 #include <stdint.h>
30 
31 struct psp_gw_app_config;
32 class PSP_GatewayFlows;
33 class PSP_GatewayImpl;
34 
38 struct lcore_params {
39  volatile bool *force_quit; /* Indicates the application has been requested to quit */
40  psp_gw_app_config *config; /* Contains configuration information */
41  psp_pf_dev *pf_dev; /* The PF device to poll */
42  PSP_GatewayFlows *psp_flows; /* The DOCA Flow objects */
43  PSP_GatewayImpl *psp_svc; /* The RPC service which manages tunnels */
44 };
45 
58 int lcore_pkt_proc_func(void *lcore_args);
59 
68 bool reinject_packet(struct rte_mbuf *packet, uint16_t port_id);
69 
81 uint16_t handle_arp(struct rte_mempool *mpool,
82  uint16_t port_id,
83  uint16_t queue_id,
84  rte_ether_addr *port_src_mac,
85  const struct rte_mbuf *request_pkt,
86  uint32_t arp_response_meta_flag);
87 
99 uint16_t handle_neighbor_solicitation(struct rte_mempool *mpool,
100  uint16_t port_id,
101  uint16_t queue_id,
102  rte_ether_addr *port_src_mac,
103  const struct rte_mbuf *request_pkt,
104  uint32_t na_response_meta_flag);
105 
106 #endif // _PSP_GW_PKT_RSS_H
The entity which owns all the doca flow shared resources and flow pipes (but not sessions).
Definition: psp_gw_flows.h:87
Implementation of the PSP_Gateway service.
uint16_t queue_id
Definition: ip_frag_dp.c:1
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...
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.
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.
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 establ...
The parameters needed by each L-Core's main loop.
PSP_GatewayImpl * psp_svc
psp_pf_dev * pf_dev
volatile bool * force_quit
PSP_GatewayFlows * psp_flows
psp_gw_app_config * config
describes the configuration of the PSP networking service on the local host.
Maintains the state of the host PF.
Definition: psp_gw_flows.h:47