linux/drivers/net/ethernet/intel/igbvf/igbvf.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 2009 - 2018 Intel Corporation. */

/* Linux PRO/1000 Ethernet Driver main header file */

#ifndef _IGBVF_H_
#define _IGBVF_H_

#include <linux/types.h>
#include <linux/timer.h>
#include <linux/io.h>
#include <linux/netdevice.h>
#include <linux/if_vlan.h>

#include "vf.h"

/* Forward declarations */
struct igbvf_info;
struct igbvf_adapter;

/* Interrupt defines */
#define IGBVF_START_ITR
#define IGBVF_4K_ITR
#define IGBVF_20K_ITR
#define IGBVF_70K_ITR

enum latency_range {};

/* Interrupt modes, as used by the IntMode parameter */
#define IGBVF_INT_MODE_LEGACY
#define IGBVF_INT_MODE_MSI
#define IGBVF_INT_MODE_MSIX

/* Tx/Rx descriptor defines */
#define IGBVF_DEFAULT_TXD
#define IGBVF_MAX_TXD
#define IGBVF_MIN_TXD

#define IGBVF_DEFAULT_RXD
#define IGBVF_MAX_RXD
#define IGBVF_MIN_RXD

#define IGBVF_MIN_ITR_USECS
#define IGBVF_MAX_ITR_USECS

/* RX descriptor control thresholds.
 * PTHRESH - MAC will consider prefetch if it has fewer than this number of
 *	   descriptors available in its onboard memory.
 *	   Setting this to 0 disables RX descriptor prefetch.
 * HTHRESH - MAC will only prefetch if there are at least this many descriptors
 *	   available in host memory.
 *	   If PTHRESH is 0, this should also be 0.
 * WTHRESH - RX descriptor writeback threshold - MAC will delay writing back
 *	   descriptors until either it has this many to write back, or the
 *	   ITR timer expires.
 */
#define IGBVF_RX_PTHRESH
#define IGBVF_RX_HTHRESH
#define IGBVF_RX_WTHRESH

/* this is the size past which hardware will drop packets when setting LPE=0 */
#define MAXIMUM_ETHERNET_VLAN_SIZE

#define IGBVF_FC_PAUSE_TIME

/* How many Tx Descriptors do we need to call netif_wake_queue ? */
#define IGBVF_TX_QUEUE_WAKE
/* How many Rx Buffers do we bundle into one write to the hardware ? */
#define IGBVF_RX_BUFFER_WRITE

#define AUTO_ALL_MODES
#define IGBVF_EEPROM_APME

#define IGBVF_MNG_VLAN_NONE

#define IGBVF_MAX_MAC_FILTERS

/* Number of packet split data buffers (not including the header buffer) */
#define PS_PAGE_BUFFERS

enum igbvf_boards {};

struct igbvf_queue_stats {};

/* wrappers around a pointer to a socket buffer,
 * so a DMA handle can be stored along with the buffer
 */
struct igbvf_buffer {};

igbvf_desc;

struct igbvf_ring {};

/* board specific private data structure */
struct igbvf_adapter {};

struct igbvf_info {};

/* hardware capability, feature, and workaround flags */
#define IGBVF_FLAG_RX_CSUM_DISABLED
#define IGBVF_FLAG_RX_LB_VLAN_BSWAP
#define IGBVF_RX_DESC_ADV(R, i)
#define IGBVF_TX_DESC_ADV(R, i)
#define IGBVF_TX_CTXTDESC_ADV(R, i)

enum igbvf_state_t {};

extern char igbvf_driver_name[];

void igbvf_set_ethtool_ops(struct net_device *);

int igbvf_up(struct igbvf_adapter *);
void igbvf_down(struct igbvf_adapter *);
void igbvf_reinit_locked(struct igbvf_adapter *);
int igbvf_setup_rx_resources(struct igbvf_adapter *, struct igbvf_ring *);
int igbvf_setup_tx_resources(struct igbvf_adapter *, struct igbvf_ring *);
void igbvf_free_rx_resources(struct igbvf_ring *);
void igbvf_free_tx_resources(struct igbvf_ring *);
void igbvf_update_stats(struct igbvf_adapter *);

extern unsigned int copybreak;

#endif /* _IGBVF_H_ */