#include <linux/spinlock.h>
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/prefetch.h>
#include <rdma/ib_verbs.h>
#include <linux/etherdevice.h>
#include "hfi.h"
#include "trace.h"
#include "qp.h"
#include "sdma.h"
#include "debugfs.h"
#include "vnic.h"
#include "fault.h"
#include "ipoib.h"
#include "netdev.h"
#undef pr_fmt
#define pr_fmt(fmt) …
DEFINE_MUTEX(…) …;
unsigned int hfi1_max_mtu = …;
module_param_named(max_mtu, hfi1_max_mtu, uint, S_IRUGO);
MODULE_PARM_DESC(…) …;
unsigned int hfi1_cu = …;
module_param_named(cu, hfi1_cu, uint, S_IRUGO);
MODULE_PARM_DESC(…) …;
unsigned long hfi1_cap_mask = …;
static int hfi1_caps_set(const char *val, const struct kernel_param *kp);
static int hfi1_caps_get(char *buffer, const struct kernel_param *kp);
static const struct kernel_param_ops cap_ops = …;
module_param_cb(…);
MODULE_PARM_DESC(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
#define MAX_PKT_RECV …
#define MAX_PKT_RECV_THREAD …
#define EGR_HEAD_UPDATE_THRESHOLD …
struct hfi1_ib_stats hfi1_stats;
static int hfi1_caps_set(const char *val, const struct kernel_param *kp)
{ … }
static int hfi1_caps_get(char *buffer, const struct kernel_param *kp)
{ … }
struct pci_dev *get_pci_dev(struct rvt_dev_info *rdi)
{ … }
int hfi1_count_active_units(void)
{ … }
static inline void *get_egrbuf(const struct hfi1_ctxtdata *rcd, u64 rhf,
u8 *update)
{ … }
static inline void *hfi1_get_header(struct hfi1_ctxtdata *rcd,
__le32 *rhf_addr)
{ … }
static inline struct ib_header *hfi1_get_msgheader(struct hfi1_ctxtdata *rcd,
__le32 *rhf_addr)
{ … }
static inline struct hfi1_16b_header
*hfi1_get_16B_header(struct hfi1_ctxtdata *rcd,
__le32 *rhf_addr)
{ … }
int hfi1_rcvbuf_validate(u32 size, u8 type, u16 *encoded)
{ … }
static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd,
struct hfi1_packet *packet)
{ … }
static inline void init_packet(struct hfi1_ctxtdata *rcd,
struct hfi1_packet *packet)
{ … }
static const hfi1_handle_cnp hfi1_handle_cnp_tbl[2] = …;
bool hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
bool prescan)
{ … }
struct ps_mdata { … };
static inline void init_ps_mdata(struct ps_mdata *mdata,
struct hfi1_packet *packet)
{ … }
static inline int ps_done(struct ps_mdata *mdata, u64 rhf,
struct hfi1_ctxtdata *rcd)
{ … }
static inline int ps_skip(struct ps_mdata *mdata, u64 rhf,
struct hfi1_ctxtdata *rcd)
{ … }
static inline void update_ps_mdata(struct ps_mdata *mdata,
struct hfi1_ctxtdata *rcd)
{ … }
#define prescan_rxq(rcd, packet) …
static void __prescan_rxq(struct hfi1_packet *packet)
{ … }
static void process_rcv_qp_work(struct hfi1_packet *packet)
{ … }
static noinline int max_packet_exceeded(struct hfi1_packet *packet, int thread)
{ … }
static inline int check_max_packet(struct hfi1_packet *packet, int thread)
{ … }
static noinline int skip_rcv_packet(struct hfi1_packet *packet, int thread)
{ … }
static void process_rcv_packet_napi(struct hfi1_packet *packet)
{ … }
static inline int process_rcv_packet(struct hfi1_packet *packet, int thread)
{ … }
static inline void process_rcv_update(int last, struct hfi1_packet *packet)
{ … }
static inline void finish_packet(struct hfi1_packet *packet)
{ … }
int handle_receive_interrupt_napi_fp(struct hfi1_ctxtdata *rcd, int budget)
{ … }
int handle_receive_interrupt_nodma_rtail(struct hfi1_ctxtdata *rcd, int thread)
{ … }
int handle_receive_interrupt_dma_rtail(struct hfi1_ctxtdata *rcd, int thread)
{ … }
static void set_all_fastpath(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd)
{ … }
void set_all_slowpath(struct hfi1_devdata *dd)
{ … }
static bool __set_armed_to_active(struct hfi1_packet *packet)
{ … }
static bool set_armed_to_active(struct hfi1_packet *packet)
{ … }
int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread)
{ … }
int handle_receive_interrupt_napi_sp(struct hfi1_ctxtdata *rcd, int budget)
{ … }
void receive_interrupt_work(struct work_struct *work)
{ … }
int mtu_to_enum(u32 mtu, int default_if_bad)
{ … }
u16 enum_to_mtu(int mtu)
{ … }
int set_mtu(struct hfi1_pportdata *ppd)
{ … }
int hfi1_set_lid(struct hfi1_pportdata *ppd, u32 lid, u8 lmc)
{ … }
void shutdown_led_override(struct hfi1_pportdata *ppd)
{ … }
static void run_led_override(struct timer_list *t)
{ … }
void hfi1_start_led_override(struct hfi1_pportdata *ppd, unsigned int timeon,
unsigned int timeoff)
{ … }
int hfi1_reset_device(int unit)
{ … }
static inline void hfi1_setup_ib_header(struct hfi1_packet *packet)
{ … }
static int hfi1_bypass_ingress_pkt_check(struct hfi1_packet *packet)
{ … }
static int hfi1_setup_9B_packet(struct hfi1_packet *packet)
{ … }
static int hfi1_setup_bypass_packet(struct hfi1_packet *packet)
{ … }
static void show_eflags_errs(struct hfi1_packet *packet)
{ … }
void handle_eflags(struct hfi1_packet *packet)
{ … }
static void hfi1_ipoib_ib_rcv(struct hfi1_packet *packet)
{ … }
static void process_receive_ib(struct hfi1_packet *packet)
{ … }
static void process_receive_bypass(struct hfi1_packet *packet)
{ … }
static void process_receive_error(struct hfi1_packet *packet)
{ … }
static void kdeth_process_expected(struct hfi1_packet *packet)
{ … }
static void kdeth_process_eager(struct hfi1_packet *packet)
{ … }
static void process_receive_invalid(struct hfi1_packet *packet)
{ … }
#define HFI1_RCVHDR_DUMP_MAX …
void seqfile_dump_rcd(struct seq_file *s, struct hfi1_ctxtdata *rcd)
{ … }
const rhf_rcv_function_ptr normal_rhf_rcv_functions[] = …;
const rhf_rcv_function_ptr netdev_rhf_rcv_functions[] = …;