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

Go to the source code of this file.

Data Structures

struct  pcc_config
 
struct  pcc_resources
 

Macros

#define PCC_RP_THREADS_NUM_DEFAULT_VALUE    (48 + 1) /* Default Number of PCC RP threads, the extra one is used for communication */
 
#define PCC_NP_THREADS_NUM_DEFAULT_VALUE   (16) /* Default Number of PCC NP threads */
 
#define WAIT_TIME_DEFAULT_VALUE   (-1) /* Wait time - default value (infinity) */
 
#define IFA2_HOP_LIMIT_DEFAULT_VALUE   (0xFE) /* IFA2 packet hop limit value */
 
#define IFA2_GNS_DEFAULT_VALUE   (0xF) /* IFA2 packet GNS value */
 
#define IFA2_GNS_IGNORE_DEFAULT_VALUE   (0) /* IFA2 packet GNS value */
 
#define IFA2_GNS_IGNORE_DEFAULT_MASK   (0) /* IFA2 packet GNS value */
 
#define PCC_COREDUMP_FILE_DEFAULT_PATH   ("/tmp/doca_pcc_coredump.txt") /* Default pathname for device coredump file */
 
#define PCC_PRINT_BUFFER_SIZE_DEFAULT_VALUE   (512 * 2048) /* Device print buffer size - default value */
 
#define PCC_MAILBOX_REQUEST_SIZE   (sizeof(uint32_t)) /* Size of the mailbox request */
 
#define PCC_MAILBOX_RESPONSE_SIZE   (0) /* Size of the mailbox response. Currently not used */
 
#define MAX_USER_ARG_SIZE   (1024) /* Maximum size of user input argument */
 
#define MAX_ARG_SIZE   (MAX_USER_ARG_SIZE + 1) /* Maximum size of input argument */
 
#define LOG_LEVEL_CRIT   (20) /* Critical log level */
 
#define LOG_LEVEL_ERROR   (30) /* Error log level */
 
#define LOG_LEVEL_WARNING   (40) /* Warning log level */
 
#define LOG_LEVEL_INFO   (50) /* Info log level */
 
#define LOG_LEVEL_DEBUG   (60) /* Debug log level */
 
#define PRINT_CRIT(...)
 
#define PRINT_ERROR(...)
 
#define PRINT_WARNING(...)
 
#define PRINT_INFO(...)
 
#define PRINT_DEBUG(...)
 

Enumerations

enum  pcc_dev_probe_packet_type_t { PCC_DEV_PROBE_PACKET_CCMAD = 0 , PCC_DEV_PROBE_PACKET_IFA1 = 1 , PCC_DEV_PROBE_PACKET_IFA2 = 2 }
 intelemetry request packet format More...
 
enum  pcc_role_t { PCC_ROLE_RP = 0 , PCC_ROLE_NP = 1 }
 intelemetry request packet format More...
 

Functions

doca_error_t pcc_init (struct pcc_config *cfg, struct pcc_resources *resources)
 
doca_error_t pcc_mailbox_send (struct pcc_config *cfg, struct pcc_resources *resources)
 
doca_error_t pcc_destroy (struct pcc_resources *resources)
 
doca_error_t register_pcc_params (void)
 

Variables

const uint32_t default_pcc_rp_threads_list [PCC_RP_THREADS_NUM_DEFAULT_VALUE]
 
const uint32_t default_pcc_np_threads_list [PCC_NP_THREADS_NUM_DEFAULT_VALUE]
 
int log_level
 
struct doca_pcc_app * pcc_rp_rtt_template_app
 
struct doca_pcc_app * pcc_rp_switch_telemetry_app
 
struct doca_pcc_app * pcc_np_nic_telemetry_app
 
struct doca_pcc_app * pcc_np_switch_telemetry_app
 

Macro Definition Documentation

◆ IFA2_GNS_DEFAULT_VALUE

