1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2018 Intel Corporation
8 #include <rte_string_fns.h>
12 static struct swq_list swq_list;
17 TAILQ_INIT(&swq_list);
23 swq_find(const char *name)
30 TAILQ_FOREACH(swq, &swq_list, node)
31 if (strcmp(swq->name, name) == 0)
38 swq_create(const char *name, struct swq_params *params)
42 unsigned int flags = RING_F_SP_ENQ | RING_F_SC_DEQ;
44 /* Check input params */
62 swq = calloc(1, sizeof(struct swq));
69 strlcpy(swq->name, name, sizeof(swq->name));
72 /* Node add to list */
73 TAILQ_INSERT_TAIL(&swq_list, swq, node);