2016-08-10 17:37:12 +00:00
|
|
|
/*-
|
|
|
|
* BSD LICENSE
|
|
|
|
*
|
|
|
|
* Copyright (c) Intel Corporation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* * Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* * Neither the name of Intel Corporation nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2017-05-02 18:18:25 +00:00
|
|
|
#include "spdk/stdinc.h"
|
2016-08-10 17:37:12 +00:00
|
|
|
|
2018-11-18 00:05:41 +00:00
|
|
|
#include "env_internal.h"
|
2016-08-10 17:37:12 +00:00
|
|
|
|
|
|
|
#include <rte_config.h>
|
2016-08-10 20:12:33 +00:00
|
|
|
#include <rte_cycles.h>
|
2016-08-10 17:37:12 +00:00
|
|
|
#include <rte_malloc.h>
|
2016-09-08 21:30:58 +00:00
|
|
|
#include <rte_mempool.h>
|
|
|
|
#include <rte_memzone.h>
|
2016-09-28 14:58:51 +00:00
|
|
|
#include <rte_version.h>
|
2016-08-10 17:37:12 +00:00
|
|
|
|
2017-11-15 13:59:50 +00:00
|
|
|
static uint64_t
|
|
|
|
virt_to_phys(void *vaddr)
|
|
|
|
{
|
2018-03-16 16:40:49 +00:00
|
|
|
uint64_t ret;
|
|
|
|
|
2017-11-15 13:59:50 +00:00
|
|
|
#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 3)
|
2018-03-16 16:40:49 +00:00
|
|
|
ret = rte_malloc_virt2iova(vaddr);
|
|
|
|
if (ret != RTE_BAD_IOVA) {
|
|
|
|
return ret;
|
|
|
|
}
|
2017-11-15 13:59:50 +00:00
|
|
|
#else
|
2018-03-16 16:40:49 +00:00
|
|
|
ret = rte_malloc_virt2phy(vaddr);
|
|
|
|
if (ret != RTE_BAD_PHYS_ADDR) {
|
|
|
|
return ret;
|
|
|
|
}
|
2017-11-15 13:59:50 +00:00
|
|
|
#endif
|
2018-03-16 16:40:49 +00:00
|
|
|
|
|
|
|
return spdk_vtophys(vaddr);
|
2017-11-15 13:59:50 +00:00
|
|
|
}
|
|
|
|
|
2016-08-10 17:37:12 +00:00
|
|
|
void *
|
2018-02-23 06:43:28 +00:00
|
|
|
spdk_malloc(size_t size, size_t align, uint64_t *phys_addr, int socket_id, uint32_t flags)
|
2016-08-10 17:37:12 +00:00
|
|
|
{
|
2018-05-08 18:06:01 +00:00
|
|
|
if (flags == 0) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2017-05-04 17:31:53 +00:00
|
|
|
void *buf = rte_malloc_socket(NULL, size, align, socket_id);
|
2016-10-21 22:31:31 +00:00
|
|
|
if (buf && phys_addr) {
|
2017-11-15 13:59:50 +00:00
|
|
|
*phys_addr = virt_to_phys(buf);
|
2016-10-21 22:31:31 +00:00
|
|
|
}
|
|
|
|
return buf;
|
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
2018-02-23 06:43:28 +00:00
|
|
|
spdk_zmalloc(size_t size, size_t align, uint64_t *phys_addr, int socket_id, uint32_t flags)
|
2016-10-21 22:31:31 +00:00
|
|
|
{
|
2018-02-23 06:43:28 +00:00
|
|
|
void *buf = spdk_malloc(size, align, phys_addr, socket_id, flags);
|
2016-08-10 17:37:12 +00:00
|
|
|
if (buf) {
|
|
|
|
memset(buf, 0, size);
|
|
|
|
}
|
|
|
|
return buf;
|
|
|
|
}
|
|
|
|
|
2018-02-23 06:43:28 +00:00
|
|
|
void
|
|
|
|
spdk_free(void *buf)
|
|
|
|
{
|
|
|
|
rte_free(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
|
|
|
spdk_dma_malloc_socket(size_t size, size_t align, uint64_t *phys_addr, int socket_id)
|
|
|
|
{
|
|
|
|
return spdk_malloc(size, align, phys_addr, socket_id, (SPDK_MALLOC_DMA | SPDK_MALLOC_SHARE));
|
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
|
|
|
spdk_dma_zmalloc_socket(size_t size, size_t align, uint64_t *phys_addr, int socket_id)
|
|
|
|
{
|
|
|
|
return spdk_zmalloc(size, align, phys_addr, socket_id, (SPDK_MALLOC_DMA | SPDK_MALLOC_SHARE));
|
|
|
|
}
|
|
|
|
|
2017-05-04 17:31:53 +00:00
|
|
|
void *
|
2017-05-25 18:21:30 +00:00
|
|
|
spdk_dma_malloc(size_t size, size_t align, uint64_t *phys_addr)
|
2017-05-04 17:31:53 +00:00
|
|
|
{
|
2017-05-25 18:21:30 +00:00
|
|
|
return spdk_dma_malloc_socket(size, align, phys_addr, SPDK_ENV_SOCKET_ID_ANY);
|
2017-05-04 17:31:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
2017-05-25 18:21:30 +00:00
|
|
|
spdk_dma_zmalloc(size_t size, size_t align, uint64_t *phys_addr)
|
2017-05-04 17:31:53 +00:00
|
|
|
{
|
2017-05-25 18:21:30 +00:00
|
|
|
return spdk_dma_zmalloc_socket(size, align, phys_addr, SPDK_ENV_SOCKET_ID_ANY);
|
2017-05-04 17:31:53 +00:00
|
|
|
}
|
|
|
|
|
2016-11-07 08:19:31 +00:00
|
|
|
void *
|
2017-05-25 18:21:30 +00:00
|
|
|
spdk_dma_realloc(void *buf, size_t size, size_t align, uint64_t *phys_addr)
|
2016-11-07 08:19:31 +00:00
|
|
|
{
|
|
|
|
void *new_buf = rte_realloc(buf, size, align);
|
|
|
|
if (new_buf && phys_addr) {
|
2017-11-15 13:59:50 +00:00
|
|
|
*phys_addr = virt_to_phys(new_buf);
|
2016-11-07 08:19:31 +00:00
|
|
|
}
|
|
|
|
return new_buf;
|
|
|
|
}
|
|
|
|
|
2016-08-10 17:37:12 +00:00
|
|
|
void
|
2017-05-25 18:21:30 +00:00
|
|
|
spdk_dma_free(void *buf)
|
2016-08-10 17:37:12 +00:00
|
|
|
{
|
2018-02-23 06:43:28 +00:00
|
|
|
spdk_free(buf);
|
2016-08-10 17:37:12 +00:00
|
|
|
}
|
2016-08-10 20:12:33 +00:00
|
|
|
|
2016-09-08 21:30:58 +00:00
|
|
|
void *
|
2018-06-27 09:25:36 +00:00
|
|
|
spdk_memzone_reserve_aligned(const char *name, size_t len, int socket_id,
|
|
|
|
unsigned flags, unsigned align)
|
2016-09-08 21:30:58 +00:00
|
|
|
{
|
2017-01-27 17:04:08 +00:00
|
|
|
const struct rte_memzone *mz;
|
2018-06-27 10:53:02 +00:00
|
|
|
unsigned dpdk_flags = 0;
|
2017-01-27 17:04:08 +00:00
|
|
|
|
2018-06-27 08:29:22 +00:00
|
|
|
#if RTE_VERSION >= RTE_VERSION_NUM(18, 05, 0, 0)
|
|
|
|
/* Older DPDKs do not offer such flag since their
|
|
|
|
* memzones are iova-contiguous by default.
|
|
|
|
*/
|
|
|
|
if ((flags & SPDK_MEMZONE_NO_IOVA_CONTIG) == 0) {
|
|
|
|
dpdk_flags |= RTE_MEMZONE_IOVA_CONTIG;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-01-27 17:04:08 +00:00
|
|
|
if (socket_id == SPDK_ENV_SOCKET_ID_ANY) {
|
|
|
|
socket_id = SOCKET_ID_ANY;
|
|
|
|
}
|
|
|
|
|
2018-06-27 09:25:36 +00:00
|
|
|
mz = rte_memzone_reserve_aligned(name, len, socket_id, dpdk_flags, align);
|
2016-09-08 21:30:58 +00:00
|
|
|
|
|
|
|
if (mz != NULL) {
|
2016-11-16 04:03:18 +00:00
|
|
|
memset(mz->addr, 0, len);
|
2016-09-08 21:30:58 +00:00
|
|
|
return mz->addr;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-27 09:25:36 +00:00
|
|
|
void *
|
|
|
|
spdk_memzone_reserve(const char *name, size_t len, int socket_id, unsigned flags)
|
|
|
|
{
|
|
|
|
return spdk_memzone_reserve_aligned(name, len, socket_id, flags,
|
|
|
|
RTE_CACHE_LINE_SIZE);
|
|
|
|
}
|
|
|
|
|
2016-09-08 21:30:58 +00:00
|
|
|
void *
|
|
|
|
spdk_memzone_lookup(const char *name)
|
|
|
|
{
|
|
|
|
const struct rte_memzone *mz = rte_memzone_lookup(name);
|
|
|
|
|
|
|
|
if (mz != NULL) {
|
|
|
|
return mz->addr;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
spdk_memzone_free(const char *name)
|
|
|
|
{
|
|
|
|
const struct rte_memzone *mz = rte_memzone_lookup(name);
|
|
|
|
|
|
|
|
if (mz != NULL) {
|
|
|
|
return rte_memzone_free(mz);
|
|
|
|
}
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2016-10-03 21:26:07 +00:00
|
|
|
void
|
|
|
|
spdk_memzone_dump(FILE *f)
|
|
|
|
{
|
|
|
|
rte_memzone_dump(f);
|
|
|
|
}
|
|
|
|
|
2016-09-28 14:58:51 +00:00
|
|
|
struct spdk_mempool *
|
2017-12-11 04:37:27 +00:00
|
|
|
spdk_mempool_create_ctor(const char *name, size_t count,
|
|
|
|
size_t ele_size, size_t cache_size, int socket_id,
|
|
|
|
spdk_mempool_obj_cb_t *obj_init, void *obj_init_arg)
|
2016-09-28 14:58:51 +00:00
|
|
|
{
|
|
|
|
struct rte_mempool *mp;
|
|
|
|
size_t tmp;
|
|
|
|
|
2017-01-25 20:35:40 +00:00
|
|
|
if (socket_id == SPDK_ENV_SOCKET_ID_ANY) {
|
|
|
|
socket_id = SOCKET_ID_ANY;
|
|
|
|
}
|
|
|
|
|
2016-09-28 14:58:51 +00:00
|
|
|
/* No more than half of all elements can be in cache */
|
|
|
|
tmp = (count / 2) / rte_lcore_count();
|
|
|
|
if (cache_size > tmp) {
|
|
|
|
cache_size = tmp;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (cache_size > RTE_MEMPOOL_CACHE_MAX_SIZE) {
|
|
|
|
cache_size = RTE_MEMPOOL_CACHE_MAX_SIZE;
|
|
|
|
}
|
|
|
|
|
|
|
|
mp = rte_mempool_create(name, count, ele_size, cache_size,
|
2017-12-11 04:37:27 +00:00
|
|
|
0, NULL, NULL, (rte_mempool_obj_cb_t *)obj_init, obj_init_arg,
|
2018-03-12 23:05:02 +00:00
|
|
|
socket_id, MEMPOOL_F_NO_PHYS_CONTIG);
|
2016-09-28 14:58:51 +00:00
|
|
|
|
|
|
|
return (struct spdk_mempool *)mp;
|
|
|
|
}
|
|
|
|
|
2017-12-11 04:37:27 +00:00
|
|
|
|
|
|
|
struct spdk_mempool *
|
|
|
|
spdk_mempool_create(const char *name, size_t count,
|
|
|
|
size_t ele_size, size_t cache_size, int socket_id)
|
|
|
|
{
|
|
|
|
return spdk_mempool_create_ctor(name, count, ele_size, cache_size, socket_id,
|
|
|
|
NULL, NULL);
|
|
|
|
}
|
|
|
|
|
2017-12-08 09:01:12 +00:00
|
|
|
char *
|
|
|
|
spdk_mempool_get_name(struct spdk_mempool *mp)
|
|
|
|
{
|
|
|
|
return ((struct rte_mempool *)mp)->name;
|
|
|
|
}
|
|
|
|
|
2016-09-28 14:58:51 +00:00
|
|
|
void
|
|
|
|
spdk_mempool_free(struct spdk_mempool *mp)
|
|
|
|
{
|
|
|
|
rte_mempool_free((struct rte_mempool *)mp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
|
|
|
spdk_mempool_get(struct spdk_mempool *mp)
|
|
|
|
{
|
|
|
|
void *ele = NULL;
|
2017-12-11 08:07:14 +00:00
|
|
|
int rc;
|
2016-09-28 14:58:51 +00:00
|
|
|
|
2017-12-11 08:07:14 +00:00
|
|
|
rc = rte_mempool_get((struct rte_mempool *)mp, &ele);
|
|
|
|
if (rc != 0) {
|
|
|
|
return NULL;
|
|
|
|
}
|
2016-09-28 14:58:51 +00:00
|
|
|
return ele;
|
|
|
|
}
|
|
|
|
|
2018-04-18 23:25:05 +00:00
|
|
|
int
|
|
|
|
spdk_mempool_get_bulk(struct spdk_mempool *mp, void **ele_arr, size_t count)
|
|
|
|
{
|
|
|
|
return rte_mempool_get_bulk((struct rte_mempool *)mp, ele_arr, count);
|
|
|
|
}
|
|
|
|
|
2016-09-28 14:58:51 +00:00
|
|
|
void
|
|
|
|
spdk_mempool_put(struct spdk_mempool *mp, void *ele)
|
|
|
|
{
|
|
|
|
rte_mempool_put((struct rte_mempool *)mp, ele);
|
|
|
|
}
|
|
|
|
|
2016-11-02 20:31:33 +00:00
|
|
|
void
|
2018-06-28 21:03:43 +00:00
|
|
|
spdk_mempool_put_bulk(struct spdk_mempool *mp, void **ele_arr, size_t count)
|
2016-11-02 20:31:33 +00:00
|
|
|
{
|
|
|
|
rte_mempool_put_bulk((struct rte_mempool *)mp, ele_arr, count);
|
|
|
|
}
|
|
|
|
|
2017-04-11 04:36:05 +00:00
|
|
|
size_t
|
|
|
|
spdk_mempool_count(const struct spdk_mempool *pool)
|
|
|
|
{
|
|
|
|
return rte_mempool_avail_count((struct rte_mempool *)pool);
|
|
|
|
}
|
|
|
|
|
2016-09-08 21:30:58 +00:00
|
|
|
bool
|
|
|
|
spdk_process_is_primary(void)
|
|
|
|
{
|
|
|
|
return (rte_eal_process_type() == RTE_PROC_PRIMARY);
|
|
|
|
}
|
|
|
|
|
2016-08-10 20:12:33 +00:00
|
|
|
uint64_t spdk_get_ticks(void)
|
|
|
|
{
|
|
|
|
return rte_get_timer_cycles();
|
|
|
|
}
|
|
|
|
|
|
|
|
uint64_t spdk_get_ticks_hz(void)
|
|
|
|
{
|
|
|
|
return rte_get_timer_hz();
|
|
|
|
}
|
|
|
|
|
|
|
|
void spdk_delay_us(unsigned int us)
|
|
|
|
{
|
2016-11-23 20:21:09 +00:00
|
|
|
rte_delay_us(us);
|
2016-08-10 20:12:33 +00:00
|
|
|
}
|
2016-11-07 17:08:11 +00:00
|
|
|
|
2017-06-22 19:48:33 +00:00
|
|
|
void
|
|
|
|
spdk_unaffinitize_thread(void)
|
2016-11-07 17:08:11 +00:00
|
|
|
{
|
2017-06-22 19:48:33 +00:00
|
|
|
rte_cpuset_t new_cpuset;
|
2016-11-07 17:08:11 +00:00
|
|
|
long num_cores, i;
|
|
|
|
|
|
|
|
CPU_ZERO(&new_cpuset);
|
|
|
|
|
|
|
|
num_cores = sysconf(_SC_NPROCESSORS_CONF);
|
|
|
|
|
|
|
|
/* Create a mask containing all CPUs */
|
|
|
|
for (i = 0; i < num_cores; i++) {
|
|
|
|
CPU_SET(i, &new_cpuset);
|
|
|
|
}
|
|
|
|
|
|
|
|
rte_thread_set_affinity(&new_cpuset);
|
2017-06-22 19:48:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
|
|
|
spdk_call_unaffinitized(void *cb(void *arg), void *arg)
|
|
|
|
{
|
|
|
|
rte_cpuset_t orig_cpuset;
|
|
|
|
void *ret;
|
|
|
|
|
|
|
|
if (cb == NULL) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
rte_thread_get_affinity(&orig_cpuset);
|
|
|
|
|
|
|
|
spdk_unaffinitize_thread();
|
2016-11-07 17:08:11 +00:00
|
|
|
|
|
|
|
ret = cb(arg);
|
|
|
|
|
|
|
|
rte_thread_set_affinity(&orig_cpuset);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2017-05-09 17:48:16 +00:00
|
|
|
|
|
|
|
struct spdk_ring *
|
2017-05-24 12:46:55 +00:00
|
|
|
spdk_ring_create(enum spdk_ring_type type, size_t count, int socket_id)
|
2017-05-09 17:48:16 +00:00
|
|
|
{
|
|
|
|
char ring_name[64];
|
|
|
|
static uint32_t ring_num = 0;
|
2017-05-24 12:34:12 +00:00
|
|
|
unsigned flags = 0;
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case SPDK_RING_TYPE_SP_SC:
|
|
|
|
flags = RING_F_SP_ENQ | RING_F_SC_DEQ;
|
|
|
|
break;
|
|
|
|
case SPDK_RING_TYPE_MP_SC:
|
|
|
|
flags = RING_F_SC_DEQ;
|
|
|
|
break;
|
2018-09-19 23:15:24 +00:00
|
|
|
case SPDK_RING_TYPE_MP_MC:
|
|
|
|
flags = 0;
|
|
|
|
break;
|
2017-05-24 12:34:12 +00:00
|
|
|
default:
|
2017-05-09 17:48:16 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2017-06-22 14:57:54 +00:00
|
|
|
snprintf(ring_name, sizeof(ring_name), "ring_%u_%d",
|
|
|
|
__sync_fetch_and_add(&ring_num, 1), getpid());
|
2017-05-09 17:48:16 +00:00
|
|
|
|
2017-05-24 12:34:12 +00:00
|
|
|
return (struct spdk_ring *)rte_ring_create(ring_name, count, socket_id, flags);
|
2017-05-09 17:48:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
spdk_ring_free(struct spdk_ring *ring)
|
|
|
|
{
|
|
|
|
rte_ring_free((struct rte_ring *)ring);
|
|
|
|
}
|
|
|
|
|
2017-10-18 06:07:26 +00:00
|
|
|
size_t
|
|
|
|
spdk_ring_count(struct spdk_ring *ring)
|
|
|
|
{
|
|
|
|
return rte_ring_count((struct rte_ring *)ring);
|
|
|
|
}
|
|
|
|
|
2017-05-09 17:48:16 +00:00
|
|
|
size_t
|
|
|
|
spdk_ring_enqueue(struct spdk_ring *ring, void **objs, size_t count)
|
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
#if RTE_VERSION < RTE_VERSION_NUM(17, 5, 0, 0)
|
2018-09-19 23:15:24 +00:00
|
|
|
rc = rte_ring_enqueue_bulk((struct rte_ring *)ring, objs, count);
|
2017-05-09 17:48:16 +00:00
|
|
|
if (rc == 0) {
|
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
2017-05-12 02:37:28 +00:00
|
|
|
#else
|
2018-09-19 23:15:24 +00:00
|
|
|
rc = rte_ring_enqueue_bulk((struct rte_ring *)ring, objs, count, NULL);
|
2017-05-12 02:37:28 +00:00
|
|
|
return rc;
|
|
|
|
#endif
|
2017-05-09 17:48:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
size_t
|
|
|
|
spdk_ring_dequeue(struct spdk_ring *ring, void **objs, size_t count)
|
|
|
|
{
|
|
|
|
#if RTE_VERSION < RTE_VERSION_NUM(17, 5, 0, 0)
|
2018-09-19 23:15:24 +00:00
|
|
|
return rte_ring_dequeue_burst((struct rte_ring *)ring, objs, count);
|
2017-05-09 17:48:16 +00:00
|
|
|
#else
|
2018-09-19 23:15:24 +00:00
|
|
|
return rte_ring_dequeue_burst((struct rte_ring *)ring, objs, count, NULL);
|
2017-05-09 17:48:16 +00:00
|
|
|
#endif
|
|
|
|
}
|