NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
urom_rdmo_core.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 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 UROM_RDMO_CORE_H_
27 #define UROM_RDMO_CORE_H_
28 
29 #include <doca_log.h>
30 #include <doca_error.h>
31 #include <limits.h>
32 
33 #include <doca_urom.h>
34 
35 #include "urom_common.h"
36 
37 /* RDMO applications modes */
38 enum rdmo_mode {
39  RDMO_MODE_UNKNOWN, /* RDMO unknown mode */
40  RDMO_MODE_SERVER, /* RDMO server mode */
41  RDMO_MODE_CLIENT /* RDMO client mode */
42 };
43 
44 /* RDMO configuration structure */
45 struct rdmo_cfg {
46  struct urom_common_cfg common; /* UROM common configuration file */
47  enum rdmo_mode mode; /* Node running mode {server, client} */
48  char server_name[HOST_NAME_MAX]; /* Server name */
49 };
50 
51 /*
52  * RDMO server main function
53  *
54  * @device_name [in]: UROM device name
55  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
56  */
58 
59 /*
60  * RDMO client main function
61  *
62  * @server_name [in]: RDMO server name
63  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
64  */
65 doca_error_t rdmo_client(char *server_name);
66 
67 /*
68  * Register RDMO application arguments
69  *
70  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
71  */
73 
74 #endif /* UROM_RDMO_CORE_H_ */
enum doca_error doca_error_t
DOCA API return codes.
enum rdmo_mode mode
struct urom_common_cfg common
char server_name[HOST_NAME_MAX]
char device_name[DOCA_DEVINFO_IBDEV_NAME_SIZE]
Definition: urom_common.h:41
doca_error_t register_urom_rdmo_params(void)
doca_error_t rdmo_client(char *server_name)
rdmo_mode
@ RDMO_MODE_UNKNOWN
@ RDMO_MODE_CLIENT
@ RDMO_MODE_SERVER
doca_error_t rdmo_server(char *device_name)