#include <linux/errno.h>
#include <linux/pci.h>
#include "usnic_ib.h"
#include "vnic_resource.h"
#include "usnic_log.h"
#include "usnic_vnic.h"
struct usnic_vnic { … };
static enum vnic_res_type _to_vnic_res_type(enum usnic_vnic_res_type res_type)
{ … }
const char *usnic_vnic_res_type_to_str(enum usnic_vnic_res_type res_type)
{ … }
const char *usnic_vnic_pci_name(struct usnic_vnic *vnic)
{ … }
int usnic_vnic_dump(struct usnic_vnic *vnic, char *buf,
int buf_sz,
void *hdr_obj,
int (*printtitle)(void *, char*, int),
int (*printcols)(char *, int),
int (*printrow)(void *, char *, int))
{ … }
void usnic_vnic_res_spec_update(struct usnic_vnic_res_spec *spec,
enum usnic_vnic_res_type trgt_type,
u16 cnt)
{ … }
int usnic_vnic_res_spec_satisfied(const struct usnic_vnic_res_spec *min_spec,
struct usnic_vnic_res_spec *res_spec)
{ … }
int usnic_vnic_spec_dump(char *buf, int buf_sz,
struct usnic_vnic_res_spec *res_spec)
{ … }
int usnic_vnic_check_room(struct usnic_vnic *vnic,
struct usnic_vnic_res_spec *res_spec)
{ … }
int usnic_vnic_res_cnt(struct usnic_vnic *vnic,
enum usnic_vnic_res_type type)
{ … }
int usnic_vnic_res_free_cnt(struct usnic_vnic *vnic,
enum usnic_vnic_res_type type)
{ … }
struct usnic_vnic_res_chunk *
usnic_vnic_get_resources(struct usnic_vnic *vnic, enum usnic_vnic_res_type type,
int cnt, void *owner)
{ … }
void usnic_vnic_put_resources(struct usnic_vnic_res_chunk *chunk)
{ … }
u16 usnic_vnic_get_index(struct usnic_vnic *vnic)
{ … }
static int usnic_vnic_alloc_res_chunk(struct usnic_vnic *vnic,
enum usnic_vnic_res_type type,
struct usnic_vnic_res_chunk *chunk)
{ … }
static void usnic_vnic_free_res_chunk(struct usnic_vnic_res_chunk *chunk)
{ … }
static int usnic_vnic_discover_resources(struct pci_dev *pdev,
struct usnic_vnic *vnic)
{ … }
struct pci_dev *usnic_vnic_get_pdev(struct usnic_vnic *vnic)
{ … }
struct vnic_dev_bar *usnic_vnic_get_bar(struct usnic_vnic *vnic,
int bar_num)
{ … }
static void usnic_vnic_release_resources(struct usnic_vnic *vnic)
{ … }
struct usnic_vnic *usnic_vnic_alloc(struct pci_dev *pdev)
{ … }
void usnic_vnic_free(struct usnic_vnic *vnic)
{ … }