#define IFA2_GNS_DEFAULT_VALUE   (0xF) /* IFA2 packet GNS value */

Definition at line 38 of file pcc_core.h.

◆ IFA2_GNS_IGNORE_DEFAULT_MASK

#define IFA2_GNS_IGNORE_DEFAULT_MASK   (0) /* IFA2 packet GNS value */

Definition at line 40 of file pcc_core.h.

◆ IFA2_GNS_IGNORE_DEFAULT_VALUE

#define IFA2_GNS_IGNORE_DEFAULT_VALUE   (0) /* IFA2 packet GNS value */

Definition at line 39 of file pcc_core.h.

◆ IFA2_HOP_LIMIT_DEFAULT_VALUE

#define IFA2_HOP_LIMIT_DEFAULT_VALUE   (0xFE) /* IFA2 packet hop limit value */

Definition at line 37 of file pcc_core.h.

◆ LOG_LEVEL_CRIT

#define LOG_LEVEL_CRIT   (20) /* Critical log level */

Definition at line 48 of file pcc_core.h.

◆ LOG_LEVEL_DEBUG

#define LOG_LEVEL_DEBUG   (60) /* Debug log level */

Definition at line 52 of file pcc_core.h.

◆ LOG_LEVEL_ERROR

#define LOG_LEVEL_ERROR   (30) /* Error log level */

Definition at line 49 of file pcc_core.h.

◆ LOG_LEVEL_INFO

#define LOG_LEVEL_INFO   (50) /* Info log level */

Definition at line 51 of file pcc_core.h.

◆ LOG_LEVEL_WARNING

#define LOG_LEVEL_WARNING   (40) /* Warning log level */

Definition at line 50 of file pcc_core.h.

◆ MAX_ARG_SIZE

#define MAX_ARG_SIZE   (MAX_USER_ARG_SIZE + 1) /* Maximum size of input argument */

Definition at line 46 of file pcc_core.h.

◆ MAX_USER_ARG_SIZE

#define MAX_USER_ARG_SIZE   (1024) /* Maximum size of user input argument */

Definition at line 45 of file pcc_core.h.

◆ PCC_COREDUMP_FILE_DEFAULT_PATH

#define PCC_COREDUMP_FILE_DEFAULT_PATH   ("/tmp/doca_pcc_coredump.txt") /* Default pathname for device coredump file */

Definition at line 41 of file pcc_core.h.

◆ PCC_MAILBOX_REQUEST_SIZE

#define PCC_MAILBOX_REQUEST_SIZE   (sizeof(uint32_t)) /* Size of the mailbox request */

Definition at line 43 of file pcc_core.h.

◆ PCC_MAILBOX_RESPONSE_SIZE

#define PCC_MAILBOX_RESPONSE_SIZE   (0) /* Size of the mailbox response. Currently not used */

Definition at line 44 of file pcc_core.h.

◆ PCC_NP_THREADS_NUM_DEFAULT_VALUE

#define PCC_NP_THREADS_NUM_DEFAULT_VALUE   (16) /* Default Number of PCC NP threads */

Definition at line 35 of file pcc_core.h.

◆ PCC_PRINT_BUFFER_SIZE_DEFAULT_VALUE

#define PCC_PRINT_BUFFER_SIZE_DEFAULT_VALUE   (512 * 2048) /* Device print buffer size - default value */

Definition at line 42 of file pcc_core.h.

◆ PCC_RP_THREADS_NUM_DEFAULT_VALUE

#define PCC_RP_THREADS_NUM_DEFAULT_VALUE    (48 + 1) /* Default Number of PCC RP threads, the extra one is used for communication */

Copyright (c) 2022-2023 NVIDIA CORPORATION AND AFFILIATES. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 33 of file pcc_core.h.

◆ PRINT_CRIT

