linux/drivers/net/ethernet/cavium/liquidio/lio_core.c

/**********************************************************************
 * Author: Cavium, Inc.
 *
 * Contact: [email protected]
 *          Please include "LiquidIO" in the subject.
 *
 * Copyright (c) 2003-2016 Cavium, Inc.
 *
 * This file is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, Version 2, as
 * published by the Free Software Foundation.
 *
 * This file is distributed in the hope that it will be useful, but
 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
 * NONINFRINGEMENT.  See the GNU General Public License for more details.
 ***********************************************************************/
#include <linux/pci.h>
#include <linux/if_vlan.h>
#include "liquidio_common.h"
#include "octeon_droq.h"
#include "octeon_iq.h"
#include "response_manager.h"
#include "octeon_device.h"
#include "octeon_nic.h"
#include "octeon_main.h"
#include "octeon_network.h"

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

/* OOM task polling interval */
#define LIO_OOM_POLL_INTERVAL_MS

#define OCTNIC_MAX_SG

/**
 * lio_delete_glists - Delete gather lists
 * @lio: per-network private data
 */
void lio_delete_glists(struct lio *lio)
{}
EXPORT_SYMBOL_GPL();

/**
 * lio_setup_glists - Setup gather lists
 * @oct: octeon_device
 * @lio: per-network private data
 * @num_iqs: count of iqs to allocate
 */
int lio_setup_glists(struct octeon_device *oct, struct lio *lio, int num_iqs)
{}
EXPORT_SYMBOL_GPL();

int liquidio_set_feature(struct net_device *netdev, int cmd, u16 param1)
{}
EXPORT_SYMBOL_GPL();

void octeon_report_tx_completion_to_bql(void *txq, unsigned int pkts_compl,
					unsigned int bytes_compl)
{}

void octeon_update_tx_completion_counters(void *buf, int reqtype,
					  unsigned int *pkts_compl,
					  unsigned int *bytes_compl)
{}

int octeon_report_sent_bytes_to_bql(void *buf, int reqtype)
{}

void liquidio_link_ctrl_cmd_completion(void *nctrl_ptr)
{}
EXPORT_SYMBOL_GPL();

void octeon_pf_changed_vf_macaddr(struct octeon_device *oct, u8 *mac)
{}

void octeon_schedule_rxq_oom_work(struct octeon_device *oct,
				  struct octeon_droq *droq)
{}

static void octnet_poll_check_rxq_oom_status(struct work_struct *work)
{}

int setup_rx_oom_poll_fn(struct net_device *netdev)
{}
EXPORT_SYMBOL_GPL();

void cleanup_rx_oom_poll_fn(struct net_device *netdev)
{}
EXPORT_SYMBOL_GPL();

/* Runs in interrupt context. */
static void lio_update_txq_status(struct octeon_device *oct, int iq_num)
{}

/**
 * octeon_setup_droq - Setup output queue
 * @oct: octeon device
 * @q_no: which queue
 * @num_descs: how many descriptors
 * @desc_size: size of each descriptor
 * @app_ctx: application context
 */
static int octeon_setup_droq(struct octeon_device *oct, int q_no, int num_descs,
			     int desc_size, void *app_ctx)
{}

/**
 * liquidio_push_packet - Routine to push packets arriving on Octeon interface upto network layer.
 * @octeon_id:octeon device id.
 * @skbuff:   skbuff struct to be passed to network layer.
 * @len:      size of total data received.
 * @rh:       Control header associated with the packet
 * @param:    additional control data with the packet
 * @arg:      farg registered in droq_ops
 */
static void
liquidio_push_packet(u32 __maybe_unused octeon_id,
		     void *skbuff,
		     u32 len,
		     union octeon_rh *rh,
		     void *param,
		     void *arg)
{}

/**
 * napi_schedule_wrapper - wrapper for calling napi_schedule
 * @param: parameters to pass to napi_schedule
 *
 * Used when scheduling on different CPUs
 */
static void napi_schedule_wrapper(void *param)
{}

/**
 * liquidio_napi_drv_callback - callback when receive interrupt occurs and we are in NAPI mode
 * @arg: pointer to octeon output queue
 */
static void liquidio_napi_drv_callback(void *arg)
{}

/**
 * liquidio_napi_poll - Entry point for NAPI polling
 * @napi: NAPI structure
 * @budget: maximum number of items to process
 */
static int liquidio_napi_poll(struct napi_struct *napi, int budget)
{}

/**
 * liquidio_setup_io_queues - Setup input and output queues
 * @octeon_dev: octeon device
 * @ifidx: Interface index
 * @num_iqs: input io queue count
 * @num_oqs: output io queue count
 *
 * Note: Queues are with respect to the octeon device. Thus
 * an input queue is for egress packets, and output queues
 * are for ingress packets.
 */
int liquidio_setup_io_queues(struct octeon_device *octeon_dev, int ifidx,
			     u32 num_iqs, u32 num_oqs)
{}
EXPORT_SYMBOL_GPL();

static
int liquidio_schedule_msix_droq_pkt_handler(struct octeon_droq *droq, u64 ret)
{}

irqreturn_t
liquidio_msix_intr_handler(int __maybe_unused irq, void *dev)
{}

/**
 * liquidio_schedule_droq_pkt_handlers - Droq packet processor sceduler
 * @oct: octeon device
 */
static void liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct)
{}

/**
 * liquidio_legacy_intr_handler - Interrupt handler for octeon
 * @irq: unused
 * @dev: octeon device
 */
static
irqreturn_t liquidio_legacy_intr_handler(int __maybe_unused irq, void *dev)
{}

/**
 * octeon_setup_interrupt - Setup interrupt for octeon device
 * @oct: octeon device
 * @num_ioqs: number of queues
 *
 *  Enable interrupt in Octeon device as given in the PCI interrupt mask.
 */
int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs)
{}
EXPORT_SYMBOL_GPL();

/**
 * liquidio_change_mtu - Net device change_mtu
 * @netdev: network device
 * @new_mtu: the new max transmit unit size
 */
int liquidio_change_mtu(struct net_device *netdev, int new_mtu)
{}
EXPORT_SYMBOL_GPL();

int lio_wait_for_clean_oq(struct octeon_device *oct)
{}
EXPORT_SYMBOL_GPL();

static void
octnet_nic_stats_callback(struct octeon_device *oct_dev,
			  u32 status, void *ptr)
{}

static int lio_fetch_vf_stats(struct lio *lio)
{}

void lio_fetch_stats(struct work_struct *work)
{}
EXPORT_SYMBOL_GPL();

int liquidio_set_speed(struct lio *lio, int speed)
{}

int liquidio_get_speed(struct lio *lio)
{}
EXPORT_SYMBOL_GPL();

int liquidio_set_fec(struct lio *lio, int on_off)
{}

int liquidio_get_fec(struct lio *lio)
{}
EXPORT_SYMBOL_GPL();