Skip to content

Commit 717d8f2

Browse files
committed
Merge remote-tracking branch 'oss/master' into initial-windows-support-for-meson-build-system
2 parents 71688b4 + 0226b16 commit 717d8f2

102 files changed

Lines changed: 9258 additions & 9179 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

libnvme/doc/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ api_files = [
1313
'filters.h',
1414
'ioctl.h',
1515
'linux.h',
16-
'log.h',
1716
'mi.h',
1817
'nbft.h',
1918
'tree.h',

libnvme/examples/mi-mctp-ae.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int main(int argc, char **argv)
109109
return EXIT_FAILURE;
110110
}
111111

112-
ctx = nvme_mi_create_global_ctx(stderr, DEFAULT_LOGLEVEL);
112+
ctx = nvme_create_global_ctx(stderr, DEFAULT_LOGLEVEL);
113113
if (!ctx)
114114
err(EXIT_FAILURE, "can't create NVMe root");
115115

@@ -173,7 +173,7 @@ int main(int argc, char **argv)
173173
//Cleanup
174174
nvme_mi_aem_disable(ep);
175175
nvme_mi_close(ep);
176-
nvme_mi_free_global_ctx(ctx);
176+
nvme_free_global_ctx(ctx);
177177

178178
return rc ? EXIT_FAILURE : EXIT_SUCCESS;
179179
}

libnvme/examples/mi-mctp-csi-test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ int main(int argc, char **argv)
237237
return EXIT_FAILURE;
238238
}
239239

240-
ctx = nvme_mi_create_global_ctx(stderr, DEFAULT_LOGLEVEL);
240+
ctx = nvme_create_global_ctx(stderr, DEFAULT_LOGLEVEL);
241241
if (!ctx)
242242
err(EXIT_FAILURE, "can't create NVMe root");
243243

244244
rc = do_action_endpoint(action, ctx, net, eid, argc, argv);
245-
nvme_mi_free_global_ctx(ctx);
245+
nvme_free_global_ctx(ctx);
246246

247247
return rc ? EXIT_FAILURE : EXIT_SUCCESS;
248248
}

libnvme/examples/mi-mctp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,9 +846,9 @@ int main(int argc, char **argv)
846846
printf("---\n");
847847
free(desc);
848848
}
849-
nvme_mi_free_global_ctx(ctx);
849+
nvme_free_global_ctx(ctx);
850850
} else {
851-
ctx = nvme_mi_create_global_ctx(stderr, DEFAULT_LOGLEVEL);
851+
ctx = nvme_create_global_ctx(stderr, DEFAULT_LOGLEVEL);
852852
if (!ctx)
853853
err(EXIT_FAILURE, "can't create NVMe root");
854854

@@ -857,7 +857,7 @@ int main(int argc, char **argv)
857857
errx(EXIT_FAILURE, "can't open MCTP endpoint %d:%d", net, eid);
858858
rc = do_action_endpoint(action, ep, argc, argv);
859859
nvme_mi_close(ep);
860-
nvme_mi_free_global_ctx(ctx);
860+
nvme_free_global_ctx(ctx);
861861
}
862862

863863
return rc ? EXIT_FAILURE : EXIT_SUCCESS;