#define PRINT_CRIT (   ...)
Value:
do { \
printf(__VA_ARGS__); \
} while (0)
#define LOG_LEVEL_CRIT
Definition: pcc_core.h:48
int log_level
Definition: pcc.c:40

Definition at line 62 of file pcc_core.h.

◆ PRINT_DEBUG

#define PRINT_DEBUG (   ...)
Value:
do { \
printf(__VA_ARGS__); \
} while (0)
#define LOG_LEVEL_DEBUG
Definition: pcc_core.h:52

Definition at line 86 of file pcc_core.h.

◆ PRINT_ERROR

#define PRINT_ERROR (   ...)
Value:
do { \
printf(__VA_ARGS__); \
} while (0)
#define LOG_LEVEL_ERROR
Definition: pcc_core.h:49

Definition at line 68 of file pcc_core.h.

◆ PRINT_INFO

#define PRINT_INFO (   ...)
Value:
do { \
printf(__VA_ARGS__); \
} while (0)
#define LOG_LEVEL_INFO
Definition: pcc_core.h:51

Definition at line 80 of file pcc_core.h.

◆ PRINT_WARNING

#define PRINT_WARNING (   ...)
Value:
do { \
printf(__VA_ARGS__); \
} while (0)
#define LOG_LEVEL_WARNING
Definition: pcc_core.h:50

Definition at line 74 of file pcc_core.h.

◆ WAIT_TIME_DEFAULT_VALUE

#define WAIT_TIME_DEFAULT_VALUE   (-1) /* Wait time - default value (infinity) */

Definition at line 36 of file pcc_core.h.

Enumeration Type Documentation

◆ pcc_dev_probe_packet_type_t

intelemetry request packet format

Enumerator
PCC_DEV_PROBE_PACKET_CCMAD 

request packet follows ccmad format

PCC_DEV_PROBE_PACKET_IFA1 

request packet follows ifa1.0 format

PCC_DEV_PROBE_PACKET_IFA2 

request packet follows ifa2.0 format

Definition at line 115 of file pcc_core.h.

◆ pcc_role_t

enum pcc_role_t

intelemetry request packet format

Enumerator
PCC_ROLE_RP 

Reaction Point Role

PCC_ROLE_NP 

Notification Point Role

Definition at line 124 of file pcc_core.h.

Function Documentation

◆ pcc_destroy()

doca_error_t pcc_destroy ( struct pcc_resources resources)

Definition at line 525 of file pcc_core.c.

◆ pcc_init()

doca_error_t pcc_init ( struct pcc_config cfg,
struct pcc_resources resources 
)

Definition at line 246 of file pcc_core.c.

◆ pcc_mailbox_send()

doca_error_t pcc_mailbox_send ( struct pcc_config cfg,
struct pcc_resources resources 
)

Definition at line 491 of file pcc_core.c.

◆ register_pcc_params()

doca_error_t register_pcc_params ( void  )

Definition at line 898 of file pcc_core.c.

Variable Documentation

◆ default_pcc_np_threads_list

const uint32_t default_pcc_np_threads_list[PCC_NP_THREADS_NUM_DEFAULT_VALUE]
extern

Definition at line 62 of file pcc_core.c.

◆ default_pcc_rp_threads_list

const uint32_t default_pcc_rp_threads_list[PCC_RP_THREADS_NUM_DEFAULT_VALUE]
extern

Definition at line 57 of file pcc_core.c.

◆ log_level

int log_level
extern

Definition at line 40 of file pcc.c.

◆ pcc_np_nic_telemetry_app

struct doca_pcc_app* pcc_np_nic_telemetry_app
extern

◆ pcc_np_switch_telemetry_app

struct doca_pcc_app* pcc_np_switch_telemetry_app
extern

◆ pcc_rp_rtt_template_app

struct doca_pcc_app* pcc_rp_rtt_template_app
extern

◆ pcc_rp_switch_telemetry_app

struct doca_pcc_app* pcc_rp_switch_telemetry_app
extern