API Reference Manual 1.51.0
Loading...
Searching...
No Matches
odp_sysinfo.c
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2018 Linaro Limited
3 * Copyright (c) 2022-2026 Nokia
4 */
5
15#ifndef _GNU_SOURCE
16#define _GNU_SOURCE
17#endif
18
19#include <getopt.h>
20#include <stdio.h>
21#include <string.h>
22#include <stdint.h>
23#include <inttypes.h>
24
25#include <odp_api.h>
26#include <odp/helper/odph_api.h>
27
28#define KB 1024
29#define MB (1024 * 1024)
30#define MAX_HUGE_PAGES 32
31#define MAX_IFACES 32
32#define MAX_NAME_LEN 128
33
34#define PROG_NAME "odp_sysinfo"
35
36typedef struct {
37 char name[MAX_NAME_LEN];
39 odp_proto_stats_capability_t proto_stats_capa;
40} pktio_t;
41
42typedef struct {
43 int num_pktio;
44 pktio_t pktio[MAX_IFACES];
45 struct {
48 int num;
49 } timer;
50} appl_args_t;
51
52/* Check that prints can use %u instead of %PRIu32 */
53ODP_STATIC_ASSERT(sizeof(unsigned int) >= sizeof(uint32_t), "unsigned int smaller than uint32_t");
54
55static const char *support_level(odp_support_t support)
56{
57 switch (support) {
58 case ODP_SUPPORT_NO: return "no";
59 case ODP_SUPPORT_YES: return "yes";
60 case ODP_SUPPORT_PREFERRED: return "yes, preferred";
61 default: return "UNKNOWN";
62 }
63}
64
65static const char *cpu_arch_name(odp_system_info_t *sysinfo)
66{
67 odp_cpu_arch_t cpu_arch = sysinfo->cpu_arch;
68
69 switch (cpu_arch) {
71 return "ARM";
73 return "MIPS";
75 return "PPC";
77 return "RISC-V";
79 return "x86";
80 default:
81 return "Unknown";
82 }
83}
84
85static const char *arm_isa(odp_cpu_arch_arm_t isa)
86{
87 switch (isa) {
89 return "ARMv6";
91 return "ARMv7-A";
93 return "ARMv8.0-A";
95 return "ARMv8.1-A";
97 return "ARMv8.2-A";
99 return "ARMv8.3-A";
101 return "ARMv8.4-A";
103 return "ARMv8.5-A";
105 return "ARMv8.6-A";
107 return "ARMv8.7-A";
109 return "ARMv8.8-A";
111 return "ARMv8.9-A";
113 return "ARMv9.0-A";
115 return "ARMv9.1-A";
117 return "ARMv9.2-A";
119 return "ARMv9.3-A";
120 default:
121 return "Unknown";
122 }
123}
124
125static const char *x86_isa(odp_cpu_arch_x86_t isa)
126{
127 switch (isa) {
129 return "x86_i686";
131 return "x86_64";
132 default:
133 return "Unknown";
134 }
135}
136
137static const char *cpu_arch_isa(odp_system_info_t *sysinfo, int isa_sw)
138{
139 odp_cpu_arch_t cpu_arch = sysinfo->cpu_arch;
140
141 switch (cpu_arch) {
142 case ODP_CPU_ARCH_ARM:
143 if (isa_sw)
144 return arm_isa(sysinfo->cpu_isa_sw.arm);
145 else
146 return arm_isa(sysinfo->cpu_isa_hw.arm);
148 return "Unknown";
149 case ODP_CPU_ARCH_PPC:
150 return "Unknown";
152 return "Unknown";
153 case ODP_CPU_ARCH_X86:
154 if (isa_sw)
155 return x86_isa(sysinfo->cpu_isa_sw.x86);
156 else
157 return x86_isa(sysinfo->cpu_isa_hw.x86);
158 default:
159 return "Unknown";
160 }
161}
162
163static const char *cipher_alg_name(odp_cipher_alg_t cipher)
164{
165 switch (cipher) {
167 return "null";
169 return "des";
171 return "3des_cbc";
173 return "3des_ecb";
175 return "aes_cbc";
177 return "aes_ctr";
179 return "aes_ecb";
181 return "aes_cfb128";
183 return "aes_xts";
185 return "aes_gcm";
187 return "aes_ccm";
189 return "chacha20_poly1305";
191 return "kasumi_f8";
193 return "snow3g_uea2";
195 return "snow5g_nea4";
197 return "aes_eea2";
199 return "zuc_eea3";
201 return "zuc_nea6";
203 return "snow_v";
205 return "snow_v_gcm";
207 return "sm4_ecb";
209 return "sm4_cbc";
211 return "sm4_ctr";
213 return "sm4_gcm";
215 return "sm4_ccm";
216 default:
217 return "Unknown";
218 }
219}
220
221static const char *auth_alg_name(odp_auth_alg_t auth)
222{
223 switch (auth) {
225 return "null";
227 return "md5_hmac";
229 return "sha1_hmac";
231 return "sha224_hmac";
233 return "sha256_hmac";
235 return "sha384_hmac";
237 return "sha512_hmac";
239 return "sha3_224_hmac";
241 return "sha3_256_hmac";
243 return "sha3_384_hmac";
245 return "sha3_512_hmac";
247 return "aes_gcm";
249 return "aes_gmac";
251 return "aes_ccm";
253 return "aes_cmac";
255 return "aes_xcbc_mac";
257 return "chacha20_poly1305";
259 return "kasumi_f9";
261 return "snow3g_uia2";
263 return "snow5g_nia4";
265 return "aes_eia2";
267 return "zuc_eia3";
269 return "zuc_nia6";
271 return "snow_v_gcm";
273 return "snow_v_gmac";
275 return "sm3_hmac";
277 return "sm4_gcm";
279 return "sm4_gmac";
281 return "sm4_ccm";
282 case ODP_AUTH_ALG_MD5:
283 return "md5";
285 return "sha1";
287 return "sha224";
289 return "sha256";
291 return "sha384";
293 return "sha512";
295 return "sha3_224";
297 return "sha3_256";
299 return "sha3_384";
301 return "sha3_512";
302 case ODP_AUTH_ALG_SM3:
303 return "sm3";
304 default:
305 return "Unknown";
306 }
307}
308
309typedef void (*cipher_op_t)(odp_cipher_alg_t alg);
310typedef void (*auth_op_t)(odp_auth_alg_t alg);
311
312static void foreach_cipher(odp_crypto_cipher_algos_t ciphers, cipher_op_t op)
313{
314 if (ciphers.bit.null)
316 if (ciphers.bit.des)
318 if (ciphers.bit.trides_cbc)
320 if (ciphers.bit.trides_ecb)
322 if (ciphers.bit.aes_cbc)
324 if (ciphers.bit.aes_ctr)
326 if (ciphers.bit.aes_ecb)
328 if (ciphers.bit.aes_cfb128)
330 if (ciphers.bit.aes_xts)
332 if (ciphers.bit.aes_gcm)
334 if (ciphers.bit.aes_ccm)
336 if (ciphers.bit.chacha20_poly1305)
338 if (ciphers.bit.kasumi_f8)
340 if (ciphers.bit.snow3g_uea2)
342 if (ciphers.bit.snow5g_nea4)
344 if (ciphers.bit.aes_eea2)
346 if (ciphers.bit.zuc_eea3)
348 if (ciphers.bit.zuc_nea6)
350 if (ciphers.bit.snow_v)
352 if (ciphers.bit.snow_v_gcm)
354 if (ciphers.bit.sm4_ecb)
356 if (ciphers.bit.sm4_cbc)
358 if (ciphers.bit.sm4_ctr)
360 if (ciphers.bit.sm4_gcm)
362 if (ciphers.bit.sm4_ccm)
364}
365
366static void foreach_auth(odp_crypto_auth_algos_t auths, auth_op_t op)
367{
368 if (auths.bit.null)
370 if (auths.bit.md5_hmac)
372 if (auths.bit.sha1_hmac)
374 if (auths.bit.sha224_hmac)
376 if (auths.bit.sha256_hmac)
378 if (auths.bit.sha384_hmac)
380 if (auths.bit.sha512_hmac)
382 if (auths.bit.sha3_224_hmac)
384 if (auths.bit.sha3_256_hmac)
386 if (auths.bit.sha3_384_hmac)
388 if (auths.bit.sha3_512_hmac)
390 if (auths.bit.aes_gcm)
392 if (auths.bit.aes_gmac)
394 if (auths.bit.aes_ccm)
396 if (auths.bit.aes_cmac)
398 if (auths.bit.aes_xcbc_mac)
400 if (auths.bit.chacha20_poly1305)
402 if (auths.bit.kasumi_f9)
404 if (auths.bit.snow3g_uia2)
406 if (auths.bit.snow5g_nia4)
408 if (auths.bit.aes_eia2)
410 if (auths.bit.zuc_eia3)
412 if (auths.bit.zuc_nia6)
414 if (auths.bit.snow_v_gcm)
416 if (auths.bit.snow_v_gmac)
418 if (auths.bit.sm3_hmac)
420 if (auths.bit.sm4_gcm)
422 if (auths.bit.sm4_gmac)
424 if (auths.bit.sm4_ccm)
426 if (auths.bit.md5)
428 if (auths.bit.sha1)
430 if (auths.bit.sha224)
432 if (auths.bit.sha256)
434 if (auths.bit.sha384)
436 if (auths.bit.sha512)
438 if (auths.bit.sha3_224)
440 if (auths.bit.sha3_256)
442 if (auths.bit.sha3_384)
444 if (auths.bit.sha3_512)
446 if (auths.bit.sm3)
448}
449
450static void print_cipher_capa(odp_cipher_alg_t cipher)
451{
452 int caps = odp_crypto_cipher_capability(cipher, NULL, 0);
453 int rc, i;
454
455 if (caps <= 0)
456 return;
457
459
460 rc = odp_crypto_cipher_capability(cipher, capa, caps);
461 if (rc < 0)
462 return;
463
464 printf(" %s:\n", cipher_alg_name(cipher));
465 for (i = 0; i < rc; i++)
466 printf(" key %d iv %d\n",
467 capa[i].key_len, capa[i].iv_len);
468}
469
470static void print_auth_capa(odp_auth_alg_t auth)
471{
472 int caps = odp_crypto_auth_capability(auth, NULL, 0);
473 int rc, i;
474
475 if (caps <= 0)
476 return;
477
479
480 rc = odp_crypto_auth_capability(auth, capa, caps);
481 if (rc < 0)
482 return;
483
484 printf(" %s:\n", auth_alg_name(auth));
485 for (i = 0; i < rc; i++) {
486 printf(" digest %d", capa[i].digest_len);
487 if (capa[i].key_len != 0)
488 printf(" key %d", capa[i].key_len);
489 if (capa[i].iv_len != 0)
490 printf(" iv %d", capa[i].iv_len);
491 if (capa[i].aad_len.max != 0)
492 printf(" aad %d, %d, %d",
493 capa[i].aad_len.min, capa[i].aad_len.max,
494 capa[i].aad_len.inc);
495 printf("\n");
496 }
497}
498
499static void print_cipher(odp_cipher_alg_t alg)
500{
501 printf("%s ", cipher_alg_name(alg));
502}
503
504static void print_auth(odp_auth_alg_t alg)
505{
506 printf("%s ", auth_alg_name(alg));
507}
508
509static void print_atomic_lock_free(void)
510{
511 odp_atomic_op_t lock_free_u64, lock_free_u128;
512
513 odp_atomic_lock_free_u64(&lock_free_u64);
514 odp_atomic_lock_free_u128(&lock_free_u128);
515
516 printf("\n");
517 printf(" ATOMICS\n");
518 printf(" Lock-free odp_atomic_u64_t ops\n");
519 printf(" load: %s\n", lock_free_u64.op.load ? "yes" : "no");
520 printf(" store: %s\n", lock_free_u64.op.store ? "yes" : "no");
521 printf(" fetch_add: %s\n", lock_free_u64.op.fetch_add ? "yes" : "no");
522 printf(" add: %s\n", lock_free_u64.op.add ? "yes" : "no");
523 printf(" fetch_sub: %s\n", lock_free_u64.op.fetch_sub ? "yes" : "no");
524 printf(" sub: %s\n", lock_free_u64.op.sub ? "yes" : "no");
525 printf(" fetch_inc: %s\n", lock_free_u64.op.fetch_inc ? "yes" : "no");
526 printf(" inc: %s\n", lock_free_u64.op.inc ? "yes" : "no");
527 printf(" fetch_dec: %s\n", lock_free_u64.op.fetch_dec ? "yes" : "no");
528 printf(" dec: %s\n", lock_free_u64.op.dec ? "yes" : "no");
529 printf(" min: %s\n", lock_free_u64.op.min ? "yes" : "no");
530 printf(" fetch_min: %s\n", lock_free_u64.op.fetch_min ? "yes" : "no");
531 printf(" max: %s\n", lock_free_u64.op.max ? "yes" : "no");
532 printf(" fetch_max: %s\n", lock_free_u64.op.fetch_max ? "yes" : "no");
533 printf(" cas: %s\n", lock_free_u64.op.cas ? "yes" : "no");
534 printf(" xchg: %s\n", lock_free_u64.op.xchg ? "yes" : "no");
535 printf(" bit_fetch_set: %s\n", lock_free_u64.op.bit_fetch_set ? "yes" : "no");
536 printf(" bit_set: %s\n", lock_free_u64.op.bit_set ? "yes" : "no");
537 printf(" bit_fetch_clr: %s\n", lock_free_u64.op.bit_fetch_clr ? "yes" : "no");
538 printf(" bit_clr: %s\n", lock_free_u64.op.bit_clr ? "yes" : "no");
539 printf(" Lock-free odp_atomic_u128_t ops\n");
540 printf(" load: %s\n", lock_free_u128.op.load ? "yes" : "no");
541 printf(" store: %s\n", lock_free_u128.op.store ? "yes" : "no");
542 printf(" cas: %s\n", lock_free_u128.op.cas ? "yes" : "no");
543}
544
545static int pktio_capability(appl_args_t *appl_args)
546{
547 odp_pool_param_t pool_param;
548 odp_pool_t pool;
549 int ret = 0;
550
551 odp_pool_param_init(&pool_param);
552
553 pool_param.type = ODP_POOL_PACKET;
554 pool_param.pkt.num = 128;
555
556 pool = odp_pool_create("pktio_pool", &pool_param);
557 if (pool == ODP_POOL_INVALID) {
558 ODPH_ERR("Creating packet pool failed\n");
559 return -1;
560 }
561
562 for (int i = 0; i < appl_args->num_pktio; i++) {
563 odp_pktio_param_t param;
564 odp_pktio_t pktio;
565
566 odp_pktio_param_init(&param);
567
570
571 pktio = odp_pktio_open(appl_args->pktio[i].name, pool, &param);
572 if (pktio == ODP_PKTIO_INVALID) {
573 ODPH_ERR("Opening pktio %s failed\n", appl_args->pktio[i].name);
574 ret = -1;
575 break;
576 }
577
578 if (odp_pktio_capability(pktio, &appl_args->pktio[i].capa)) {
579 ODPH_ERR("Reading pktio %s capa failed\n", appl_args->pktio[i].name);
580 ret = -1;
581 }
582
583 if (odp_proto_stats_capability(pktio, &appl_args->pktio[i].proto_stats_capa)) {
584 ODPH_ERR("Reading pktio %s proto stats capa failed\n",
585 appl_args->pktio[i].name);
586 ret = -1;
587 }
588
589 if (odp_pktio_close(pktio)) {
590 ODPH_ERR("Closing pktio %s failed\n", appl_args->pktio[i].name);
591 ret = -1;
592 }
593
594 if (ret)
595 break;
596 }
597
598 if (odp_pool_destroy(pool)) {
599 ODPH_ERR("Destroying pktio pool failed\n");
600 return -1;
601 }
602 return ret;
603}
604
605static void print_pktio_capa(appl_args_t *appl_args)
606{
607 for (int i = 0; i < appl_args->num_pktio; i++) {
608 odp_pktio_capability_t *capa = &appl_args->pktio[i].capa;
609
610 printf("\n");
611 printf(" PKTIO (%s)\n", appl_args->pktio[i].name);
612 printf(" (in_mode: ODP_PKTIN_MODE_SCHED)\n");
613 printf(" (out_mode: ODP_PKTOUT_MODE_DIRECT)\n");
614 printf(" max_input_queues: %u\n", capa->max_input_queues);
615 printf(" min_input_queue_size: %u\n", capa->min_input_queue_size);
616 printf(" max_input_queue_size: %u\n", capa->max_input_queue_size);
617 printf(" max_output_queues: %u\n", capa->max_output_queues);
618 printf(" min_output_queue_size: %u\n", capa->min_output_queue_size);
619 printf(" max_output_queue_size: %u\n", capa->max_output_queue_size);
620 printf(" config.pktin: 0x%" PRIx64 "\n",
621 capa->config.pktin.all_bits);
622 printf(" config.pktout: 0x%" PRIx64 "\n",
623 capa->config.pktout.all_bits);
624 printf(" set_op: 0x%" PRIx32 "\n", capa->set_op.all_bits);
625 printf(" vector.supported: %s\n",
626 support_level(capa->vector.supported));
627 printf(" vector.max_size: %u\n", capa->vector.max_size);
628 printf(" vector.min_size: %u\n", capa->vector.min_size);
629 printf(" vector.max_tmo_ns: %" PRIu64 " ns\n",
630 capa->vector.max_tmo_ns);
631 printf(" vector.min_tmo_ns: %" PRIu64 " ns\n",
632 capa->vector.min_tmo_ns);
633 printf(" lso.max_profiles: %u\n", capa->lso.max_profiles);
634 printf(" lso.max_profiles_per_pktio: %u\n", capa->lso.max_profiles_per_pktio);
635 printf(" lso.max_packet_segments: %u\n", capa->lso.max_packet_segments);
636 printf(" lso.max_segments: %u\n", capa->lso.max_segments);
637 printf(" lso.max_payload_len: %u B\n", capa->lso.max_payload_len);
638 printf(" lso.max_payload_offset: %u B\n", capa->lso.max_payload_offset);
639 printf(" lso.mod_op.add_segment_num: %u\n", capa->lso.mod_op.add_segment_num);
640 printf(" lso.mod_op.add_payload_len: %u\n", capa->lso.mod_op.add_payload_len);
641 printf(" lso.mod_op.add_payload_offset: %u\n",
643 printf(" lso.mod_op.write_bits: %u\n", capa->lso.mod_op.write_bits);
644 printf(" lso.max_num_custom: %u\n", capa->lso.max_num_custom);
645 printf(" lso.proto.custom: %u\n", capa->lso.proto.custom);
646 printf(" lso.proto.ipv4: %u\n", capa->lso.proto.ipv4);
647 printf(" lso.proto.ipv6: %u\n", capa->lso.proto.ipv6);
648 printf(" lso.proto.tcp_ipv4: %u\n", capa->lso.proto.tcp_ipv4);
649 printf(" lso.proto.tcp_ipv6: %u\n", capa->lso.proto.tcp_ipv6);
650 printf(" lso.proto.sctp_ipv4: %u\n", capa->lso.proto.sctp_ipv4);
651 printf(" lso.proto.sctp_ipv6: %u\n", capa->lso.proto.sctp_ipv6);
652 printf(" packet_ref.static_ref %u\n", capa->packet_ref.static_ref);
653 printf(" packet_ref.referenced_pkt %u\n", capa->packet_ref.referenced_pkt);
654 printf(" packet_ref.referencing_pkt %u\n", capa->packet_ref.referencing_pkt);
655 printf(" maxlen.equal: %i\n", capa->maxlen.equal);
656 printf(" maxlen.min_input: %u B\n", capa->maxlen.min_input);
657 printf(" maxlen.max_input: %u B\n", capa->maxlen.max_input);
658 printf(" maxlen.min_output: %u B\n", capa->maxlen.min_output);
659 printf(" maxlen.max_output: %u B\n", capa->maxlen.max_output);
660 printf(" max_tx_aging_tmo_ns: %" PRIu64 " ns\n",
661 capa->max_tx_aging_tmo_ns);
662 printf(" tx_compl.queue_type_sched: %i\n", capa->tx_compl.queue_type_sched);
663 printf(" tx_compl.queue_type_plain: %i\n", capa->tx_compl.queue_type_plain);
664 printf(" tx_compl.mode_event: %u\n", capa->tx_compl.mode_event);
665 printf(" tx_compl.mode_poll: %u\n", capa->tx_compl.mode_poll);
666 printf(" tx_compl.max_compl_id: %u\n", capa->tx_compl.max_compl_id);
667 printf(" free_ctrl.dont_free: %u\n", capa->free_ctrl.dont_free);
668 printf(" reassembly.ip: %i\n", capa->reassembly.ip);
669 printf(" reassembly.ipv4: %i\n", capa->reassembly.ipv4);
670 printf(" reassembly.ipv6: %i\n", capa->reassembly.ipv6);
671 printf(" reassembly.max_wait_time: %" PRIu64 " ns\n",
673 printf(" reassembly.max_num_frags: %u\n", capa->reassembly.max_num_frags);
674 printf(" stats.pktio: 0x%" PRIx64 "\n",
675 capa->stats.pktio.all_counters);
676 printf(" stats.pktin_queue: 0x%" PRIx64 "\n",
678 printf(" stats.pktout_queue: 0x%" PRIx64 "\n",
680 printf(" flow_control.pause_rx: %u\n", capa->flow_control.pause_rx);
681 printf(" flow_control.pfc_rx: %u\n", capa->flow_control.pfc_rx);
682 printf(" flow_control.pause_tx: %u\n", capa->flow_control.pause_tx);
683 printf(" flow_control.pfc_tx: %u\n", capa->flow_control.pfc_tx);
684 }
685}
686
687static void print_proto_stats_capa(appl_args_t *appl_args)
688{
689 for (int i = 0; i < appl_args->num_pktio; i++) {
690 odp_proto_stats_capability_t *capa = &appl_args->pktio[i].proto_stats_capa;
691
692 printf("\n");
693 printf(" PROTO STATS (%s)\n", appl_args->pktio[i].name);
694 printf(" tx.counters: 0x%" PRIx64 "\n", capa->tx.counters.all_bits);
695 printf(" tx.oct_count0_adj: %i\n", capa->tx.oct_count0_adj);
696 printf(" tx.oct_count1_adj: %i\n", capa->tx.oct_count1_adj);
697 }
698}
699
700static int timer_capability(appl_args_t *appl_args)
701{
702 for (int i = 0; i < ODP_CLOCK_NUM_SRC; i++) {
703 int ret;
704 odp_timer_pool_t pool;
706 odp_timer_capability_t *capa = &appl_args->timer.capa[appl_args->timer.num];
707 odp_timer_pool_info_t *info = &appl_args->timer.pool_info[appl_args->timer.num];
708
709 ret = odp_timer_capability(i, capa);
710 if (ret && i == ODP_CLOCK_DEFAULT) {
711 ODPH_ERR("odp_timer_capability() failed for default clock source: %d\n",
712 ret);
713 return -1;
714 }
715 if (ret == -1)
716 continue;
717 if (ret < -1) {
718 ODPH_ERR("odp_timer_capability() for clock source %d failed: %d\n", i, ret);
719 return -1;
720 }
721
723 params.clk_src = i;
724 params.res_ns = capa->max_res.res_ns;
725 params.min_tmo = capa->max_res.min_tmo;
726 params.max_tmo = capa->max_res.max_tmo;
727 params.num_timers = 1;
728
729 pool = odp_timer_pool_create("timer_pool", &params);
730 if (pool == ODP_TIMER_POOL_INVALID) {
731 ODPH_ERR("odp_timer_pool_create() failed for clock source: %d\n", i);
732 return -1;
733 }
734
735 if (odp_timer_pool_start_multi(&pool, 1) != 1) {
736 ODPH_ERR("odp_timer_pool_start_multi() failed for clock source: %d\n", i);
737 return -1;
738 }
739
740 ret = odp_timer_pool_info(pool, info);
741 if (ret) {
742 ODPH_ERR("odp_timer_pool_info() for clock source %d failed: %d\n", i, ret);
743 return -1;
744 }
745
747
748 appl_args->timer.num++;
749 }
750 return 0;
751}
752
753static void print_timer_capa(appl_args_t *appl_args)
754{
755 for (int i = 0; i < appl_args->timer.num; i++) {
756 odp_timer_capability_t *capa = &appl_args->timer.capa[i];
757 odp_timer_pool_info_t *info = &appl_args->timer.pool_info[i];
758
759 printf("\n");
760 printf(" TIMER (SRC %d)\n", i);
761
762 printf(" max_pools_combined: %u\n", capa->max_pools_combined);
763 printf(" max_pools: %u\n", capa->max_pools);
764 printf(" max_priority: %u\n", capa->max_priority);
765 printf(" max_timers: %u\n", capa->max_timers);
766 printf(" queue_type_sched: %i\n", capa->queue_type_sched);
767 printf(" queue_type_plain: %i\n", capa->queue_type_plain);
768 printf(" highest_res_ns: %" PRIu64 " nsec\n", capa->highest_res_ns);
769 printf(" maximum resolution\n");
770 printf(" res_ns: %" PRIu64 " nsec\n", capa->max_res.res_ns);
771 printf(" res_hz: %" PRIu64 " hz\n", capa->max_res.res_hz);
772 printf(" min_tmo: %" PRIu64 " nsec\n", capa->max_res.min_tmo);
773 printf(" max_tmo: %" PRIu64 " nsec\n", capa->max_res.max_tmo);
774 printf(" maximum timeout\n");
775 printf(" res_ns: %" PRIu64 " nsec\n", capa->max_tmo.res_ns);
776 printf(" res_hz: %" PRIu64 " hz\n", capa->max_tmo.res_hz);
777 printf(" min_tmo: %" PRIu64 " nsec\n", capa->max_tmo.min_tmo);
778 printf(" max_tmo: %" PRIu64 " nsec\n", capa->max_tmo.max_tmo);
779 printf(" periodic\n");
780 printf(" support.base_mul: %u\n", capa->periodic.support.base_mul);
781 printf(" support.freq: %u\n", capa->periodic.support.freq);
782 printf(" max_pools: %u\n", capa->periodic.max_pools);
783 printf(" max_priority: %u\n", capa->periodic.max_priority);
784 printf(" max_timers: %u\n", capa->periodic.max_timers);
785 printf(" min_base_freq_hz: %" PRIu64 " %" PRIu64 "/%" PRIu64 " Hz\n",
789 printf(" max_base_freq_hz: %" PRIu64 " %" PRIu64 "/%" PRIu64 " Hz\n",
793 printf(" min_freq_hz: %" PRIu64 " %" PRIu64 "/%" PRIu64 " Hz\n",
797 printf(" max_freq_hz: %" PRIu64 " %" PRIu64 "/%" PRIu64 " Hz\n",
801 printf(" min_pending_tmo: %" PRIu32 "\n", capa->periodic.min_pending_tmo);
802 printf(" max_pending_tmo: %" PRIu32 "\n", capa->periodic.max_pending_tmo);
803 printf(" timer pool tick info (max_res)\n");
804 printf(" freq: %" PRIu64 " %" PRIu64 "/%" PRIu64 " Hz\n",
805 info->tick_info.freq.integer,
806 info->tick_info.freq.numer,
807 info->tick_info.freq.denom);
808 printf(" nsec: %" PRIu64 " %" PRIu64 "/%" PRIu64 " ns\n",
809 info->tick_info.nsec.integer,
810 info->tick_info.nsec.numer,
811 info->tick_info.nsec.denom);
812 printf(" clk_cycle: %" PRIu64 " %" PRIu64 "/%" PRIu64 " cycles\n",
816 }
817}
818
819static void usage(void)
820{
821 printf("\n"
822 "System Information\n"
823 "\n"
824 "Usage: %s OPTIONS\n"
825 " E.g. %s -i eth0\n"
826 "\n"
827 "Optional OPTIONS:\n"
828 " -i, --interfaces Ethernet interfaces for packet I/O, comma-separated, no\n"
829 " spaces.\n"
830 " -h, --help Display help and exit.\n"
831 "\n", PROG_NAME, PROG_NAME);
832}
833
834static void parse_interfaces(appl_args_t *config, const char *optarg)
835{
836 char *tmp_str = strdup(optarg), *tmp;
837
838 if (tmp_str == NULL)
839 return;
840
841 tmp = strtok(tmp_str, ",");
842
843 while (tmp && config->num_pktio < MAX_IFACES) {
844 if (strlen(tmp) + 1 > MAX_NAME_LEN) {
845 ODPH_ERR("Unable to store interface name (MAX_NAME_LEN=%d)\n",
846 MAX_NAME_LEN);
847 exit(EXIT_FAILURE);
848 }
849 odph_strcpy(config->pktio[config->num_pktio].name, tmp, MAX_NAME_LEN);
850
851 config->num_pktio++;
852
853 tmp = strtok(NULL, ",");
854 }
855
856 free(tmp_str);
857}
858
859static void parse_args(int argc, char *argv[], appl_args_t *appl_args)
860{
861 int opt;
862 static const struct option longopts[] = {
863 {"interfaces", required_argument, NULL, 'i'},
864 {"help", no_argument, NULL, 'h'},
865 {NULL, 0, NULL, 0}
866 };
867 static const char *shortopts = "i:h";
868
869 while (1) {
870 opt = getopt_long(argc, argv, shortopts, longopts, NULL);
871
872 if (opt == -1)
873 break; /* No more options */
874
875 switch (opt) {
876 case 'i':
877 parse_interfaces(appl_args, optarg);
878 break;
879 case 'h':
880 usage();
881 exit(EXIT_SUCCESS);
882 case '?':
883 default:
884 usage();
885 exit(EXIT_FAILURE);
886 }
887 }
888}
889
890int main(int argc, char **argv)
891{
892 odp_instance_t inst;
893 int i, num_hp, num_hp_print;
894 int num_ava, num_work, num_ctrl;
895 odp_cpumask_t ava_mask, work_mask, ctrl_mask;
896 odp_system_info_t sysinfo;
897 odp_shm_capability_t shm_capa;
898 odp_pool_capability_t pool_capa;
899 odp_pool_ext_capability_t pool_ext_capa;
900 odp_cls_capability_t cls_capa;
901 odp_comp_capability_t comp_capa;
902 odp_dma_capability_t dma_capa;
903 odp_queue_capability_t queue_capa;
904 odp_crypto_capability_t crypto_capa;
905 odp_ipsec_capability_t ipsec_capa;
906 odp_schedule_capability_t schedule_capa;
907 odp_stash_capability_t stash_capa;
908 odp_ml_capability_t *ml_capa = NULL;
909 appl_args_t appl_args;
910 uint64_t huge_page[MAX_HUGE_PAGES];
911 char ava_mask_str[ODP_CPUMASK_STR_SIZE];
912 char work_mask_str[ODP_CPUMASK_STR_SIZE];
913 char ctrl_mask_str[ODP_CPUMASK_STR_SIZE];
914 int crypto_ret;
915 int ipsec_ret;
916 int num_engines;
917
918 memset(&appl_args, 0, sizeof(appl_args_t));
919
920 printf("\n");
921 printf("ODP system info example\n");
922 printf("***********************************************************\n");
923 printf("\n");
924
925 parse_args(argc, argv, &appl_args);
926
927 if (odp_init_global(&inst, NULL, NULL)) {
928 ODPH_ERR("Global init failed.\n");
929 exit(EXIT_FAILURE);
930 }
931
933 ODPH_ERR("Local init failed.\n");
934 exit(EXIT_FAILURE);
935 }
936
937 printf("\n");
938 printf("odp_sys_info_print()\n");
939 printf("***********************************************************\n");
941
942 printf("\n");
943 printf("odp_sys_config_print()\n");
944 printf("***********************************************************\n");
946
947 if (odp_system_info(&sysinfo)) {
948 ODPH_ERR("system info call failed\n");
949 exit(EXIT_FAILURE);
950 }
951
952 memset(ava_mask_str, 0, ODP_CPUMASK_STR_SIZE);
953 num_ava = odp_cpumask_all_available(&ava_mask);
954 odp_cpumask_to_str(&ava_mask, ava_mask_str, ODP_CPUMASK_STR_SIZE);
955
956 memset(work_mask_str, 0, ODP_CPUMASK_STR_SIZE);
957 num_work = odp_cpumask_default_worker(&work_mask, 0);
958 odp_cpumask_to_str(&work_mask, work_mask_str, ODP_CPUMASK_STR_SIZE);
959
960 memset(ctrl_mask_str, 0, ODP_CPUMASK_STR_SIZE);
961 num_ctrl = odp_cpumask_default_control(&ctrl_mask, 0);
962 odp_cpumask_to_str(&ctrl_mask, ctrl_mask_str, ODP_CPUMASK_STR_SIZE);
963
964 num_hp = odp_sys_huge_page_size_all(huge_page, MAX_HUGE_PAGES);
965
966 num_hp_print = num_hp;
967 if (num_hp_print > MAX_HUGE_PAGES)
968 num_hp_print = MAX_HUGE_PAGES;
969
970 if (odp_shm_capability(&shm_capa)) {
971 ODPH_ERR("shm capability failed\n");
972 exit(EXIT_FAILURE);
973 }
974
975 if (odp_pool_capability(&pool_capa)) {
976 ODPH_ERR("pool capability failed\n");
977 exit(EXIT_FAILURE);
978 }
979
980 if (odp_pool_ext_capability(ODP_POOL_PACKET, &pool_ext_capa)) {
981 ODPH_ERR("external packet pool capability failed\n");
982 exit(EXIT_FAILURE);
983 }
984
985 if (pktio_capability(&appl_args)) {
986 ODPH_ERR("pktio capability failed\n");
987 exit(EXIT_FAILURE);
988 }
989
990 if (odp_cls_capability(&cls_capa)) {
991 ODPH_ERR("classifier capability failed\n");
992 exit(EXIT_FAILURE);
993 }
994
995 if (odp_comp_capability(&comp_capa)) {
996 ODPH_ERR("compression capability failed\n");
997 exit(EXIT_FAILURE);
998 }
999
1000 if (odp_dma_capability(&dma_capa)) {
1001 ODPH_ERR("dma capability failed\n");
1002 exit(EXIT_FAILURE);
1003 }
1004
1005 if (odp_queue_capability(&queue_capa)) {
1006 ODPH_ERR("queue capability failed\n");
1007 exit(EXIT_FAILURE);
1008 }
1009
1010 if (odp_schedule_capability(&schedule_capa)) {
1011 ODPH_ERR("schedule capability failed\n");
1012 exit(EXIT_FAILURE);
1013 }
1014
1015 if (odp_stash_capability(&stash_capa, ODP_STASH_TYPE_DEFAULT)) {
1016 ODPH_ERR("stash capability failed\n");
1017 exit(EXIT_FAILURE);
1018 }
1019
1020 if (timer_capability(&appl_args)) {
1021 ODPH_ERR("timer capability failed\n");
1022 exit(EXIT_FAILURE);
1023 }
1024
1025 num_engines = odp_ml_num_engines();
1026 if (num_engines > 0) {
1027 ml_capa = malloc(sizeof(odp_ml_capability_t) * num_engines);
1028 if (ml_capa == NULL) {
1029 ODPH_ERR("Failed to allocate memory for ML capabilities\n");
1030 exit(EXIT_FAILURE);
1031 }
1032
1033 for (i = 0; i < num_engines; i++) {
1034 if (odp_ml_engine_capability(i + 1, &ml_capa[i])) {
1035 ODPH_ERR("ML engine %u capability failed\n", i + 1);
1036 free(ml_capa);
1037 exit(EXIT_FAILURE);
1038 }
1039 }
1040 }
1041
1042 crypto_ret = odp_crypto_capability(&crypto_capa);
1043 if (crypto_ret < 0)
1044 ODPH_ERR("crypto capability failed\n");
1045
1046 ipsec_ret = odp_ipsec_capability(&ipsec_capa);
1047 if (ipsec_ret < 0)
1048 ODPH_ERR("IPsec capability failed\n");
1049
1050 printf("\n");
1051 printf("S Y S T E M I N F O R M A T I O N\n");
1052 printf("***********************************************************\n");
1053 printf("\n");
1054 printf(" ODP API version: %s\n", odp_version_api_str());
1055 printf(" ODP impl name: %s\n", odp_version_impl_name());
1056 printf(" ODP impl details: %s\n", odp_version_impl_str());
1057 printf(" CPU model: %s\n", odp_cpu_model_str());
1058 printf(" CPU arch: %s\n", cpu_arch_name(&sysinfo));
1059 printf(" CPU ISA version: %s\n", cpu_arch_isa(&sysinfo, 0));
1060 printf(" SW ISA version: %s\n", cpu_arch_isa(&sysinfo, 1));
1061 printf(" CPU max freq: %" PRIu64 " hz\n", odp_cpu_hz_max());
1062 printf(" Current CPU: %i\n", odp_cpu_id());
1063 printf(" Current CPU freq: %" PRIu64 " hz\n", odp_cpu_hz());
1064 printf(" CPU count: %i\n", odp_cpu_count());
1065 printf(" CPU available num: %i\n", num_ava);
1066 printf(" CPU available mask: %s\n", ava_mask_str);
1067 printf(" CPU worker num: %i\n", num_work);
1068 printf(" CPU worker mask: %s\n", work_mask_str);
1069 printf(" CPU control num: %i\n", num_ctrl);
1070 printf(" CPU control mask: %s\n", ctrl_mask_str);
1071 printf(" Max threads (define): %i\n", ODP_THREAD_COUNT_MAX);
1072 printf(" Max threads: %i\n", odp_thread_count_max());
1073 printf(" Byte order: %s (%i / %i)\n",
1074 ODP_BYTE_ORDER == ODP_BIG_ENDIAN ? "big" : "little",
1076 printf(" Bitfield order: %s (%i / %i)\n",
1078 "big" : "little",
1080 printf(" Cache line size: %i B\n", odp_sys_cache_line_size());
1081 printf(" Page size: %" PRIu64 " kB\n", odp_sys_page_size() / KB);
1082 printf(" Default huge page size: %" PRIu64 " kB\n", odp_sys_huge_page_size() / KB);
1083 printf(" Num huge page sizes: %i\n", num_hp);
1084
1085 for (i = 0; i < num_hp_print; i++)
1086 printf(" Huge page size [%i]: %" PRIu64 " kB\n",
1087 i, huge_page[i] / KB);
1088
1089 printf("\n");
1090 printf(" SHM\n");
1091 printf(" max_blocks: %u\n", shm_capa.max_blocks);
1092 printf(" max_size: %" PRIu64 " MB\n", shm_capa.max_size / MB);
1093 printf(" max_align: %" PRIu64 " B\n", shm_capa.max_align);
1094 printf(" flags: 0x%x: %s%s%s%s%s%s\n", shm_capa.flags,
1095 (shm_capa.flags & ODP_SHM_PROC) ? "PROC " : "",
1096 (shm_capa.flags & ODP_SHM_SINGLE_VA) ? "SINGLE_VA " : "",
1097 (shm_capa.flags & ODP_SHM_EXPORT) ? "EXPORT " : "",
1098 (shm_capa.flags & ODP_SHM_HP) ? "HP " : "",
1099 (shm_capa.flags & ODP_SHM_HW_ACCESS) ? "HW_ACCESS " : "",
1100 (shm_capa.flags & ODP_SHM_NO_HP) ? "NO_HP " : "");
1101
1102 print_atomic_lock_free();
1103
1104 printf("\n");
1105 printf(" POOL\n");
1106 printf(" max_pools: %u\n", pool_capa.max_pools);
1107 printf(" buf.max_pools: %u\n", pool_capa.buf.max_pools);
1108 printf(" buf.max_align: %u B\n", pool_capa.buf.max_align);
1109 printf(" buf.max_size: %u kB\n", pool_capa.buf.max_size / KB);
1110 printf(" buf.max_num: %u\n", pool_capa.buf.max_num);
1111 printf(" buf.max_uarea_size: %u B\n", pool_capa.buf.max_uarea_size);
1112 printf(" buf.uarea_persistence: %i\n", pool_capa.buf.uarea_persistence);
1113 printf(" buf.min_cache_size: %u\n", pool_capa.buf.min_cache_size);
1114 printf(" buf.max_cache_size: %u\n", pool_capa.buf.max_cache_size);
1115 printf(" buf.stats: 0x%" PRIx64 "\n", pool_capa.buf.stats.all);
1116 printf(" pkt.max_pools: %u\n", pool_capa.pkt.max_pools);
1117 printf(" pkt.max_len: %u kB\n", pool_capa.pkt.max_len / KB);
1118 printf(" pkt.max_num: %u\n", pool_capa.pkt.max_num);
1119 printf(" pkt.max_align: %u B\n", pool_capa.pkt.max_align);
1120 printf(" pkt.min_headroom: %u B\n", pool_capa.pkt.min_headroom);
1121 printf(" pkt.max_headroom: %u B\n", pool_capa.pkt.max_headroom);
1122 printf(" pkt.min_tailroom: %u B\n", pool_capa.pkt.min_tailroom);
1123 printf(" pkt.max_segs_per_pkt: %u\n", pool_capa.pkt.max_segs_per_pkt);
1124 printf(" pkt.min_seg_len: %u B\n", pool_capa.pkt.min_seg_len);
1125 printf(" pkt.max_seg_len: %u B\n", pool_capa.pkt.max_seg_len);
1126 printf(" pkt.max_uarea_size: %u B\n", pool_capa.pkt.max_uarea_size);
1127 printf(" pkt.uarea_persistence: %i\n", pool_capa.pkt.uarea_persistence);
1128 printf(" pkt.max_num_subparam: %u\n", pool_capa.pkt.max_num_subparam);
1129 printf(" pkt.min_cache_size: %u\n", pool_capa.pkt.min_cache_size);
1130 printf(" pkt.max_cache_size: %u\n", pool_capa.pkt.max_cache_size);
1131 printf(" pkt.stats: 0x%" PRIx64 "\n", pool_capa.pkt.stats.all);
1132 printf(" tmo.max_pools: %u\n", pool_capa.tmo.max_pools);
1133 printf(" tmo.max_num: %u\n", pool_capa.tmo.max_num);
1134 printf(" tmo.max_uarea_size: %u B\n", pool_capa.tmo.max_uarea_size);
1135 printf(" tmo.uarea_persistence: %i\n", pool_capa.tmo.uarea_persistence);
1136 printf(" tmo.min_cache_size: %u\n", pool_capa.tmo.min_cache_size);
1137 printf(" tmo.max_cache_size: %u\n", pool_capa.tmo.max_cache_size);
1138 printf(" tmo.stats: 0x%" PRIx64 "\n", pool_capa.tmo.stats.all);
1139 printf(" vector.max_pools: %u\n", pool_capa.vector.max_pools);
1140 printf(" vector.max_num: %u\n", pool_capa.vector.max_num);
1141 printf(" vector.max_size: %u\n", pool_capa.vector.max_size);
1142 printf(" vector.max_uarea_size: %u B\n", pool_capa.vector.max_uarea_size);
1143 printf(" vector.uarea_persistence: %i\n", pool_capa.vector.uarea_persistence);
1144 printf(" vector.min_cache_size: %u\n", pool_capa.vector.min_cache_size);
1145 printf(" vector.max_cache_size: %u\n", pool_capa.vector.max_cache_size);
1146 printf(" vector.stats: 0x%" PRIx64 "\n", pool_capa.vector.stats.all);
1147#define capa pool_capa.event_vector
1148 printf(" event_vector.max_pools: %u\n", capa.max_pools);
1149 printf(" event_vector.max_num: %u\n", capa.max_num);
1150 printf(" event_vector.max_size: %u\n", capa.max_size);
1151 printf(" event_vector.max_uarea_size: %u B\n", capa.max_uarea_size);
1152 printf(" event_vector.uarea_persistence: %i\n", capa.uarea_persistence);
1153 printf(" event_vector.min_cache_size: %u\n", capa.min_cache_size);
1154 printf(" event_vector.max_cache_size: %u\n", capa.max_cache_size);
1155 printf(" event_vector.stats: 0x%" PRIx64 "\n", capa.stats.all);
1156#undef capa
1157
1158 printf("\n");
1159 printf(" POOL EXT (pkt)\n");
1160 printf(" max_pools: %u\n", pool_ext_capa.max_pools);
1161 if (pool_ext_capa.max_pools) {
1162 printf(" min_cache_size: %u\n", pool_ext_capa.min_cache_size);
1163 printf(" max_cache_size: %u\n", pool_ext_capa.max_cache_size);
1164 printf(" stats: 0x%" PRIx64 "\n", pool_ext_capa.stats.all);
1165 printf(" pkt.max_num_buf: %u\n", pool_ext_capa.pkt.max_num_buf);
1166 printf(" pkt.max_buf_size: %u B\n", pool_ext_capa.pkt.max_buf_size);
1167 printf(" pkt.odp_header_size: %u B\n", pool_ext_capa.pkt.odp_header_size);
1168 printf(" pkt.odp_trailer_size: %u B\n", pool_ext_capa.pkt.odp_trailer_size);
1169 printf(" pkt.min_mem_align: %u B\n", pool_ext_capa.pkt.min_mem_align);
1170 printf(" pkt.min_buf_align: %u B\n", pool_ext_capa.pkt.min_buf_align);
1171 printf(" pkt.min_head_align: %u B\n", pool_ext_capa.pkt.min_head_align);
1172 printf(" pkt.buf_size_aligned: %u\n", pool_ext_capa.pkt.buf_size_aligned);
1173 printf(" pkt.max_headroom: %u B\n", pool_ext_capa.pkt.max_headroom);
1174 printf(" pkt.max_headroom_size: %u B\n", pool_ext_capa.pkt.max_headroom_size);
1175 printf(" pkt.max_segs_per_pkt: %u\n", pool_ext_capa.pkt.max_segs_per_pkt);
1176 printf(" pkt.max_uarea_size: %u B\n", pool_ext_capa.pkt.max_uarea_size);
1177 printf(" pkt.uarea_persistence: %i\n", pool_ext_capa.pkt.uarea_persistence);
1178 }
1179
1180 print_pktio_capa(&appl_args);
1181
1182 print_proto_stats_capa(&appl_args);
1183
1184 printf("\n");
1185 printf(" CLASSIFIER\n");
1186 printf(" supported_terms: 0x%" PRIx64 "\n", cls_capa.supported_terms.all_bits);
1187 printf(" max_pmr: %u\n", cls_capa.max_pmr);
1188 printf(" max_pmr_per_cos: %u\n", cls_capa.max_pmr_per_cos);
1189 printf(" max_terms_per_pmr: %u\n", cls_capa.max_terms_per_pmr);
1190 printf(" max_pmr_priority: %u\n", cls_capa.max_pmr_priority);
1191 printf(" max_cos: %u\n", cls_capa.max_cos);
1192 printf(" max_hash_queues: %u\n", cls_capa.max_hash_queues);
1193 printf(" hash_protocols: 0x%x\n", cls_capa.hash_protocols.all_bits);
1194 printf(" pmr_range_supported: %i\n", cls_capa.pmr_range_supported);
1195 printf(" random_early_detection: %s\n", support_level(cls_capa.random_early_detection));
1196 printf(" threshold_red: 0x%" PRIx8 "\n", cls_capa.threshold_red.all_bits);
1197 printf(" back_pressure: %s\n", support_level(cls_capa.back_pressure));
1198 printf(" threshold_bp: 0x%" PRIx8 "\n", cls_capa.threshold_bp.all_bits);
1199 printf(" max_mark: %" PRIu64 "\n", cls_capa.max_mark);
1200 printf(" stats.queue: 0x%" PRIx64 "\n", cls_capa.stats.queue.all_counters);
1201 #define aep_type cls_capa.aggr.enq_profile_type
1202 printf(" aggr.enq_profile_type.ipv4_frag: %u\n", aep_type.ipv4_frag);
1203 printf(" aggr.enq_profile_type.ipv6_frag: %u\n", aep_type.ipv6_frag);
1204 printf(" aggr.enq_profile_type.custom: %u\n", aep_type.custom);
1205 #undef aep_type
1206
1207 printf("\n");
1208 printf(" COMPRESSION\n");
1209 printf(" max_sessions: %u\n", comp_capa.max_sessions);
1210 printf(" compl_algos: 0x%x\n", comp_capa.comp_algos.all_bits);
1211 printf(" hash_algos: 0x%x\n", comp_capa.hash_algos.all_bits);
1212 printf(" sync support: %i\n", comp_capa.sync);
1213 printf(" async support: %i\n", comp_capa.async);
1214
1215 printf("\n");
1216 printf(" DMA\n");
1217 printf(" max_sessions: %u\n", dma_capa.max_sessions);
1218 printf(" max_transfers: %u\n", dma_capa.max_transfers);
1219 printf(" max_src_segs: %u\n", dma_capa.max_src_segs);
1220 printf(" max_dst_segs: %u\n", dma_capa.max_dst_segs);
1221 printf(" max_segs: %u\n", dma_capa.max_segs);
1222 printf(" max_seg_len: %u B\n", dma_capa.max_seg_len);
1223 printf(" compl_mode_mask: 0x%x\n", dma_capa.compl_mode_mask);
1224 printf(" queue_type_sched: %i\n", dma_capa.queue_type_sched);
1225 printf(" queue_type_plain: %i\n", dma_capa.queue_type_plain);
1226 printf(" src_seg_free: %i\n", dma_capa.src_seg_free);
1227 printf(" dst_seg_alloc: %i\n", dma_capa.dst_seg_alloc);
1228 printf(" pool.max_pools: %u\n", dma_capa.pool.max_pools);
1229 printf(" pool.max_num: %u\n", dma_capa.pool.max_num);
1230 printf(" pool.max_uarea_size: %u B\n", dma_capa.pool.max_uarea_size);
1231 printf(" pool.uarea_persistence: %u\n", dma_capa.pool.uarea_persistence);
1232 printf(" pool.min_cache_size: %u\n", dma_capa.pool.min_cache_size);
1233 printf(" pool.max_cache_size: %u\n", dma_capa.pool.max_cache_size);
1234
1235 printf("\n");
1236 printf(" QUEUE\n");
1237 printf(" max queues: %u\n", queue_capa.max_queues);
1238 printf(" plain.max_num: %u\n", queue_capa.plain.max_num);
1239 printf(" plain.max_size: %u\n", queue_capa.plain.max_size);
1240 printf(" plain.lf.max_num: %u\n", queue_capa.plain.lockfree.max_num);
1241 printf(" plain.lf.max_size: %u\n", queue_capa.plain.lockfree.max_size);
1242 printf(" plain.wf.max_num: %u\n", queue_capa.plain.waitfree.max_num);
1243 printf(" plain.wf.max_size: %u\n", queue_capa.plain.waitfree.max_size);
1244 printf(" plain.aggr.max_num: %u\n", queue_capa.plain.aggr.max_num);
1245 printf(" plain.aggr.max_num_per_queue: %u\n", queue_capa.plain.aggr.max_num_per_queue);
1246 printf(" plain.aggr.max_size: %u\n", queue_capa.plain.aggr.max_size);
1247 printf(" plain.aggr.min_size: %u\n", queue_capa.plain.aggr.min_size);
1248 printf(" plain.aggr.max_tmo_ns: %" PRIu64 "\n", queue_capa.plain.aggr.max_tmo_ns);
1249 printf(" plain.aggr.min_tmo_ns: %" PRIu64 "\n", queue_capa.plain.aggr.min_tmo_ns);
1250
1251 printf("\n");
1252 printf(" SCHEDULER\n");
1253 printf(" max_ordered_locks: %u\n", schedule_capa.max_ordered_locks);
1254 printf(" max_groups: %u\n", schedule_capa.max_groups);
1255 printf(" max_group_prios: %u\n", schedule_capa.max_group_prios);
1256 printf(" min_prio: %u\n", schedule_capa.min_prio);
1257 printf(" max_prios: %u\n", schedule_capa.max_prios);
1258 printf(" max_queues: %u\n", schedule_capa.max_queues);
1259 printf(" max_queue_size: %u\n", schedule_capa.max_queue_size);
1260 printf(" max_flow_id: %u\n", schedule_capa.max_flow_id);
1261 printf(" lockfree_queues: %s\n", support_level(schedule_capa.lockfree_queues));
1262 printf(" waitfree_queues: %s\n", support_level(schedule_capa.waitfree_queues));
1263 printf(" order_wait: %s\n", support_level(schedule_capa.order_wait));
1264 printf(" aggr.max_num: %u\n", schedule_capa.aggr.max_num);
1265 printf(" aggr.max_num_per_queue: %u\n", schedule_capa.aggr.max_num_per_queue);
1266 printf(" aggr.max_size: %u\n", schedule_capa.aggr.max_size);
1267 printf(" aggr.min_size: %u\n", schedule_capa.aggr.min_size);
1268 printf(" aggr.max_tmo_ns: %" PRIu64 "\n", schedule_capa.aggr.max_tmo_ns);
1269 printf(" aggr.min_tmo_ns: %" PRIu64 "\n", schedule_capa.aggr.min_tmo_ns);
1270
1271 printf("\n");
1272 printf(" STASH\n");
1273 printf(" max_stashes_any_type: %u\n", stash_capa.max_stashes_any_type);
1274 printf(" max_stashes: %u\n", stash_capa.max_stashes);
1275 printf(" max_num_obj: %" PRIu64 "\n", stash_capa.max_num_obj);
1276 printf(" max_num.u8: %" PRIu64 "\n", stash_capa.max_num.u8);
1277 printf(" max_num.u16: %" PRIu64 "\n", stash_capa.max_num.u16);
1278 printf(" max_num.u32: %" PRIu64 "\n", stash_capa.max_num.u32);
1279 printf(" max_num.u64: %" PRIu64 "\n", stash_capa.max_num.u64);
1280 printf(" max_num.u128: %" PRIu64 "\n", stash_capa.max_num.u128);
1281 printf(" max_num.max_obj_size: %" PRIu64 "\n", stash_capa.max_num.max_obj_size);
1282 printf(" max_obj_size: %u B\n", stash_capa.max_obj_size);
1283 printf(" max_cache_size: %u\n", stash_capa.max_cache_size);
1284 printf(" max_get_batch: %u\n", stash_capa.max_get_batch);
1285 printf(" max_put_batch: %u\n", stash_capa.max_put_batch);
1286 printf(" stats: 0x%" PRIx64 "\n", stash_capa.stats.all);
1287
1288 printf("\n");
1289 printf(" ML\n");
1290 printf(" num_engines: %u\n", num_engines);
1291 for (i = 0; i < num_engines; i++) {
1292 printf(" engine %u:\n", i + 1);
1293 printf(" max_models: %u\n", ml_capa[i].max_models);
1294 printf(" max_models_loaded: %u\n", ml_capa[i].max_models_loaded);
1295 printf(" max_model_size: %" PRIu64 "B\n", ml_capa[i].max_model_size);
1296 printf(" max_compl_id: %u\n", ml_capa[i].max_compl_id);
1297 printf(" max_inputs: %u\n", ml_capa[i].max_inputs);
1298 printf(" max_outputs: %u\n", ml_capa[i].max_outputs);
1299 printf(" max_segs_per_input: %u\n", ml_capa[i].max_segs_per_input);
1300 printf(" max_segs_per_output:%u\n", ml_capa[i].max_segs_per_output);
1301 printf(" min_input_align: %u\n", ml_capa[i].min_input_align);
1302 printf(" min_output_align: %u\n", ml_capa[i].min_output_align);
1303 printf(" packed_input_data: %u\n", ml_capa[i].packed_input_data);
1304 printf(" packed_output_data: %u\n", ml_capa[i].packed_output_data);
1305 printf(" load.compl_mode_mask: 0x%x\n", ml_capa[i].load.compl_mode_mask);
1306 printf(" load.compl_queue_plain: %i\n", ml_capa[i].load.compl_queue_plain);
1307 printf(" load.compl_queue_sched: %i\n", ml_capa[i].load.compl_queue_sched);
1308 printf(" run.compl_mode_mask: 0x%x\n", ml_capa[i].run.compl_mode_mask);
1309 printf(" run.compl_queue_plain: %i\n", ml_capa[i].run.compl_queue_plain);
1310 printf(" run.compl_queue_sched: %i\n", ml_capa[i].run.compl_queue_sched);
1311 printf(" pool.max_pools: %u\n", ml_capa[i].pool.max_pools);
1312 printf(" pool.max_num: %u\n", ml_capa[i].pool.max_num);
1313 printf(" pool.max_uarea_size:%u B\n", ml_capa[i].pool.max_uarea_size);
1314 printf(" pool.uarea_persistence: %u\n", ml_capa[i].pool.uarea_persistence);
1315 printf(" pool.min_cache_size: %u\n", ml_capa[i].pool.min_cache_size);
1316 printf(" pool.max_cache_size: %u\n", ml_capa[i].pool.max_cache_size);
1317 }
1318 if (ml_capa)
1319 free(ml_capa);
1320
1321 print_timer_capa(&appl_args);
1322
1323 if (crypto_ret == 0) {
1324 printf("\n");
1325 printf(" CRYPTO\n");
1326 printf(" max sessions: %u\n", crypto_capa.max_sessions);
1327 printf(" sync mode support: %s\n", support_level(crypto_capa.sync_mode));
1328 printf(" async mode support: %s\n", support_level(crypto_capa.async_mode));
1329 printf(" queue_type_sched: %i\n", crypto_capa.queue_type_sched);
1330 printf(" queue_type_plain: %i\n", crypto_capa.queue_type_plain);
1331 printf(" cipher algorithms: ");
1332 foreach_cipher(crypto_capa.ciphers, print_cipher);
1333 printf("\n");
1334 foreach_cipher(crypto_capa.ciphers, print_cipher_capa);
1335 printf(" cipher algorithms (HW): ");
1336 foreach_cipher(crypto_capa.hw_ciphers, print_cipher);
1337 printf("\n");
1338 foreach_cipher(crypto_capa.hw_ciphers, print_cipher_capa);
1339 printf(" auth algorithms: ");
1340 foreach_auth(crypto_capa.auths, print_auth);
1341 printf("\n");
1342 foreach_auth(crypto_capa.auths, print_auth_capa);
1343 printf(" auth algorithms (HW): ");
1344 foreach_auth(crypto_capa.hw_auths, print_auth);
1345 printf("\n");
1346 foreach_auth(crypto_capa.hw_auths, print_auth_capa);
1347 }
1348
1349 if (ipsec_ret == 0) {
1350 printf("\n");
1351 printf(" IPSEC\n");
1352 printf(" max SAs: %u\n", ipsec_capa.max_num_sa);
1353 printf(" sync mode support: %s\n",
1354 support_level(ipsec_capa.op_mode_sync));
1355 printf(" async mode support: %s\n",
1356 support_level(ipsec_capa.op_mode_async));
1357 printf(" inline inbound mode support: %s\n",
1358 support_level(ipsec_capa.op_mode_inline_in));
1359 printf(" inline outbound mode support: %s\n",
1360 support_level(ipsec_capa.op_mode_inline_out));
1361 printf(" AH support: %s\n",
1362 support_level(ipsec_capa.proto_ah));
1363 printf(" post-IPsec fragmentation: %s\n",
1364 support_level(ipsec_capa.frag_after));
1365 printf(" pre-IPsec fragmentation: %s\n",
1366 support_level(ipsec_capa.frag_before));
1367 printf(" post-IPsec classification: %s\n",
1368 support_level(ipsec_capa.pipeline_cls));
1369 printf(" retaining outer headers: %s\n",
1370 support_level(ipsec_capa.retain_header));
1371 printf(" outbound operation options:\n");
1372 printf(" frag_mode: %i\n",
1373 ipsec_capa.out_op.opt.frag_mode);
1374 printf(" tfc_pad: %i\n",
1375 ipsec_capa.out_op.opt.tfc_pad);
1376 printf(" tfc_dummy: %i\n",
1377 ipsec_capa.out_op.opt.tfc_dummy);
1378 printf(" ip_param: %i\n",
1379 ipsec_capa.out_op.opt.ip_param);
1380 printf(" inbound checksum offload support:\n");
1381 printf(" IPv4 header checksum: %s\n",
1382 support_level(ipsec_capa.chksums_in.chksum.ipv4));
1383 printf(" UDP checksum: %s\n",
1384 support_level(ipsec_capa.chksums_in.chksum.udp));
1385 printf(" TCP checksum: %s\n",
1386 support_level(ipsec_capa.chksums_in.chksum.tcp));
1387 printf(" SCTP checksum: %s\n",
1388 support_level(ipsec_capa.chksums_in.chksum.sctp));
1389 printf(" max destination CoSes: %u\n", ipsec_capa.max_cls_cos);
1390 printf(" max destination queues: %u\n", ipsec_capa.max_queues);
1391 printf(" queue_type_sched: %i\n", ipsec_capa.queue_type_sched);
1392 printf(" queue_type_plain: %i\n", ipsec_capa.queue_type_plain);
1393 printf(" vector support: %s\n",
1394 support_level(ipsec_capa.vector.supported));
1395 printf(" min_size: %u\n", ipsec_capa.vector.min_size);
1396 printf(" max_size: %u\n", ipsec_capa.vector.max_size);
1397 printf(" min_tmo_ns: %" PRIu64 " ns\n",
1398 ipsec_capa.vector.min_tmo_ns);
1399 printf(" max_tmo_ns: %" PRIu64 " ns\n",
1400 ipsec_capa.vector.max_tmo_ns);
1401 printf(" max anti-replay window size: %u\n",
1402 ipsec_capa.max_antireplay_ws);
1403 printf(" inline TM pipelining: %s\n",
1404 support_level(ipsec_capa.inline_ipsec_tm));
1405 printf(" testing capabilities:\n");
1406 printf(" sa_operations.seq_num: %i\n",
1407 ipsec_capa.test.sa_operations.seq_num);
1408 printf(" sa_operations.antireplay_window_top: %i\n",
1410 printf(" post-IPsec reassembly support:\n");
1411 printf(" ip: %i\n", ipsec_capa.reassembly.ip);
1412 printf(" ipv4: %i\n", ipsec_capa.reassembly.ipv4);
1413 printf(" ipv6: %i\n", ipsec_capa.reassembly.ipv6);
1414 printf(" max_wait_time: %" PRIu64 "\n",
1415 ipsec_capa.reassembly.max_wait_time);
1416 printf(" max_num_frags: %" PRIu16 "\n",
1417 ipsec_capa.reassembly.max_num_frags);
1418 printf(" reass_async: %i\n", ipsec_capa.reass_async);
1419 printf(" reass_inline: %i\n", ipsec_capa.reass_inline);
1420 printf(" cipher algorithms: ");
1421 foreach_cipher(ipsec_capa.ciphers, print_cipher);
1422 printf("\n");
1423 printf(" auth algorithms: ");
1424 foreach_auth(ipsec_capa.auths, print_auth);
1425 printf("\n");
1426 }
1427
1428 printf("\n");
1429 printf(" SHM MEMORY BLOCKS:\n");
1431
1432 printf("\n");
1433 printf("***********************************************************\n");
1434 printf("\n");
1435
1436 if (odp_term_local()) {
1437 ODPH_ERR("Local term failed.\n");
1438 exit(EXIT_FAILURE);
1439 }
1440
1441 if (odp_term_global(inst)) {
1442 ODPH_ERR("Global term failed.\n");
1443 exit(EXIT_FAILURE);
1444 }
1445
1446 return EXIT_SUCCESS;
1447}
int odp_atomic_lock_free_u64(odp_atomic_op_t *atomic_op)
Query which atomic uint64 operations are lock-free.
int odp_atomic_lock_free_u128(odp_atomic_op_t *atomic_op)
Query which atomic odp_atomic_u128_t operations are lock-free.
int odp_cls_capability(odp_cls_capability_t *capability)
Query classification capabilities.
#define ODP_BIG_ENDIAN_BITFIELD
Big endian bit field.
#define ODP_LITTLE_ENDIAN
Little endian byte order.
#define ODP_BITFIELD_ORDER
Selected bitfield order.
#define ODP_BIG_ENDIAN
Big endian byte order.
#define ODP_BYTE_ORDER
Selected byte order.
#define ODP_LITTLE_ENDIAN_BITFIELD
Little endian bit field.
int odp_comp_capability(odp_comp_capability_t *capa)
Query compression capabilities.
int odp_cpu_id(void)
CPU identifier.
int odp_cpu_count(void)
CPU count.
uint64_t odp_cpu_hz_max(void)
Maximum CPU frequency in Hz.
uint64_t odp_cpu_hz(void)
Current CPU frequency in Hz.
const char * odp_cpu_model_str(void)
CPU model name of this CPU.
int odp_cpumask_default_worker(odp_cpumask_t *mask, int num)
Default CPU mask for worker threads.
int odp_cpumask_all_available(odp_cpumask_t *mask)
Report all the available CPUs.
int odp_cpumask_default_control(odp_cpumask_t *mask, int num)
Default CPU mask for control threads.
int32_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, int32_t size)
Format a string from CPU mask.
#define ODP_CPUMASK_STR_SIZE
The maximum number of characters needed to record any CPU mask as a string (output of odp_cpumask_to_...
int odp_crypto_cipher_capability(odp_cipher_alg_t cipher, odp_crypto_cipher_capability_t capa[], int num)
Query supported cipher algorithm capabilities.
odp_cipher_alg_t
Crypto API cipher algorithm.
int odp_crypto_capability(odp_crypto_capability_t *capa)
Query crypto capabilities.
odp_auth_alg_t
Crypto API authentication algorithm.
int odp_crypto_auth_capability(odp_auth_alg_t auth, odp_crypto_auth_capability_t capa[], int num)
Query supported authentication algorithm capabilities.
@ ODP_CIPHER_ALG_KASUMI_F8
Confidentiality F8 algorithm (UEA1)
@ ODP_CIPHER_ALG_AES_CFB128
AES with 128-bit cipher feedback.
@ ODP_CIPHER_ALG_ZUC_NEA6
NEA6 confidentiality algorithm.
@ ODP_CIPHER_ALG_SNOW5G_NEA4
NEA4 confidentiality algorithm.
@ ODP_CIPHER_ALG_SNOW3G_UEA2
Confidentiality UEA2 algorithm (128-EEA1)
@ ODP_CIPHER_ALG_SNOW_V_GCM
SNOW-V-GCM AEAD algorithm.
@ ODP_CIPHER_ALG_AES_CCM
AES-CCM.
@ ODP_CIPHER_ALG_SM4_CCM
SM4-CCM AEAD algorithm.
@ ODP_CIPHER_ALG_AES_ECB
AES with electronic codebook.
@ ODP_CIPHER_ALG_AES_CTR
AES with counter mode.
@ ODP_CIPHER_ALG_CHACHA20_POLY1305
ChaCha20-Poly1305.
@ ODP_CIPHER_ALG_AES_CBC
AES with cipher block chaining.
@ ODP_CIPHER_ALG_SM4_ECB
SM4 block cipher in ECB mode.
@ ODP_CIPHER_ALG_AES_GCM
AES-GCM.
@ ODP_CIPHER_ALG_3DES_CBC
Triple DES with cipher block chaining.
@ ODP_CIPHER_ALG_AES_EEA2
Confidentiality 128-EEA2 algorithm.
@ ODP_CIPHER_ALG_SM4_CBC
SM4 block cipher in CBC mode.
@ ODP_CIPHER_ALG_AES_XTS
AES with XEX-based tweaked-codebook mode with ciphertext stealing (XTS)
@ ODP_CIPHER_ALG_DES
DES.
@ ODP_CIPHER_ALG_SM4_GCM
SM4-GCM AEAD algorithm.
@ ODP_CIPHER_ALG_NULL
No cipher algorithm specified.
@ ODP_CIPHER_ALG_ZUC_EEA3
ZUC based confidentiality algorithm.
@ ODP_CIPHER_ALG_SNOW_V
SNOW-V stream cipher.
@ ODP_CIPHER_ALG_3DES_ECB
Triple DES with Electronic Codebook.
@ ODP_CIPHER_ALG_SM4_CTR
SM4 block cipher in CTR mode.
@ ODP_AUTH_ALG_ZUC_NIA6
NIA6 integrity algorithm.
@ ODP_AUTH_ALG_SM4_GCM
SM4-GCM AEAD algorithm.
@ ODP_AUTH_ALG_MD5
MD5 algorithm.
@ ODP_AUTH_ALG_SHA384_HMAC
HMAC-SHA-384.
@ ODP_AUTH_ALG_CHACHA20_POLY1305
ChaCha20-Poly1305 AEAD.
@ ODP_AUTH_ALG_AES_CMAC
AES-CMAC.
@ ODP_AUTH_ALG_SHA384
384 bit SHA2 algorithm
@ ODP_AUTH_ALG_SM3
SM3 hash function.
@ ODP_AUTH_ALG_NULL
No authentication algorithm specified.
@ ODP_AUTH_ALG_SM4_CCM
SM4-CCM AEAD algorithm.
@ ODP_AUTH_ALG_SHA512
512 bit SHA2 algorithm
@ ODP_AUTH_ALG_SHA3_256
SHA-3 hash function producing 256-bit digests.
@ ODP_AUTH_ALG_MD5_HMAC
HMAC-MD5.
@ ODP_AUTH_ALG_SHA512_HMAC
HMAC-SHA-512.
@ ODP_AUTH_ALG_SHA1_HMAC
HMAC-SHA-1.
@ ODP_AUTH_ALG_SNOW5G_NIA4
NIA4 integrity algorithm.
@ ODP_AUTH_ALG_SHA256_HMAC
HMAC-SHA-256.
@ ODP_AUTH_ALG_SHA3_224_HMAC
HMAC using SHA3-224.
@ ODP_AUTH_ALG_SHA256
256 bit SHA2 algorithm
@ ODP_AUTH_ALG_SHA1
SHA1 algorithm.
@ ODP_AUTH_ALG_SNOW_V_GMAC
SNOW-V-GMAC.
@ ODP_AUTH_ALG_SNOW3G_UIA2
Integrity UIA2 algorithm (128-EIA1)
@ ODP_AUTH_ALG_SHA3_512
SHA-3 hash function producing 512-bit digests.
@ ODP_AUTH_ALG_SM3_HMAC
HMAC using SM3.
@ ODP_AUTH_ALG_SHA224_HMAC
HMAC-SHA-224.
@ ODP_AUTH_ALG_AES_GMAC
AES-GMAC.
@ ODP_AUTH_ALG_AES_XCBC_MAC
AES-XCBC-MAC.
@ ODP_AUTH_ALG_AES_GCM
AES-GCM.
@ ODP_AUTH_ALG_KASUMI_F9
Integrity F9 algorithm (UIA1)
@ ODP_AUTH_ALG_SHA3_256_HMAC
HMAC using SHA3-256.
@ ODP_AUTH_ALG_SHA3_384
SHA-3 hash function producing 384-bit digests.
@ ODP_AUTH_ALG_SM4_GMAC
SM4-GMAC.
@ ODP_AUTH_ALG_AES_CCM
AES-CCM.
@ ODP_AUTH_ALG_SHA3_224
SHA-3 hash function producing 224-bit digests.
@ ODP_AUTH_ALG_SNOW_V_GCM
SNOW-V-GCM AEAD algorithm.
@ ODP_AUTH_ALG_SHA3_384_HMAC
HMAC using SHA3-384.
@ ODP_AUTH_ALG_AES_EIA2
Integrity 128-EIA2 algorithm.
@ ODP_AUTH_ALG_SHA3_512_HMAC
HMAC using SHA3-512.
@ ODP_AUTH_ALG_ZUC_EIA3
ZUC-based integrity algorithm.
@ ODP_AUTH_ALG_SHA224
224 bit SHA2 algorithm
int odp_dma_capability(odp_dma_capability_t *capa)
Query DMA capabilities.
#define ODP_STATIC_ASSERT(cond, msg)
Compile time assertion macro.
int odp_init_local(odp_instance_t instance, odp_thread_type_t thr_type)
Thread local ODP initialization.
int odp_init_global(odp_instance_t *instance, const odp_init_t *params, const odp_platform_init_t *platform_params)
Global ODP initialization.
int odp_term_local(void)
Thread local ODP termination.
int odp_term_global(odp_instance_t instance)
Global ODP termination.
uint64_t odp_instance_t
ODP instance ID.
int odp_ipsec_capability(odp_ipsec_capability_t *capa)
Query IPSEC capabilities.
int odp_ml_num_engines(void)
Query number of ML engines.
int odp_ml_engine_capability(uint32_t engine_id, odp_ml_capability_t *capa)
Query ML capabilities of a specific engine.
void odp_pktio_param_init(odp_pktio_param_t *param)
Initialize pktio params.
int odp_pktio_close(odp_pktio_t pktio)
Close a packet IO interface.
odp_pktio_t odp_pktio_open(const char *name, odp_pool_t pool, const odp_pktio_param_t *param)
Open a packet IO interface.
#define ODP_PKTIO_INVALID
Invalid packet IO handle.
int odp_pktio_capability(odp_pktio_t pktio, odp_pktio_capability_t *capa)
Query packet IO interface capabilities.
@ ODP_PKTOUT_MODE_DIRECT
Direct packet output on the interface.
@ ODP_PKTIN_MODE_SCHED
Packet input through scheduler and scheduled event queues.
odp_pool_t odp_pool_create(const char *name, const odp_pool_param_t *param)
Create a pool.
int odp_pool_capability(odp_pool_capability_t *capa)
Query pool capabilities.
void odp_pool_param_init(odp_pool_param_t *param)
Initialize pool params.
int odp_pool_destroy(odp_pool_t pool)
Destroy a pool previously created by odp_pool_create()
int odp_pool_ext_capability(odp_pool_type_t type, odp_pool_ext_capability_t *capa)
Query capabilities of an external memory pool type.
#define ODP_POOL_INVALID
Invalid pool.
@ ODP_POOL_PACKET
Packet pool.
int odp_proto_stats_capability(odp_pktio_t pktio, odp_proto_stats_capability_t *capa)
Get proto stats capability.
int odp_queue_capability(odp_queue_capability_t *capa)
Query queue capabilities.
int odp_schedule_capability(odp_schedule_capability_t *capa)
Query scheduler capabilities.
void odp_shm_print_all(void)
Print all shared memory blocks.
#define ODP_SHM_EXPORT
Export memory.
#define ODP_SHM_SINGLE_VA
Single virtual address.
int odp_shm_capability(odp_shm_capability_t *capa)
Query shared memory capabilities.
#define ODP_SHM_PROC
Share with external processes.
#define ODP_SHM_HP
Use huge pages.
#define ODP_SHM_NO_HP
Don't use huge pages.
#define ODP_SHM_HW_ACCESS
Share memory with HW accelerators.
int odp_stash_capability(odp_stash_capability_t *capa, odp_stash_type_t type)
Query stash capabilities.
@ ODP_STASH_TYPE_DEFAULT
The default stash type.
odp_support_t
ODP support.
@ ODP_SUPPORT_PREFERRED
Feature is supported and preferred.
@ ODP_SUPPORT_YES
Feature is supported.
@ ODP_SUPPORT_NO
Feature is not supported.
odp_cpu_arch_x86_t
x86 ISA versions
int odp_sys_cache_line_size(void)
Cache line size in bytes.
uint64_t odp_sys_huge_page_size(void)
Default system huge page size in bytes.
uint64_t odp_sys_page_size(void)
Page size in bytes.
int odp_system_info(odp_system_info_t *info)
Retrieve system information.
int odp_sys_huge_page_size_all(uint64_t size[], int num)
System huge page sizes in bytes.
odp_cpu_arch_arm_t
ARM ISA versions.
void odp_sys_info_print(void)
Print system info.
void odp_sys_config_print(void)
Print configuration.
odp_cpu_arch_t
CPU instruction set architecture (ISA) families.
@ ODP_CPU_ARCH_X86_I686
x86 32bit ISA
@ ODP_CPU_ARCH_X86_64
x86 64bit ISA
@ ODP_CPU_ARCH_ARMV8_1
ARMv8.1-A ISA.
@ ODP_CPU_ARCH_ARMV8_0
ARMv8.0-A ISA.
@ ODP_CPU_ARCH_ARMV9_1
ARMv9.1-A ISA.
@ ODP_CPU_ARCH_ARMV8_4
ARMv8.4-A ISA.
@ ODP_CPU_ARCH_ARMV8_8
ARMv8.8-A ISA.
@ ODP_CPU_ARCH_ARMV8_9
ARMv8.9-A ISA.
@ ODP_CPU_ARCH_ARMV7
ARMv7-A ISA.
@ ODP_CPU_ARCH_ARMV6
ARMv6 ISA.
@ ODP_CPU_ARCH_ARMV9_3
ARMv9.3-A ISA.
@ ODP_CPU_ARCH_ARMV8_6
ARMv8.6-A ISA.
@ ODP_CPU_ARCH_ARMV9_2
ARMv9.2-A ISA.
@ ODP_CPU_ARCH_ARMV8_3
ARMv8.3-A ISA.
@ ODP_CPU_ARCH_ARMV8_2
ARMv8.2-A ISA.
@ ODP_CPU_ARCH_ARMV9_0
ARMv9.0-A ISA.
@ ODP_CPU_ARCH_ARMV8_5
ARMv8.5-A ISA.
@ ODP_CPU_ARCH_ARMV8_7
ARMv8.7-A ISA.
@ ODP_CPU_ARCH_ARM
ARM.
@ ODP_CPU_ARCH_PPC
PowerPC.
@ ODP_CPU_ARCH_X86
x86
@ ODP_CPU_ARCH_MIPS
MIPS.
@ ODP_CPU_ARCH_RISCV
RISC-V.
#define ODP_THREAD_COUNT_MAX
Maximum number of threads supported in build time.
int odp_thread_count_max(void)
Maximum thread count.
@ ODP_THREAD_CONTROL
Control thread.
int odp_timer_pool_start_multi(odp_timer_pool_t timer_pool[], int num)
Start timer pools.
#define ODP_TIMER_POOL_INVALID
Invalid timer pool handle.
odp_timer_pool_t odp_timer_pool_create(const char *name, const odp_timer_pool_param_t *params)
Create a timer pool.
int odp_timer_capability(odp_timer_clk_src_t clk_src, odp_timer_capability_t *capa)
Query timer capabilities per clock source.
int odp_timer_pool_info(odp_timer_pool_t timer_pool, odp_timer_pool_info_t *info)
Query timer pool configuration and current state.
#define ODP_CLOCK_DEFAULT
The default clock source.
void odp_timer_pool_param_init(odp_timer_pool_param_t *param)
Initialize timer pool parameters.
void odp_timer_pool_destroy(odp_timer_pool_t timer_pool)
Destroy a timer pool.
@ ODP_CLOCK_NUM_SRC
Number of clock source enumerations.
const char * odp_version_impl_str(void)
Implementation version string.
const char * odp_version_impl_name(void)
Implementation name string.
const char * odp_version_api_str(void)
ODP API version string.
The OpenDataPlane API.
Classification capabilities This capability structure defines system level classification capability.
uint32_t max_pmr
Maximum number of single-term PMRs.
uint64_t max_mark
Maximum value of odp_pmr_create_opt_t::mark.
uint32_t max_hash_queues
Maximum number of queues supported per CoS.
odp_threshold_types_t threshold_red
Supported threshold type for RED.
odp_support_t back_pressure
Support for Back Pressure to the remote peer.
uint32_t max_terms_per_pmr
Maximum number of terms per composite PMR.
odp_threshold_types_t threshold_bp
Supported threshold type for BP.
odp_cls_pmr_terms_t supported_terms
PMR terms supported by the classifier.
uint32_t max_cos
Maximum number of CoS supported.
odp_support_t random_early_detection
Support for Random Early Detection.
odp_pktin_hash_proto_t hash_protocols
Protocol header combination supported for Hashing.
uint32_t max_pmr_priority
Maximum priority value of a PMR.
odp_bool_t pmr_range_supported
A Boolean to denote support of PMR range.
uint32_t max_pmr_per_cos
Maximum number of PMRs per CoS.
odp_cls_stats_capability_t stats
Statistics counters capabilities.
struct odp_cls_stats_capability_t::@9 queue
Queue level capabilities.
uint64_t all_counters
All bits of the bit field structure.
Compression Interface Capabilities.
odp_support_t sync
Synchronous compression mode support (ODP_COMP_OP_MODE_SYNC)
uint32_t max_sessions
Maximum number of sessions.
odp_support_t async
Asynchronous compression mode support (ODP_COMP_OP_MODE_ASYNC)
odp_comp_hash_algos_t hash_algos
Supported hash algorithms.
odp_comp_algos_t comp_algos
Supported compression algorithms.
Authentication algorithm capabilities.
odp_support_t async_mode
Supported packet operation in ASYNC mode.
odp_bool_t queue_type_sched
Scheduled crypto completion queue support.
odp_crypto_cipher_algos_t ciphers
Supported cipher algorithms.
odp_crypto_auth_algos_t hw_auths
Authentication algorithms implemented with HW offload.
odp_crypto_cipher_algos_t hw_ciphers
Cipher algorithms implemented with HW offload.
odp_support_t sync_mode
Supported packet operation in SYNC mode.
odp_bool_t queue_type_plain
Plain crypto completion queue support.
odp_crypto_auth_algos_t auths
Supported authentication algorithms.
uint32_t max_sessions
Maximum number of crypto sessions.
Cipher algorithm capabilities.
uint32_t max_sessions
Maximum number of DMA sessions.
uint32_t max_transfers
Maximum number of transfers per DMA session.
odp_bool_t dst_seg_alloc
Destination segment allocation support for data format ODP_DMA_FORMAT_PACKET.
odp_dma_pool_capability_t pool
DMA completion event pool capabilities.
uint32_t max_segs
Maximum number of destination and source segments combined in a single transfer.
uint32_t max_dst_segs
Maximum number of destination segments in a single transfer.
uint32_t max_src_segs
Maximum number of source segments in a single transfer.
odp_bool_t queue_type_sched
Scheduled queue support.
odp_dma_compl_mode_t compl_mode_mask
Supported completion modes.
uint32_t max_seg_len
Maximum segment length in bytes.
odp_bool_t queue_type_plain
Plain queue support.
odp_bool_t src_seg_free
Source segment free support for data format ODP_DMA_FORMAT_PACKET.
odp_bool_t uarea_persistence
Pool user area persistence.
uint32_t min_cache_size
Minimum size of thread local cache.
uint32_t max_cache_size
Maximum size of thread local cache.
uint32_t max_uarea_size
Maximum user area size in bytes.
uint32_t max_pools
Maximum number of DMA completion event pools.
uint32_t max_num
Maximum number of DMA completion events in a pool.
uint32_t max_size
Maximum number of events that can be aggregated into an event vector.
uint64_t min_tmo_ns
Minimum time in nanoseconds for an aggregator to form an event vector.
uint32_t max_num_per_queue
Maximum number of event aggregators per queue.
uint32_t min_size
Minimum number of events that can be aggregated into an event vector.
uint64_t max_tmo_ns
Maximum allowed value of odp_event_aggr_config_t::max_tmo_ns.
uint32_t max_num
Maximum number of event aggregators for this queue type.
uint64_t integer
Integer part.
uint64_t denom
Denominator of the fraction part.
uint64_t numer
Numerator of the fraction part.
odp_reass_capability_t reassembly
Post-IPsec reassembly capability.
odp_ipsec_out_op_capability_t out_op
Outbound operation specific capabilities.
odp_bool_t reass_inline
Support of reassembly after inline inbound IPsec processing.
uint32_t max_cls_cos
Maximum number of different destination CoSes in classification pipelining.
odp_crypto_cipher_algos_t ciphers
Supported cipher algorithms.
odp_support_t frag_after
Fragment after IPsec support.
odp_support_t inline_ipsec_tm
Support of traffic manager (TM) after inline outbound IPSEC processing.
odp_pktin_vector_capability_t vector
Support for returning completion packets as vectors.
odp_bool_t queue_type_sched
Scheduled queue support.
odp_support_t op_mode_sync
Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC) support.
odp_support_t frag_before
Fragment before IPsec support.
odp_support_t op_mode_inline_in
Inline inbound IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support.
odp_support_t op_mode_inline_out
Inline outgoing IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support.
odp_support_t pipeline_cls
Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of resulting inbound packets.
uint32_t max_antireplay_ws
Maximum anti-replay window size.
uint32_t max_num_sa
Maximum number of IPSEC SAs.
odp_proto_chksums_t chksums_in
Inner packet checksum check offload support in inbound direction.
odp_support_t op_mode_async
Asynchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_ASYNC) support.
odp_crypto_auth_algos_t auths
Supported authentication algorithms.
uint32_t max_queues
Maximum number of different destination queues.
odp_support_t retain_header
Support of retaining outer headers (retain_outer) in inbound inline processed packets.
odp_bool_t queue_type_plain
Plain queue support.
odp_bool_t reass_async
Support of reassembly after inbound processing in odp_ipsec_in_enq()
odp_ipsec_test_capability_t test
IPSEC TEST capabilities.
odp_support_t proto_ah
IP Authenticated Header (ODP_IPSEC_AH) support.
uint8_t ip_param
IP parameters option supported.
uint8_t tfc_dummy
TFC dummy packet option supported.
uint8_t frag_mode
fragmentation mode option supported
uint8_t tfc_pad
TFC padding length option supported.
struct odp_ipsec_out_op_capability_t::@46 opt
Supported outbound operation option flags.
odp_bool_t antireplay_window_top
Highest authenticated sequence number.
odp_bool_t seq_num
Next sequence number value.
struct odp_ipsec_test_capability_t::@47 sa_operations
Parameters supported for sa_update.
uint32_t max_payload_len
Maximum payload length per an LSO generated packet (in bytes).
uint32_t max_packet_segments
Maximum number of segments in an input packet.
uint32_t max_segments
Maximum number of segments an LSO operation may create.
uint32_t max_profiles
Maximum number of LSO profiles.
uint32_t sctp_ipv4
ODP_LSO_PROTO_SCTP_IPV4 support.
uint32_t max_profiles_per_pktio
Maximum number of LSO profiles per packet IO interface.
uint16_t add_payload_len
ODP_LSO_ADD_PAYLOAD_LEN support.
uint8_t max_num_custom
Maximum number of custom fields supported per LSO profile.
uint16_t write_bits
ODP_LSO_WRITE_BITS support.
uint32_t tcp_ipv4
ODP_LSO_PROTO_TCP_IPV4 support.
uint16_t add_segment_num
ODP_LSO_ADD_SEGMENT_NUM support.
uint32_t ipv4
ODP_LSO_PROTO_IPV4 support.
uint32_t max_payload_offset
Maximum supported offset to the packet payload (in bytes).
struct odp_lso_capability_t::@113 mod_op
Supported LSO custom modification options.
struct odp_lso_capability_t::@114 proto
Supported LSO protocol options.
uint32_t tcp_ipv6
ODP_LSO_PROTO_TCP_IPV6 support.
uint32_t custom
ODP_LSO_PROTO_CUSTOM support.
uint32_t sctp_ipv6
ODP_LSO_PROTO_SCTP_IPV6 support.
uint32_t ipv6
ODP_LSO_PROTO_IPV6 support.
uint16_t add_payload_offset
ODP_LSO_ADD_PAYLOAD_OFFSET support.
Machine learning capabilities.
uint8_t static_ref
Static reference.
uint8_t referenced_pkt
A packet referenced by another packet (excluding static references)
uint8_t referencing_pkt
Referencing packet, created using odp_packet_ref()
uint64_t max_tmo_ns
Maximum timeout in nanoseconds for the producer to wait for the vector of packets.
uint64_t min_tmo_ns
Minimum value allowed to be configured to odp_pktin_vector_config_t::max_tmo_ns.
uint32_t min_size
Minimum value allowed to be configured to odp_pktin_vector_config_t::max_size.
uint32_t max_size
Maximum number of packets that can be accumulated into a packet vector by a producer.
odp_support_t supported
Packet input vector availability.
struct odp_pktio_capability_t::@117 free_ctrl
Supported packet free control options.
odp_bool_t queue_type_sched
Scheduled queue support.
odp_bool_t equal
Equal maximum frame length for both packet input and output.
uint32_t mode_poll
Packet transmit completion mode ODP_PACKET_TX_COMPL_POLL support.
odp_pktio_set_op_t set_op
Supported set operations.
uint32_t pfc_tx
Generation of PFC frames.
uint32_t max_output
Maximum valid value for 'maxlen_output'.
uint32_t pfc_rx
Reception of PFC frames.
odp_pktin_vector_capability_t vector
Packet input vector capability.
uint32_t max_input_queues
Maximum number of input queues.
uint32_t max_input
Maximum valid value for 'maxlen_input'.
odp_pktio_config_t config
Supported pktio configuration options.
odp_packet_ref_types_t packet_ref
Supported packet reference types.
struct odp_pktio_capability_t::@115 maxlen
Supported frame lengths for odp_pktio_maxlen_set()
uint32_t min_output
Minimum valid value for 'maxlen_output'.
uint32_t max_output_queue_size
Maximum output queue size.
uint32_t max_output_queues
Maximum number of output queues.
uint32_t max_compl_id
Maximum supported completion ID value.
uint32_t min_output_queue_size
Minimum output queue size.
uint64_t max_tx_aging_tmo_ns
Max Tx aging timeout in nano seconds supported when packet aging feature is supported.
uint32_t dont_free
Packet free control option ODP_PACKET_FREE_CTRL_DONT_FREE support with odp_packet_free_ctrl_set().
uint32_t min_input
Minimum valid value for 'maxlen_input'.
odp_pktio_stats_capability_t stats
Statistics counters capabilities.
odp_lso_capability_t lso
LSO capabilities.
uint32_t mode_event
Packet transmit completion mode ODP_PACKET_TX_COMPL_EVENT support.
uint32_t max_input_queue_size
Maximum input queue size.
struct odp_pktio_capability_t::@116 tx_compl
Supported packet Tx completion options.
odp_bool_t queue_type_plain
Plain queue support.
uint32_t pause_tx
Generation of traditional Ethernet pause frames.
uint32_t pause_rx
Reception of traditional Ethernet pause frames.
struct odp_pktio_capability_t::@118 flow_control
Supported flow control modes.
uint32_t min_input_queue_size
Minimum input queue size.
odp_reass_capability_t reassembly
Packet input reassembly capability.
odp_pktout_config_opt_t pktout
Packet output configuration options bit field.
odp_pktin_config_opt_t pktin
Packet input configuration options bit field.
Packet IO parameters.
odp_pktin_mode_t in_mode
Packet input mode.
odp_pktout_mode_t out_mode
Packet output mode.
uint64_t all_counters
All bits of the bit field structure.
struct odp_pktio_stats_capability_t::@95 pktio
Interface level capabilities.
struct odp_pktio_stats_capability_t::@96 pktin_queue
Input queue level capabilities.
struct odp_pktio_stats_capability_t::@97 pktout_queue
Output queue level capabilities.
uint32_t max_align
Maximum buffer data alignment in bytes.
uint32_t max_headroom
Maximum packet level headroom length in bytes.
uint32_t min_headroom
Minimum packet level headroom length in bytes.
uint32_t max_num
Maximum number of buffers of any size.
uint32_t min_cache_size
Minimum size of thread local cache.
struct odp_pool_capability_t::@133 buf
Buffer pool capabilities
struct odp_pool_capability_t::@135 tmo
Timeout pool capabilities
uint32_t max_segs_per_pkt
Maximum number of segments per packet.
odp_bool_t uarea_persistence
Pool user area persistence.
uint32_t max_uarea_size
Maximum user area size in bytes.
struct odp_pool_capability_t::@134 pkt
Packet pool capabilities
uint32_t max_size
Maximum buffer data size in bytes.
struct odp_pool_capability_t::@136 vector
Vector pool capabilities.
uint8_t max_num_subparam
Maximum number of subparameters.
odp_pool_stats_opt_t stats
Supported statistics counters.
uint32_t max_cache_size
Maximum size of thread local cache.
uint32_t min_seg_len
Minimum packet segment data length in bytes.
uint32_t max_pools
Maximum number of pools of any type (odp_pool_type_t)
uint32_t min_tailroom
Minimum packet level tailroom length in bytes.
uint32_t max_seg_len
Maximum packet segment data length in bytes.
uint32_t max_len
Maximum packet data length in bytes.
External memory pool capabilities.
uint16_t buf_size_aligned
Packet buffers are size aligned.
uint32_t max_pools
Maximum number of pools.
uint32_t max_num_buf
Maximum number of packet buffers.
odp_bool_t uarea_persistence
Pool user area persistence.
uint32_t max_segs_per_pkt
Maximum number of segments per packet.
uint32_t max_headroom
Maximum headroom parameter value.
uint32_t odp_trailer_size
ODP trailer size in bytes.
uint32_t min_mem_align
Minimum packet pool memory area alignment in bytes.
uint32_t max_uarea_size
Maximum user area size in bytes.
uint32_t min_head_align
Minimum packet headroom alignment in bytes.
uint32_t min_cache_size
Minimum size of thread local cache.
odp_pool_stats_opt_t stats
Supported statistics counters.
uint32_t max_headroom_size
Maximum headroom size in bytes.
struct odp_pool_ext_capability_t::@144 pkt
Packet pool capabilities
uint32_t max_cache_size
Maximum size of thread local cache.
uint32_t odp_header_size
ODP header size in bytes.
uint32_t max_buf_size
Maximum packet buffer size in bytes.
uint32_t min_buf_align
Minimum packet buffer pointer alignment in bytes.
uint32_t num
Number of buffers in the pool.
struct odp_pool_param_t::@139 pkt
Parameters for packet pools.
odp_pool_type_t type
Pool type.
odp_proto_stats_counters_t counters
Stats counters supported.
odp_bool_t oct_count1_adj
Packet adjust support for Octet counter 1.
odp_bool_t oct_count0_adj
Packet adjust support for Octet counter 0.
struct odp_proto_stats_capability_t::@153 tx
Tx capabilities.
struct odp_queue_capability_t::@155 plain
Plain queue capabilities.
uint32_t max_size
Maximum number of events a plain (ODP_BLOCKING) queue can store simultaneously.
uint32_t max_num
Maximum number of plain (ODP_BLOCKING) queues of the default size.
struct odp_queue_capability_t::@155::@156 lockfree
Lock-free (ODP_NONBLOCKING_LF) implementation capabilities.
struct odp_queue_capability_t::@155::@157 waitfree
Wait-free (ODP_NONBLOCKING_WF) implementation capabilities.
uint32_t max_queues
Maximum number of event queues of any type (default size).
odp_event_aggr_capability_t aggr
Event vector generation capabilities.
uint16_t max_num_frags
Maximum number of fragments that can be reassembled.
odp_bool_t ipv4
Reassembly offload for IPv4 packets.
odp_bool_t ipv6
Reassembly offload for IPv6 packets.
odp_bool_t ip
Reassembly offload for both IPv4 and IPv6 packets.
uint64_t max_wait_time
Maximum time in ns that a fragment can wait in the reassembly offload for the arrival of further frag...
uint32_t max_flow_id
Maximum flow ID per queue.
odp_support_t order_wait
Order wait support.
uint32_t max_groups
Maximum number of scheduling groups.
uint32_t max_queues
Maximum number of scheduled (ODP_BLOCKING) queues of the default size.
odp_support_t waitfree_queues
Wait-free (ODP_NONBLOCKING_WF) queues support.
odp_support_t lockfree_queues
Lock-free (ODP_NONBLOCKING_LF) queues support.
uint32_t max_queue_size
Maximum number of events a scheduled (ODP_BLOCKING) queue can store simultaneously.
odp_schedule_prio_t min_prio
Minimum scheduling priority value.
uint32_t max_group_prios
Maximum simultaneous number of group and priority combinations.
uint32_t max_ordered_locks
Maximum number of ordered locks per queue.
uint32_t max_prios
Number of scheduling priorities.
odp_event_aggr_capability_t aggr
Event aggregator capabilities for scheduled queues.
Shared memory capabilities.
uint32_t max_blocks
Maximum number of shared memory blocks.
uint32_t flags
Supported shared memory flags.
uint64_t max_size
Maximum memory block size in bytes.
uint64_t max_align
Maximum memory block alignment in bytes.
Stash capabilities (per stash type)
uint64_t u16
Maximum number of 2 byte object handles.
uint32_t max_stashes_any_type
Maximum number of stashes of any type.
uint32_t max_get_batch
Maximum number of object handles in batch get operations.
uint64_t u128
Maximum number of 16 byte object handles.
uint32_t max_put_batch
Maximum number of object handles in batch put operations.
uint64_t max_obj_size
Maximum number of 'max_obj_size' object handles.
uint32_t max_stashes
Maximum number of stashes of this type.
uint64_t u64
Maximum number of 8 byte object handles.
odp_stash_stats_opt_t stats
Supported statistics counters.
uint32_t max_cache_size
Maximum size of thread local cache.
uint64_t u32
Maximum number of 4 byte object handles.
uint64_t max_num_obj
Maximum common number of object handles per stash for any object size.
uint64_t u8
Maximum number of 1 byte object handles.
struct odp_stash_capability_t::@171 max_num
Maximum number of object handles per stash for each object size.
odp_cpu_arch_isa_t cpu_isa_hw
ISA version of CPU hardware.
odp_cpu_arch_t cpu_arch
CPU architecture.
odp_cpu_arch_isa_t cpu_isa_sw
ISA version of ODP software.
odp_fract_u64_t min_base_freq_hz
Minimum supported base frequency value.
uint16_t max_priority
Maximum single shot timer pool priority.
uint32_t max_pending_tmo
Maximum value for odp_timer_pool_param_t::periodic::max_pending_tmo.
struct odp_timer_capability_t::@186 periodic
Periodic timer capabilities.
uint32_t max_timers
Maximum number of single shot timers in a pool.
struct odp_timer_capability_t::@186::@187 support
Supported period configuration types.
uint32_t max_pools_combined
Maximum number of timer pools.
uint32_t max_pools
Maximum number of timer pools for single shot timers (per clock source)
uint32_t freq
ODP_TIMER_TYPE_PERIODIC_FREQ supported.
odp_timer_res_capability_t max_tmo
Maximum timeout length.
odp_fract_u64_t max_base_freq_hz
Maximum supported base frequency value.
odp_timer_res_capability_t max_res
Maximum resolution.
uint32_t min_pending_tmo
Minimum value for odp_timer_pool_param_t::periodic::max_pending_tmo.
odp_bool_t queue_type_plain
Plain queue destination support.
odp_fract_u64_t max_freq_hz
Maximum supported periodic timer frequency value.
uint32_t base_mul
ODP_TIMER_TYPE_PERIODIC_BASE_MUL supported.
uint64_t highest_res_ns
Highest timer resolution in nanoseconds.
odp_bool_t queue_type_sched
Scheduled queue destination support.
odp_fract_u64_t min_freq_hz
Minimum supported periodic timer frequency value.
ODP timer pool information and configuration.
odp_timer_tick_info_t tick_info
Timer pool tick information.
Timer pool parameters.
uint64_t res_ns
Timeout resolution in nanoseconds.
uint64_t min_tmo
Minimum relative timeout in nanoseconds.
uint32_t num_timers
Number of timers in the pool.
odp_timer_clk_src_t clk_src
Clock source for timers.
uint64_t max_tmo
Maximum relative timeout in nanoseconds.
uint64_t res_hz
Timeout resolution in hertz.
uint64_t max_tmo
Maximum relative timeout in nanoseconds.
uint64_t min_tmo
Minimum relative timeout in nanoseconds.
uint64_t res_ns
Timeout resolution in nanoseconds.
odp_fract_u64_t clk_cycle
One timer tick in source clock cycles.
odp_fract_u64_t freq
Timer tick frequency in hertz.
odp_fract_u64_t nsec
One timer tick in nanoseconds.
Atomic operations.
uint32_t fetch_max
Atomic fetch and maximum.
struct odp_atomic_op_t::@2 op
Operation flags.
uint32_t bit_clr
Atomic bit clear.
uint32_t fetch_add
Atomic fetch and add.
uint32_t fetch_sub
Atomic fetch and subtract.
uint32_t xchg
Atomic exchange.
uint32_t bit_set
Atomic bit set.
uint32_t sub
Atomic subtract.
uint32_t load
Atomic load.
uint32_t fetch_dec
Atomic fetch and decrement.
uint32_t fetch_inc
Atomic fetch and increment.
uint32_t inc
Atomic increment.
uint32_t bit_fetch_set
Atomic bit fetch and set.
uint32_t min
Atomic minimum.
uint32_t max
Atomic maximum.
uint32_t cas
Atomic compare and swap.
uint32_t store
Atomic store.
uint32_t fetch_min
Atomic fetch and minimum.
uint32_t dec
Atomic decrement.
uint32_t add
Atomic add.
uint32_t bit_fetch_clr
Atomic bit fetch and clear.
uint64_t all_bits
All bits of the bit field structure.
uint32_t all_bits
All bits of the bit field structure This field can be used to set/clear all flags,...
uint32_t all_bits
All bits of the bit field structure.
odp_cpu_arch_arm_t arm
ARM ISA versions.
odp_cpu_arch_x86_t x86
x86 ISA versions
Authentication algorithms in a bit field structure.
uint32_t md5
ODP_AUTH_ALG_MD5.
uint32_t sha3_512_hmac
ODP_AUTH_ALG_SHA3_512_HMAC.
uint32_t sha384
ODP_AUTH_ALG_SHA384.
uint32_t sha224
ODP_AUTH_ALG_SHA224.
uint32_t sha3_224
ODP_AUTH_ALG_SHA3_224.
uint32_t sm3
ODP_AUTH_ALG_SM3.
uint32_t null
ODP_AUTH_ALG_NULL.
uint32_t sha1_hmac
ODP_AUTH_ALG_SHA1_HMAC.
uint32_t sha512_hmac
ODP_AUTH_ALG_SHA512_HMAC.
uint32_t sha256
ODP_AUTH_ALG_SHA256.
uint32_t sha224_hmac
ODP_AUTH_ALG_SHA224_HMAC.
uint32_t sm4_gmac
ODP_AUTH_ALG_SM4_GMAC.
uint32_t sha3_512
ODP_AUTH_ALG_SHA3_512.
uint32_t aes_cmac
ODP_AUTH_ALG_AES_CMAC.
uint32_t zuc_eia3
ODP_AUTH_ALG_ZUC_EIA3.
uint32_t kasumi_f9
ODP_AUTH_ALG_KASUMI_F9.
uint32_t sm4_ccm
ODP_AUTH_ALG_SM4_CCM.
uint32_t snow3g_uia2
ODP_AUTH_ALG_SNOW3G_UIA2.
uint32_t snow_v_gmac
ODP_AUTH_ALG_SNOW_V_GMAC.
uint32_t aes_gmac
ODP_AUTH_ALG_AES_GMAC.
uint32_t sm4_gcm
ODP_AUTH_ALG_SM4_GCM.
uint32_t sha3_224_hmac
ODP_AUTH_ALG_SHA3_224_HMAC.
uint32_t aes_gcm
ODP_AUTH_ALG_AES_GCM.
uint32_t sm3_hmac
ODP_AUTH_ALG_SM3_HMAC.
uint32_t snow_v_gcm
ODP_AUTH_ALG_SNOW_V_GCM.
uint32_t md5_hmac
ODP_AUTH_ALG_MD5_HMAC.
uint32_t sha1
ODP_AUTH_ALG_SHA1.
uint32_t sha3_384_hmac
ODP_AUTH_ALG_SHA3_384_HMAC.
uint32_t aes_xcbc_mac
ODP_AUTH_ALG_AES_XCBC_MAC.
uint32_t sha3_256
ODP_AUTH_ALG_SHA3_256.
uint32_t sha384_hmac
ODP_AUTH_ALG_SHA384_HMAC.
uint32_t sha256_hmac
ODP_AUTH_ALG_SHA256_HMAC.
uint32_t aes_eia2
ODP_AUTH_ALG_AES_EIA2.
uint32_t sha3_256_hmac
ODP_AUTH_ALG_SHA3_256_HMAC.
uint32_t chacha20_poly1305
ODP_AUTH_ALG_CHACHA20_POLY1305.
uint32_t sha512
ODP_AUTH_ALG_SHA512.
struct odp_crypto_auth_algos_t::@25 bit
Authentication algorithms.
uint32_t zuc_nia6
ODP_AUTH_ALG_ZUC_NIA6.
uint32_t aes_ccm
ODP_AUTH_ALG_AES_CCM.
uint32_t snow5g_nia4
ODP_AUTH_ALG_SNOW5G_NIA4.
uint32_t sha3_384
ODP_AUTH_ALG_SHA3_384.
Cipher algorithms in a bit field structure.
uint32_t snow_v
ODP_CIPHER_ALG_SNOW_V.
struct odp_crypto_cipher_algos_t::@24 bit
Cipher algorithms.
uint32_t sm4_cbc
ODP_CIPHER_ALG_SM4_CBC.
uint32_t aes_cfb128
ODP_CIPHER_ALG_AES_CFB128.
uint32_t zuc_nea6
ODP_CIPHER_ALG_ZUC_NEA6.
uint32_t aes_gcm
ODP_CIPHER_ALG_AES_GCM.
uint32_t trides_cbc
ODP_CIPHER_ALG_3DES_CBC.
uint32_t snow_v_gcm
ODP_CIPHER_ALG_SNOW_V_GCM.
uint32_t sm4_ecb
ODP_CIPHER_ALG_SM4_ECB.
uint32_t aes_eea2
ODP_CIPHER_ALG_AES_EEA2.
uint32_t aes_ctr
ODP_CIPHER_ALG_AES_CTR.
uint32_t aes_cbc
ODP_CIPHER_ALG_AES_CBC.
uint32_t sm4_ctr
ODP_CIPHER_ALG_SM4_CTR.
uint32_t des
ODP_CIPHER_ALG_DES.
uint32_t aes_xts
ODP_CIPHER_ALG_AES_XTS.
uint32_t snow5g_nea4
ODP_CIPHER_ALG_SNOW5G_NEA4.
uint32_t zuc_eea3
ODP_CIPHER_ALG_ZUC_EEA3.
uint32_t null
ODP_CIPHER_ALG_NULL.
uint32_t sm4_gcm
ODP_CIPHER_ALG_SM4_GCM.
uint32_t kasumi_f8
ODP_CIPHER_ALG_KASUMI_F8.
uint32_t sm4_ccm
ODP_CIPHER_ALG_SM4_CCM.
uint32_t aes_ecb
ODP_CIPHER_ALG_AES_ECB.
uint32_t chacha20_poly1305
ODP_CIPHER_ALG_CHACHA20_POLY1305.
uint32_t trides_ecb
ODP_CIPHER_ALG_3DES_ECB.
uint32_t snow3g_uea2
ODP_CIPHER_ALG_SNOW3G_UEA2.
uint32_t aes_ccm
ODP_CIPHER_ALG_AES_CCM.
uint64_t all_bits
All bits of the bit field structure.
uint32_t all_bits
All bits of the bit field structure.
uint32_t all_bits
All bits of the bit field structure.
uint64_t all_bits
All bits of the bit field structure.
uint64_t all
All bits of the bit field structure.
uint32_t sctp
SCTP checksum.
uint32_t ipv4
IPv4 header checksum.
struct odp_proto_chksums_t::@124 chksum
Individual checksum bits.
uint32_t tcp
TCP checksum.
uint32_t udp
UDP checksum.
uint64_t all_bits
All bits of the bit field structure.
uint64_t all
All bits of the bit field structure.
uint8_t all_bits
All bits of the bit field structure.