linux/drivers/net/ethernet/cisco/enic/vnic_rq.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
 */

#ifndef _VNIC_RQ_H_
#define _VNIC_RQ_H_

#include <linux/pci.h>
#include <linux/netdevice.h>

#include "vnic_dev.h"
#include "vnic_cq.h"

/* Receive queue control */
struct vnic_rq_ctrl {};

/* Break the vnic_rq_buf allocations into blocks of 32/64 entries */
#define VNIC_RQ_BUF_MIN_BLK_ENTRIES
#define VNIC_RQ_BUF_DFLT_BLK_ENTRIES
#define VNIC_RQ_BUF_BLK_ENTRIES(entries)
#define VNIC_RQ_BUF_BLK_SZ(entries)
#define VNIC_RQ_BUF_BLKS_NEEDED(entries)
#define VNIC_RQ_BUF_BLKS_MAX

struct vnic_rq_buf {};

enum enic_poll_state {};

struct vnic_rq {};

static inline unsigned int vnic_rq_desc_avail(struct vnic_rq *rq)
{}

static inline unsigned int vnic_rq_desc_used(struct vnic_rq *rq)
{}

static inline void *vnic_rq_next_desc(struct vnic_rq *rq)
{}

static inline unsigned int vnic_rq_next_index(struct vnic_rq *rq)
{}

static inline void vnic_rq_post(struct vnic_rq *rq,
	void *os_buf, unsigned int os_buf_index,
	dma_addr_t dma_addr, unsigned int len,
	uint64_t wrid)
{}

static inline void vnic_rq_return_descs(struct vnic_rq *rq, unsigned int count)
{}

enum desc_return_options {};

static inline void vnic_rq_service(struct vnic_rq *rq,
	struct cq_desc *cq_desc, u16 completed_index,
	int desc_return, void (*buf_service)(struct vnic_rq *rq,
	struct cq_desc *cq_desc, struct vnic_rq_buf *buf,
	int skipped, void *opaque), void *opaque)
{}

static inline int vnic_rq_fill(struct vnic_rq *rq,
	int (*buf_fill)(struct vnic_rq *rq))
{}

void vnic_rq_free(struct vnic_rq *rq);
int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
	unsigned int desc_count, unsigned int desc_size);
void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
	unsigned int error_interrupt_enable,
	unsigned int error_interrupt_offset);
unsigned int vnic_rq_error_status(struct vnic_rq *rq);
void vnic_rq_enable(struct vnic_rq *rq);
int vnic_rq_disable(struct vnic_rq *rq);
void vnic_rq_clean(struct vnic_rq *rq,
	void (*buf_clean)(struct vnic_rq *rq, struct vnic_rq_buf *buf));

#endif /* _VNIC_RQ_H_ */