abstract class Dpdk
- Dpdk
- Reference
- Object
Overview
Crystal bindings to Intel's DPDK
Defined in:
dpdk/core.crdpdk/asm.cr
dpdk/llvm.cr
dpdk/macros_defines.cr
dpdk/macros_overrides.cr
dpdk/macros_overloads.cr
dpdk/inlines.cr
dpdk/extras.cr
dpdk/units.cr
dpdk/debug.cr
Instance Method Summary
-
#_mm_pause
emmintrin.h pause implementation
-
#print_macaddr(port)
rte_eth_macaddr_get and print
-
#rte_errno
per core rte_errno, use with rte_strerror(rte_errno)
-
#rte_eth_tx_buffer(port_id : UInt16, queue_id : UInt16, buffer : ::Pointer(RteEthDevTxBuffer), tx_pkt : ::Pointer(RteMbuf)) : UInt16
Buffer a single packet for future transmission on a port and queue TODO: measure performance vs C
-
#rte_eth_tx_buffer_flush(port_id : UInt16, queue_id : UInt16, buffer : ::Pointer(RteEthDevTxBuffer)) : UInt16
Send any packets queued up for transmission on a port and HW queue TODO: measure performance vs C
-
#rte_get_master_lcore
return master_lcore number
-
#rte_get_next_lcore(i : UInt32, skip_master = 1, wrap = 0) : UInt32
return next available lcore
-
#rte_lcore_count
return lcore_count
-
#rte_lcore_foreach_slave(&block)
RTE_LCORE_FOREACH_SLAVE equivalent
-
#rte_lcore_foreach_worker(limit = 32, &block)
rte_lcore_foreach_slave with worker_id
-
#rte_lcore_id
per core lcore_id
-
#rte_lcore_is_enabled(lcore_id) : Bool
check lcore is enabled or not, return boolean
- #rte_prefetch0(p : Pointer) : Void
- #rte_prefetch1(p : Pointer) : Void
- #rte_prefetch2(p : Pointer) : Void
- #rte_prefetch_non_temporal(p : Pointer) : Void
- #rte_ring_count(r : ::Pointer(RteRing))
-
#rte_socket_id
per core socket_id, unavailable on old gcc
Macro Summary
-
apply_from_si_measure(var, s)
SI Measure Units (T, G, M, k) to number converter
-
apply_from_si_time(var, s)
SI Time Units (s, ms, us) to number converter
- b16(x)
- b32(x)
-
configure_tx_offload(port_conf, dev_info)
set txmode.offloads and return txconf pointer
-
copy32(dst, src, size)
copy by u32
-
copy64(dst, src, size)
copy by u64
-
distributor_create(cores)
rte_distributor_create with error handling
-
ether_addr_copy(ea_from, ea_to)
ether_addr_copy
-
fail(*args)
rte_exit with EXIT_FAILURE
-
fflush(arg)
fflush
- hexdump(name, pkt, pkt_len)
-
inet_pton(address, addr)
inet_pton with buf
-
inet_pton(address)
inet_pton equivalent
- ipv4(a, b, c, d)
- ipv4x(a, b, c, d)
-
ipv6(address)
inet_pton for IPv6
-
log_dp(l, t, *args)
rte_log with log level condition.
-
panic(*args)
rte_panic equivalent without function name NOTE: lots of assembly
-
pool_create(name, n, cache_size)
pool creation shortcut with only name, numbers of pool, and cache_size
-
pool_create(n, cache_size)
pool creation shortcut with only numbers of pool, and cache_size
-
printf(*args)
printf from LibC
-
puts(args)
puts from LibC
-
rte_eal_init(*args)
rte_eal_init with error handling
-
rte_eal_mp_remote_launch(call)
similar to rte_eal_mp_remote_launch without writing proc directly
-
rte_eal_remote_launch(call, *args)
rte_eal_remote_launch with automatic proc creation
-
rte_eth_dev_adjust_nb_rx_tx_desc(*args)
rte_eth_dev_adjust_nb_rx_tx_desc with error handling
-
rte_eth_dev_configure(*args)
rte_eth_dev_configure with error handling
-
rte_eth_dev_start(portid)
rte_eth_dev_start with error handling
-
rte_eth_rx_queue_setup(*args)
rte_eth_rx_queue_setup with error handling
-
rte_eth_tx_buffer_size(sz)
RTE_ETH_TX_BUFFER_SIZE
-
rte_eth_tx_queue_setup(*args)
rte_eth_tx_queue_setup with error handling
-
rte_get_timer_hz
Get the number of cycles in one second for the default timer.
-
rte_log(l, t, *args)
rte_log equivalent
-
rte_lpm_create(*args)
rte_lpm_create with error handling
-
rte_max(a, b)
RTE_MAX
-
rte_min(a, b)
RTE_MIN
-
rte_pause
rte_pause implementation
-
rte_pktmbuf_adj(mbuf, len)
rte_pktmbuf_adj with error handling
-
rte_pktmbuf_alloc(arg)
rte_pktmbuf_alloc with error handling
-
rte_pktmbuf_clone(arg)
rte_pktmbuf_clone with error handling
-
rte_pktmbuf_copy(mbuf_old, pool)
rte_pktmbuf_alloc + memcpy packet data
-
rte_pktmbuf_free(pkts, nb)
batch rte_pktmbuf_free
-
rte_pktmbuf_mtod(m)
similar to rte_pktmbuf_mtod, but without type parameters, use .as(...) after this
-
rte_pktmbuf_mtod_offset(m, o)
similar to rte_pktmbuf_mtod_offset, but without type parameters, use .as(...) after this
-
rte_pktmbuf_pool_create(*args)
rte_pktmbuf_pool_create with error handling
-
rte_pktmbuf_prepend(mbuf, len)
rte_pktmbuf_prepend with error handling
-
rte_rdtsc
rte_rdtsc
-
rte_ring_create(*args)
rte_ring_create with error handling
-
rte_ring_dequeue_burst(r, obj_table, n, available)
rte_ring_dequeue_burst with casting to Void**
-
rte_ring_enqueue_burst(r, obj_table, n, free_space)
rte_ring_enqueue_burst with casting to Void**
- rte_ring_free_count(r)
-
rte_ring_lookup(name)
wait rte_ring_lookup, until success
-
rte_ring_sc_dequeue_burst(ring, obj_table, nb)
rte_ring_sc_dequeue_burst with block
-
rte_zmalloc_socket(type, size, align, socket)
rte_zmalloc_socket with error handling
-
signal(signum, call)
LibC.signal shortcut with automatic proc creation
-
snprintf(*args)
snprintf from LibC
-
to_si_measure(n)
number to SI Measure Units (T, G, M, k) string converter
-
to_si_time(n)
number to SI Time Units (s, ms, us) string converter
Instance Method Detail
Buffer a single packet for future transmission on a port and queue
TODO measure performance vs C
Send any packets queued up for transmission on a port and HW queue
TODO measure performance vs C
return next available lcore
Macro Detail
rte_log with log level condition.
TODO fix log level check at compile time
pool creation shortcut with only name, numbers of pool, and cache_size
similar to rte_eal_mp_remote_launch without writing proc directly
rte_eth_dev_adjust_nb_rx_tx_desc with error handling
Get the number of cycles in one second for the default timer. using rte_get_tsc_hz, not rte_get_hpet_hz
similar to rte_pktmbuf_mtod, but without type parameters, use .as(...) after this
similar to rte_pktmbuf_mtod_offset, but without type parameters, use .as(...) after this
rte_ring_dequeue_burst with casting to Void**
rte_ring_enqueue_burst with casting to Void**