linux/drivers/vdpa/ifcvf/ifcvf_main.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Intel IFC VF NIC driver for virtio dataplane offloading
 *
 * Copyright (C) 2020 Intel Corporation.
 *
 * Author: Zhu Lingshan <[email protected]>
 *
 */

#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/sysfs.h>
#include "ifcvf_base.h"

#define DRIVER_AUTHOR
#define IFCVF_DRIVER_NAME

static irqreturn_t ifcvf_config_changed(int irq, void *arg)
{}

static irqreturn_t ifcvf_vq_intr_handler(int irq, void *arg)
{}

static irqreturn_t ifcvf_vqs_reused_intr_handler(int irq, void *arg)
{}

static irqreturn_t ifcvf_dev_intr_handler(int irq, void *arg)
{}

static void ifcvf_free_irq_vectors(void *data)
{}

static void ifcvf_free_per_vq_irq(struct ifcvf_hw *vf)
{}

static void ifcvf_free_vqs_reused_irq(struct ifcvf_hw *vf)
{}

static void ifcvf_free_vq_irq(struct ifcvf_hw *vf)
{}

static void ifcvf_free_config_irq(struct ifcvf_hw *vf)
{}

static void ifcvf_free_irq(struct ifcvf_hw *vf)
{}

/* ifcvf MSIX vectors allocator, this helper tries to allocate
 * vectors for all virtqueues and the config interrupt.
 * It returns the number of allocated vectors, negative
 * return value when fails.
 */
static int ifcvf_alloc_vectors(struct ifcvf_hw *vf)
{}

static int ifcvf_request_per_vq_irq(struct ifcvf_hw *vf)
{}

static int ifcvf_request_vqs_reused_irq(struct ifcvf_hw *vf)
{}

static int ifcvf_request_dev_irq(struct ifcvf_hw *vf)
{}

static int ifcvf_request_vq_irq(struct ifcvf_hw *vf)
{}

static int ifcvf_request_config_irq(struct ifcvf_hw *vf)
{}

static int ifcvf_request_irq(struct ifcvf_hw *vf)
{}

static struct ifcvf_adapter *vdpa_to_adapter(struct vdpa_device *vdpa_dev)
{}

static struct ifcvf_hw *vdpa_to_vf(struct vdpa_device *vdpa_dev)
{}

static u64 ifcvf_vdpa_get_device_features(struct vdpa_device *vdpa_dev)
{}

static int ifcvf_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 features)
{}

static u64 ifcvf_vdpa_get_driver_features(struct vdpa_device *vdpa_dev)
{}

static u8 ifcvf_vdpa_get_status(struct vdpa_device *vdpa_dev)
{}

static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status)
{}

static int ifcvf_vdpa_reset(struct vdpa_device *vdpa_dev)
{}

static u16 ifcvf_vdpa_get_vq_num_max(struct vdpa_device *vdpa_dev)
{}

static u16 ifcvf_vdpa_get_vq_num_min(struct vdpa_device *vdpa_dev)
{}

static int ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
				   struct vdpa_vq_state *state)
{}

static int ifcvf_vdpa_set_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
				   const struct vdpa_vq_state *state)
{}

static void ifcvf_vdpa_set_vq_cb(struct vdpa_device *vdpa_dev, u16 qid,
				 struct vdpa_callback *cb)
{}

static void ifcvf_vdpa_set_vq_ready(struct vdpa_device *vdpa_dev,
				    u16 qid, bool ready)
{}

static bool ifcvf_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid)
{}

static void ifcvf_vdpa_set_vq_num(struct vdpa_device *vdpa_dev, u16 qid,
				  u32 num)
{}

static int ifcvf_vdpa_set_vq_address(struct vdpa_device *vdpa_dev, u16 qid,
				     u64 desc_area, u64 driver_area,
				     u64 device_area)
{}

static void ifcvf_vdpa_kick_vq(struct vdpa_device *vdpa_dev, u16 qid)
{}

static u32 ifcvf_vdpa_get_generation(struct vdpa_device *vdpa_dev)
{}

static u32 ifcvf_vdpa_get_device_id(struct vdpa_device *vdpa_dev)
{}

static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev)
{}

static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)
{}

static size_t ifcvf_vdpa_get_config_size(struct vdpa_device *vdpa_dev)
{}

static u32 ifcvf_vdpa_get_vq_group(struct vdpa_device *vdpa, u16 idx)
{}

static void ifcvf_vdpa_get_config(struct vdpa_device *vdpa_dev,
				  unsigned int offset,
				  void *buf, unsigned int len)
{}

static void ifcvf_vdpa_set_config(struct vdpa_device *vdpa_dev,
				  unsigned int offset, const void *buf,
				  unsigned int len)
{}

static void ifcvf_vdpa_set_config_cb(struct vdpa_device *vdpa_dev,
				     struct vdpa_callback *cb)
{}

static int ifcvf_vdpa_get_vq_irq(struct vdpa_device *vdpa_dev,
				 u16 qid)
{}

static u16 ifcvf_vdpa_get_vq_size(struct vdpa_device *vdpa_dev,
			     u16 qid)
{}

static struct vdpa_notification_area ifcvf_get_vq_notification(struct vdpa_device *vdpa_dev,
							       u16 idx)
{}

/*
 * IFCVF currently doesn't have on-chip IOMMU, so not
 * implemented set_map()/dma_map()/dma_unmap()
 */
static const struct vdpa_config_ops ifc_vdpa_ops =;

static struct virtio_device_id id_table_net[] =;

static struct virtio_device_id id_table_blk[] =;

static u32 get_dev_type(struct pci_dev *pdev)
{}

static int ifcvf_vdpa_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
			      const struct vdpa_dev_set_config *config)
{}

static void ifcvf_vdpa_dev_del(struct vdpa_mgmt_dev *mdev, struct vdpa_device *dev)
{}

static const struct vdpa_mgmtdev_ops ifcvf_vdpa_mgmt_dev_ops =;

static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{}

static void ifcvf_remove(struct pci_dev *pdev)
{}

static struct pci_device_id ifcvf_pci_ids[] =;
MODULE_DEVICE_TABLE(pci, ifcvf_pci_ids);

static struct pci_driver ifcvf_driver =;

module_pci_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();