TAPI for RTE ring API remote calls
Overview
// global functions rpc_rte_ring_p rpc_rte_ring_create(rcf_rpc_server* rpcs, const char* name, unsigned count, int socket_id, unsigned flags); void rpc_rte_ring_free(rcf_rpc_server* rpcs, rpc_rte_ring_p ring); int rte_ring_enqueue_mbuf(rcf_rpc_server* rpcs, rpc_rte_ring_p ring, rpc_rte_mbuf_p m); rpc_rte_mbuf_p rte_ring_dequeue_mbuf(rcf_rpc_server* rpcs, rpc_rte_ring_p ring);
Detailed Documentation
Global Functions
rpc_rte_ring_p rpc_rte_ring_create(rcf_rpc_server* rpcs, const char* name, unsigned count, int socket_id, unsigned flags)
rte_ring_create() RPC
Parameters:
name |
The name of the ring |
count |
The size of the ring (must be a power of 2) |
socket_id |
The socket identifier where the memory should be allocated |
flags |
An OR of the following: (1U << TARPC_RTE_RING_F_SP_ENQ), (1U << TARPC_RTE_RING_F_SC_DEQ) |
Returns:
RTE ring pointer on success; jumps out when pointer is NULL
void rpc_rte_ring_free(rcf_rpc_server* rpcs, rpc_rte_ring_p ring)
rte_ring_free() RPC
Parameters:
ring |
RTE ring pointer |
int rte_ring_enqueue_mbuf(rcf_rpc_server* rpcs, rpc_rte_ring_p ring, rpc_rte_mbuf_p m)
Enqueue an mbuf to RTE ring
Parameters:
ring |
RTE ring pointer |
m |
RTE mbuf pointer |
Returns:
0
on success; jumps out in case of failure
rpc_rte_mbuf_p rte_ring_dequeue_mbuf(rcf_rpc_server* rpcs, rpc_rte_ring_p ring)
Dequeue an mbuf from RTE ring
Parameters:
ring |
RTE ring pointer |
Returns:
RTE mbuf pointer; doesn’t jump out when pointer is NULL