1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016 Cavium, Inc
9 #include "nicvf_bsvf.h"
10 #include "nicvf_plat.h"
12 static STAILQ_HEAD(, svf_entry) head = STAILQ_HEAD_INITIALIZER(head);
15 nicvf_bsvf_push(struct svf_entry *entry)
17 assert(entry != NULL);
18 assert(entry->vf != NULL);
20 STAILQ_INSERT_TAIL(&head, entry, next);
26 struct svf_entry *entry;
28 assert(!STAILQ_EMPTY(&head));
30 entry = STAILQ_FIRST(&head);
32 assert(entry != NULL);
33 assert(entry->vf != NULL);
35 STAILQ_REMOVE_HEAD(&head, next);
41 nicvf_bsvf_empty(void)
43 return STAILQ_EMPTY(&head);