linux/drivers/vdpa/alibaba/eni_vdpa.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * vDPA bridge driver for Alibaba ENI(Elastic Network Interface)
 *
 * Copyright (c) 2021, Alibaba Inc. All rights reserved.
 * Author: Wu Zongyong <[email protected]>
 *
 */

#include "linux/bits.h"
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/vdpa.h>
#include <linux/virtio.h>
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
#include <linux/virtio_pci.h>
#include <linux/virtio_pci_legacy.h>
#include <uapi/linux/virtio_net.h>

#define ENI_MSIX_NAME_SIZE

#define ENI_ERR(pdev, fmt, ...)
#define ENI_DBG(pdev, fmt, ...)
#define ENI_INFO(pdev, fmt, ...)

struct eni_vring {};

struct eni_vdpa {};

static struct eni_vdpa *vdpa_to_eni(struct vdpa_device *vdpa)
{}

static struct virtio_pci_legacy_device *vdpa_to_ldev(struct vdpa_device *vdpa)
{}

static u64 eni_vdpa_get_device_features(struct vdpa_device *vdpa)
{}

static int eni_vdpa_set_driver_features(struct vdpa_device *vdpa, u64 features)
{}

static u64 eni_vdpa_get_driver_features(struct vdpa_device *vdpa)
{}

static u8 eni_vdpa_get_status(struct vdpa_device *vdpa)
{}

static int eni_vdpa_get_vq_irq(struct vdpa_device *vdpa, u16 idx)
{}

static void eni_vdpa_free_irq(struct eni_vdpa *eni_vdpa)
{}

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

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

static int eni_vdpa_request_irq(struct eni_vdpa *eni_vdpa)
{}

static void eni_vdpa_set_status(struct vdpa_device *vdpa, u8 status)
{}

static int eni_vdpa_reset(struct vdpa_device *vdpa)
{}

static u16 eni_vdpa_get_vq_num_max(struct vdpa_device *vdpa)
{}

static u16 eni_vdpa_get_vq_num_min(struct vdpa_device *vdpa)
{}

static u16 eni_vdpa_get_vq_size(struct vdpa_device *vdpa, u16 qid)
{}

static int eni_vdpa_get_vq_state(struct vdpa_device *vdpa, u16 qid,
				struct vdpa_vq_state *state)
{}

static int eni_vdpa_set_vq_state(struct vdpa_device *vdpa, u16 qid,
				 const struct vdpa_vq_state *state)
{}


static void eni_vdpa_set_vq_cb(struct vdpa_device *vdpa, u16 qid,
			       struct vdpa_callback *cb)
{}

static void eni_vdpa_set_vq_ready(struct vdpa_device *vdpa, u16 qid,
				  bool ready)
{}

static bool eni_vdpa_get_vq_ready(struct vdpa_device *vdpa, u16 qid)
{}

static void eni_vdpa_set_vq_num(struct vdpa_device *vdpa, u16 qid,
			       u32 num)
{}

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

static void eni_vdpa_kick_vq(struct vdpa_device *vdpa, u16 qid)
{}

static u32 eni_vdpa_get_device_id(struct vdpa_device *vdpa)
{}

static u32 eni_vdpa_get_vendor_id(struct vdpa_device *vdpa)
{}

static u32 eni_vdpa_get_vq_align(struct vdpa_device *vdpa)
{}

static size_t eni_vdpa_get_config_size(struct vdpa_device *vdpa)
{}


static void eni_vdpa_get_config(struct vdpa_device *vdpa,
				unsigned int offset,
				void *buf, unsigned int len)
{}

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

static void eni_vdpa_set_config_cb(struct vdpa_device *vdpa,
				   struct vdpa_callback *cb)
{}

static const struct vdpa_config_ops eni_vdpa_ops =;


static u16 eni_vdpa_get_num_queues(struct eni_vdpa *eni_vdpa)
{}

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

static void eni_vdpa_remove(struct pci_dev *pdev)
{}

static struct pci_device_id eni_pci_ids[] =;

static struct pci_driver eni_vdpa_driver =;

module_pci_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();