-/*-
+/*
* BSD LICENSE
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- * All rights reserved.
+ * Copyright (C) Cavium networks Ltd. 2016.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 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
+ * * Neither the name of Cavium networks nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _VIRTIO_NET_CDEV_H
-#define _VIRTIO_NET_CDEV_H
-#include <stdint.h>
-#include <linux/vhost.h>
+#ifndef __THUNDERX_NICVF_SVF_H__
+#define __THUNDERX_NICVF_SVF_H__
-#include "vhost-net.h"
+struct nicvf;
-/*
- * Structure used to identify device context.
+/**
+ * Enqueue new VF to secondary qsets.
+ *
+ * @param entry
+ * Entry to be enqueued.
*/
-struct vhost_cuse_device_ctx {
- pid_t pid; /* PID of process calling the IOCTL. */
- int vid; /* Virtio-net device ID */
-};
+void
+nicvf_svf_push(struct nicvf *vf);
-int
-cuse_set_mem_table(struct vhost_cuse_device_ctx ctx,
- const struct vhost_memory *mem_regions_addr, uint32_t nregions);
+/**
+ * Dequeue a VF from secondary qsets.
+ *
+ * @return
+ * Dequeued entry.
+ */
+struct nicvf *
+nicvf_svf_pop(void);
+/**
+ * Check if the queue of secondary qsets is empty.
+ *
+ * @return
+ * 0 on non-empty
+ * otherwise empty
+ */
int
-cuse_set_backend(struct vhost_cuse_device_ctx ctx, struct vhost_vring_file *);
+nicvf_svf_empty(void);
-#endif
+#endif /* __THUNDERX_NICVF_SVF_H__ */