libnvme/libnvme/nvme.i

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@
2828
%{
2929
#include <ccan/list/list.h>
3030
#include <ccan/endian/endian.h>
31-
#include "nvme/tree.h"
32-
#include "nvme/fabrics.h"
31+
#include <libnvme.h>
3332
#include "nvme/private.h"
34-
#include "nvme/log.h"
35-
#include "nvme/ioctl.h"
36-
#include "nvme/types.h"
37-
#include "nvme/nbft.h"
3833

3934
static int connect_err = 0;
4035
static int discover_err = 0;
@@ -515,7 +510,7 @@ struct nvme_ns {
515510
else if (!strcmp(level, "crit")) log_level = LOG_CRIT;
516511
else if (!strcmp(level, "alert")) log_level = LOG_ALERT;
517512
else if (!strcmp(level, "emerg")) log_level = LOG_EMERG;
518-
nvme_init_logging($self, log_level, false, false);
513+
nvme_set_logging_level($self, log_level, false, false);
519514
}
520515
%pythoncode %{
521516
def hosts(self):

libnvme/src/libnvme-mi.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
extern "C" {
1414
#endif
1515

16+
#include <nvme/lib.h>
1617
#include <nvme/types.h>
18+
#include <nvme/cmds.h>
1719
#include <nvme/mi.h>
18-
#include <nvme/log.h>
1920

2021
#ifdef __cplusplus
2122
}

libnvme/src/libnvme.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@
1414
extern "C" {
1515
#endif
1616

17-
#include <nvme/types.h>
18-
#include <nvme/linux.h>
19-
#include <nvme/ioctl.h>
20-
#include <nvme/nbft.h>
17+
#include <nvme/cmds.h>
2118
#include <nvme/fabrics.h>
2219
#include <nvme/filters.h>
20+
#include <nvme/ioctl.h>
21+
#include <nvme/lib-types.h>
22+
#include <nvme/lib.h>
23+
#include <nvme/linux.h>
24+
#include <nvme/nbft.h>
2325
#include <nvme/tree.h>
26+
#include <nvme/types.h>
2427
#include <nvme/util.h>
25-
#include <nvme/log.h>
2628

2729
#ifdef __cplusplus
2830
}

libnvme/src/libnvme.ld

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ LIBNVME_2_0 {
6969
nvme_free_host;
7070
nvme_free_ns;
7171
nvme_free_subsystem;
72-
nvme_free_uri;
7372
nvme_fw_download_seq;
7473
nvme_gen_dhchap_key;
7574
nvme_generate_tls_key_identity;
@@ -85,6 +84,7 @@ LIBNVME_2_0 {
8584
nvme_get_feature_length;
8685
nvme_get_host_telemetry;
8786
nvme_get_log;
87+
nvme_get_logging_level;
8888
nvme_get_logical_block_size;
8989
nvme_get_new_host_telemetry;
9090
nvme_get_ns_attr;
@@ -117,14 +117,11 @@ LIBNVME_2_0 {
117117
nvme_init_ctrl;
118118
nvme_init_ctrl_list;
119119
nvme_init_dsm_range;
120-
nvme_init_logging;
121120
nvme_insert_tls_key;
122121
nvme_insert_tls_key_compat;
123122
nvme_insert_tls_key_versioned;
124-
nvme_ipaddrs_eq;
125123
nvme_lookup_key;
126124
nvme_lookup_keyring;
127-
nvme_mi_admin_admin_passthru;
128125
nvme_mi_admin_xfer;
129126
nvme_mi_aem_disable;
130127
nvme_mi_aem_enable;
@@ -158,7 +155,6 @@ LIBNVME_2_0 {
158155
nvme_mi_scan_ep;
159156
nvme_mi_scan_mctp;
160157
nvme_mi_set_csi;
161-
nvme_mi_set_probe_enabled;
162158
nvme_mi_status_to_string;
163159
nvme_mi_submit_entry;
164160
nvme_mi_submit_exit;
@@ -190,11 +186,9 @@ LIBNVME_2_0 {
190186
nvme_ns_get_serial;
191187
nvme_ns_get_subsystem;
192188
nvme_ns_get_sysfs_dir;
193-
nvme_ns_get_transport_handle;
194189
nvme_ns_get_uuid;
195190
nvme_ns_identify;
196191
nvme_ns_read;
197-
nvme_ns_release_transport_handle;
198192
nvme_ns_rescan;
199193
nvme_ns_verify;
200194
nvme_ns_write;
@@ -231,6 +225,8 @@ LIBNVME_2_0 {
231225
nvme_set_etdas;
232226
nvme_set_ioctl_probing;
233227
nvme_set_keyring;
228+
nvme_set_logging_level;
229+
nvme_set_probe_enabled;
234230
nvme_set_property;
235231
nvme_set_root;
236232
nvme_skip_namespaces;
@@ -323,6 +319,7 @@ LIBNVME_2_0 {
323319
nvmf_discovery_nbft;
324320
nvmf_eflags_str;
325321
nvmf_exat_ptr_next;
322+
nvmf_free_uri;
326323
nvmf_get_default_trsvcid;
327324
nvmf_get_discovery_log;
328325
nvmf_get_discovery_wargs;

libnvme/src/meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ if is_windows
1111
else
1212
sources += [
1313
'nvme/base64.c',
14+
'nvme/cmds.c',
1415
'nvme/crc32.c',
1516
'nvme/fabrics.c',
1617
'nvme/filters.c',
1718
'nvme/ioctl.c',
19+
'nvme/lib.c',
1820
'nvme/linux.c',
1921
'nvme/log.c',
2022
'nvme/mi-mctp.c',
@@ -116,16 +118,18 @@ install_headers(
116118
)
117119
install_headers(
118120
[
121+
'nvme/cmds.h',
119122
'nvme/fabrics.h',
120123
'nvme/filters.h',
121124
'nvme/ioctl.h',
125+
'nvme/lib-types.h',
126+
'nvme/lib.h',
122127
'nvme/linux.h',
123-
'nvme/log.h',
128+
'nvme/mi.h',
124129
'nvme/nbft.h',
125130
'nvme/tree.h',
126131
'nvme/types.h',
127132
'nvme/util.h',
128-
'nvme/mi.h',
129133
],
130134
subdir: 'nvme',
131135
install_mode: mode,

libnvme/src/nvme/base64.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0-or-later
1+
// SPDX-License-Identifier: LGPL-2.1-or-later
22
/*
33
* base64.c - RFC4648-compliant base64 encoding
44
*
@@ -8,7 +8,6 @@
88
*/
99

1010
#include <stdint.h>
11-
#include <stdlib.h>
1211
#include <string.h>
1312
#include <errno.h>
1413
#include <sys/types.h>

0 commit comments

Comments
 (0)