Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
ipoib.h File Reference
#include <linux/list.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/workqueue.h>
#include <linux/kref.h>
#include <linux/if_infiniband.h>
#include <linux/mutex.h>
#include <net/neighbour.h>
#include <net/sch_generic.h>
#include <linux/atomic.h>
#include <rdma/ib_verbs.h>
#include <rdma/ib_pack.h>
#include <rdma/ib_sa.h>
#include <linux/sched.h>

Go to the source code of this file.

Data Structures

struct  ipoib_header
 
struct  ipoib_cb
 
struct  ipoib_mcast
 
struct  ipoib_rx_buf
 
struct  ipoib_tx_buf
 
struct  ipoib_cm_tx_buf
 
struct  ipoib_cm_data
 
struct  ipoib_cm_rx
 
struct  ipoib_cm_tx
 
struct  ipoib_cm_rx_buf
 
struct  ipoib_cm_dev_priv
 
struct  ipoib_ethtool_st
 
struct  ipoib_neigh_hash
 
struct  ipoib_neigh_table
 
struct  ipoib_dev_priv
 
struct  ipoib_ah
 
struct  ipoib_path
 
struct  ipoib_neigh
 

Macros

#define IPOIB_OP_RECV   (1ul << 31)
 
#define IPOIB_OP_CM   (0)
 
#define IPOIB_UD_MTU(ib_mtu)   (ib_mtu - IPOIB_ENCAP_LEN)
 
#define IPOIB_UD_BUF_SIZE(ib_mtu)   (ib_mtu + IB_GRH_BYTES)
 
#define IPOIB_FLAGS_RC   0x80
 
#define IPOIB_FLAGS_UC   0x40
 
#define IPOIB_CM_SUPPORTED(ha)   (ha[0] & (IPOIB_FLAGS_RC))
 
#define ipoib_max_conn_qp   0
 
#define ipoib_printk(level, priv, format, arg...)   printk(level "%s: " format, ((struct ipoib_dev_priv *) priv)->dev->name , ## arg)
 
#define ipoib_warn(priv, format, arg...)   ipoib_printk(KERN_WARNING, priv, format , ## arg)
 
#define ipoib_dbg(priv, format, arg...)   do { (void) (priv); } while (0)
 
#define ipoib_dbg_mcast(priv, format, arg...)   do { (void) (priv); } while (0)
 
#define ipoib_dbg_data(priv, format, arg...)   do { (void) (priv); } while (0)
 
#define IPOIB_QPN(ha)   (be32_to_cpup((__be32 *) ha) & 0xffffff)
 

Enumerations

enum  ipoib_flush_level { IPOIB_FLUSH_LIGHT, IPOIB_FLUSH_NORMAL, IPOIB_FLUSH_HEAVY }
 
enum  {
  IPOIB_ENCAP_LEN = 4, IPOIB_UD_HEAD_SIZE = IB_GRH_BYTES + IPOIB_ENCAP_LEN, IPOIB_UD_RX_SG = 2, IPOIB_CM_MTU = 0x10000 - 0x10,
  IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN, IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE, IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE, IPOIB_RX_RING_SIZE = 256,
  IPOIB_TX_RING_SIZE = 128, IPOIB_MAX_QUEUE_SIZE = 8192, IPOIB_MIN_QUEUE_SIZE = 2, IPOIB_CM_MAX_CONN_QP = 4096,
  IPOIB_NUM_WC = 4, IPOIB_MAX_PATH_REC_QUEUE = 3, IPOIB_MAX_MCAST_QUEUE = 3, IPOIB_FLAG_OPER_UP = 0,
  IPOIB_FLAG_INITIALIZED = 1, IPOIB_FLAG_ADMIN_UP = 2, IPOIB_PKEY_ASSIGNED = 3, IPOIB_PKEY_STOP = 4,
  IPOIB_FLAG_SUBINTERFACE = 5, IPOIB_MCAST_RUN = 6, IPOIB_STOP_REAPER = 7, IPOIB_FLAG_ADMIN_CM = 9,
  IPOIB_FLAG_UMCAST = 10, IPOIB_STOP_NEIGH_GC = 11, IPOIB_NEIGH_TBL_FLUSH = 12, IPOIB_MAX_BACKOFF_SECONDS = 16,
  IPOIB_MCAST_FLAG_FOUND = 0, IPOIB_MCAST_FLAG_SENDONLY = 1, IPOIB_MCAST_FLAG_BUSY = 2, IPOIB_MCAST_FLAG_ATTACHED = 3,
  MAX_SEND_CQE = 16, IPOIB_CM_COPYBREAK = 256, IPOIB_NON_CHILD = 0, IPOIB_LEGACY_CHILD = 1,
  IPOIB_RTNL_CHILD = 2
}
 
enum  ipoib_cm_state { IPOIB_CM_RX_LIVE, IPOIB_CM_RX_ERROR, IPOIB_CM_RX_FLUSH }
 

Functions

void ipoib_neigh_dtor (struct ipoib_neigh *neigh)
 
struct ipoib_neighipoib_neigh_get (struct net_device *dev, u8 *daddr)
 
struct ipoib_neighipoib_neigh_alloc (u8 *daddr, struct net_device *dev)
 
void ipoib_neigh_free (struct ipoib_neigh *neigh)
 
void ipoib_del_neighs_by_gid (struct net_device *dev, u8 *gid)
 
int ipoib_poll (struct napi_struct *napi, int budget)
 
void ipoib_ib_completion (struct ib_cq *cq, void *dev_ptr)
 
void ipoib_send_comp_handler (struct ib_cq *cq, void *dev_ptr)
 
struct ipoib_ahipoib_create_ah (struct net_device *dev, struct ib_pd *pd, struct ib_ah_attr *attr)
 
void ipoib_free_ah (struct kref *kref)
 
int ipoib_open (struct net_device *dev)
 
int ipoib_add_pkey_attr (struct net_device *dev)
 
int ipoib_add_umcast_attr (struct net_device *dev)
 
void ipoib_send (struct net_device *dev, struct sk_buff *skb, struct ipoib_ah *address, u32 qpn)
 
void ipoib_reap_ah (struct work_struct *work)
 
void ipoib_mark_paths_invalid (struct net_device *dev)
 
void ipoib_flush_paths (struct net_device *dev)
 
struct ipoib_dev_privipoib_intf_alloc (const char *format)
 
int ipoib_ib_dev_init (struct net_device *dev, struct ib_device *ca, int port)
 
void ipoib_ib_dev_flush_light (struct work_struct *work)
 
void ipoib_ib_dev_flush_normal (struct work_struct *work)
 
void ipoib_ib_dev_flush_heavy (struct work_struct *work)
 
void ipoib_pkey_event (struct work_struct *work)
 
void ipoib_ib_dev_cleanup (struct net_device *dev)
 
int ipoib_ib_dev_open (struct net_device *dev)
 
int ipoib_ib_dev_up (struct net_device *dev)
 
int ipoib_ib_dev_down (struct net_device *dev, int flush)
 
int ipoib_ib_dev_stop (struct net_device *dev, int flush)
 
int ipoib_dev_init (struct net_device *dev, struct ib_device *ca, int port)
 
void ipoib_dev_cleanup (struct net_device *dev)
 
void ipoib_mcast_join_task (struct work_struct *work)
 
void ipoib_mcast_carrier_on_task (struct work_struct *work)
 
void ipoib_mcast_send (struct net_device *dev, u8 *daddr, struct sk_buff *skb)
 
void ipoib_mcast_restart_task (struct work_struct *work)
 
int ipoib_mcast_start_thread (struct net_device *dev)
 
int ipoib_mcast_stop_thread (struct net_device *dev, int flush)
 
void ipoib_mcast_dev_down (struct net_device *dev)
 
void ipoib_mcast_dev_flush (struct net_device *dev)
 
int ipoib_mcast_attach (struct net_device *dev, u16 mlid, union ib_gid *mgid, int set_qkey)
 
int ipoib_init_qp (struct net_device *dev)
 
int ipoib_transport_dev_init (struct net_device *dev, struct ib_device *ca)
 
void ipoib_transport_dev_cleanup (struct net_device *dev)
 
void ipoib_event (struct ib_event_handler *handler, struct ib_event *record)
 
int ipoib_vlan_add (struct net_device *pdev, unsigned short pkey)
 
int ipoib_vlan_delete (struct net_device *pdev, unsigned short pkey)
 
int __ipoib_vlan_add (struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv, u16 pkey, int child_type)
 
int __init ipoib_netlink_init (void)
 
void __exit ipoib_netlink_fini (void)
 
void ipoib_set_umcast (struct net_device *ndev, int umcast_val)
 
int ipoib_set_mode (struct net_device *dev, const char *buf)
 
void ipoib_setup (struct net_device *dev)
 
void ipoib_pkey_poll (struct work_struct *work)
 
int ipoib_pkey_dev_delay_open (struct net_device *dev)
 
void ipoib_drain_cq (struct net_device *dev)
 
void ipoib_set_ethtool_ops (struct net_device *dev)
 
int ipoib_set_dev_features (struct ipoib_dev_priv *priv, struct ib_device *hca)
 

Variables

struct workqueue_structipoib_workqueue
 
int ipoib_sendq_size
 
int ipoib_recvq_size
 
struct ib_sa_client ipoib_sa_client
 

Macro Definition Documentation

#define IPOIB_CM_SUPPORTED (   ha)    (ha[0] & (IPOIB_FLAGS_RC))

Definition at line 542 of file ipoib.h.

#define ipoib_dbg (   priv,
  format,
  arg... 
)    do { (void) (priv); } while (0)

Definition at line 744 of file ipoib.h.

#define ipoib_dbg_data (   priv,
  format,
  arg... 
)    do { (void) (priv); } while (0)

Definition at line 757 of file ipoib.h.

#define ipoib_dbg_mcast (   priv,
  format,
  arg... 
)    do { (void) (priv); } while (0)

Definition at line 746 of file ipoib.h.

#define IPOIB_FLAGS_RC   0x80

Definition at line 538 of file ipoib.h.

#define IPOIB_FLAGS_UC   0x40

Definition at line 539 of file ipoib.h.

#define ipoib_max_conn_qp   0

Definition at line 607 of file ipoib.h.

#define IPOIB_OP_CM   (0)

Definition at line 117 of file ipoib.h.

#define IPOIB_OP_RECV   (1ul << 31)

Definition at line 113 of file ipoib.h.

#define ipoib_printk (   level,
  priv,
  format,
  arg... 
)    printk(level "%s: " format, ((struct ipoib_dev_priv *) priv)->dev->name , ## arg)

Definition at line 720 of file ipoib.h.

#define IPOIB_QPN (   ha)    (be32_to_cpup((__be32 *) ha) & 0xffffff)

Definition at line 761 of file ipoib.h.

#define IPOIB_UD_BUF_SIZE (   ib_mtu)    (ib_mtu + IB_GRH_BYTES)

Definition at line 419 of file ipoib.h.

#define IPOIB_UD_MTU (   ib_mtu)    (ib_mtu - IPOIB_ENCAP_LEN)

Definition at line 418 of file ipoib.h.

#define ipoib_warn (   priv,
  format,
  arg... 
)    ipoib_printk(KERN_WARNING, priv, format , ## arg)

Definition at line 722 of file ipoib.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
IPOIB_ENCAP_LEN 
IPOIB_UD_HEAD_SIZE 
IPOIB_UD_RX_SG 
IPOIB_CM_MTU 
IPOIB_CM_BUF_SIZE 
IPOIB_CM_HEAD_SIZE 
IPOIB_CM_RX_SG 
IPOIB_RX_RING_SIZE 
IPOIB_TX_RING_SIZE 
IPOIB_MAX_QUEUE_SIZE 
IPOIB_MIN_QUEUE_SIZE 
IPOIB_CM_MAX_CONN_QP 
IPOIB_NUM_WC 
IPOIB_MAX_PATH_REC_QUEUE 
IPOIB_MAX_MCAST_QUEUE 
IPOIB_FLAG_OPER_UP 
IPOIB_FLAG_INITIALIZED 
IPOIB_FLAG_ADMIN_UP 
IPOIB_PKEY_ASSIGNED 
IPOIB_PKEY_STOP 
IPOIB_FLAG_SUBINTERFACE 
IPOIB_MCAST_RUN 
IPOIB_STOP_REAPER 
IPOIB_FLAG_ADMIN_CM 
IPOIB_FLAG_UMCAST 
IPOIB_STOP_NEIGH_GC 
IPOIB_NEIGH_TBL_FLUSH 
IPOIB_MAX_BACKOFF_SECONDS 
IPOIB_MCAST_FLAG_FOUND 
IPOIB_MCAST_FLAG_SENDONLY 
IPOIB_MCAST_FLAG_BUSY 
IPOIB_MCAST_FLAG_ATTACHED 
MAX_SEND_CQE 
IPOIB_CM_COPYBREAK 
IPOIB_NON_CHILD 
IPOIB_LEGACY_CHILD 
IPOIB_RTNL_CHILD 

Definition at line 64 of file ipoib.h.

Enumerator:
IPOIB_CM_RX_LIVE 
IPOIB_CM_RX_ERROR 
IPOIB_CM_RX_FLUSH 

Definition at line 203 of file ipoib.h.

Enumerator:
IPOIB_FLUSH_LIGHT 
IPOIB_FLUSH_NORMAL 
IPOIB_FLUSH_HEAVY 

Definition at line 58 of file ipoib.h.

Function Documentation

int __ipoib_vlan_add ( struct ipoib_dev_priv ppriv,
struct ipoib_dev_priv priv,
u16  pkey,
int  child_type 
)

Definition at line 52 of file ipoib_vlan.c.

int ipoib_add_pkey_attr ( struct net_device dev)

Definition at line 1489 of file ipoib_main.c.

int ipoib_add_umcast_attr ( struct net_device dev)

Definition at line 1439 of file ipoib_main.c.

struct ipoib_ah* ipoib_create_ah ( struct net_device dev,
struct ib_pd pd,
struct ib_ah_attr attr 
)
read

Definition at line 56 of file ipoib_ib.c.

void ipoib_del_neighs_by_gid ( struct net_device dev,
u8 gid 
)

Definition at line 1146 of file ipoib_main.c.

void ipoib_dev_cleanup ( struct net_device dev)

Definition at line 1293 of file ipoib_main.c.

int ipoib_dev_init ( struct net_device dev,
struct ib_device ca,
int  port 
)

Definition at line 1252 of file ipoib_main.c.

void ipoib_drain_cq ( struct net_device dev)

Definition at line 775 of file ipoib_ib.c.

void ipoib_event ( struct ib_event_handler handler,
struct ib_event record 
)

Definition at line 272 of file ipoib_verbs.c.

void ipoib_flush_paths ( struct net_device dev)

Definition at line 396 of file ipoib_main.c.

void ipoib_free_ah ( struct kref kref)

Definition at line 82 of file ipoib_ib.c.

void ipoib_ib_completion ( struct ib_cq cq,
void dev_ptr 
)

Definition at line 473 of file ipoib_ib.c.

void ipoib_ib_dev_cleanup ( struct net_device dev)

Definition at line 1028 of file ipoib_ib.c.

int ipoib_ib_dev_down ( struct net_device dev,
int  flush 
)

Definition at line 735 of file ipoib_ib.c.

void ipoib_ib_dev_flush_heavy ( struct work_struct work)

Definition at line 1020 of file ipoib_ib.c.

void ipoib_ib_dev_flush_light ( struct work_struct work)

Definition at line 1004 of file ipoib_ib.c.

void ipoib_ib_dev_flush_normal ( struct work_struct work)

Definition at line 1012 of file ipoib_ib.c.

int ipoib_ib_dev_init ( struct net_device dev,
struct ib_device ca,
int  port 
)

Definition at line 908 of file ipoib_ib.c.

int ipoib_ib_dev_open ( struct net_device dev)

Definition at line 666 of file ipoib_ib.c.

int ipoib_ib_dev_stop ( struct net_device dev,
int  flush 
)

Definition at line 814 of file ipoib_ib.c.

int ipoib_ib_dev_up ( struct net_device dev)

Definition at line 719 of file ipoib_ib.c.

int ipoib_init_qp ( struct net_device dev)

Definition at line 77 of file ipoib_verbs.c.

struct ipoib_dev_priv* ipoib_intf_alloc ( const char format)
read

Definition at line 1386 of file ipoib_main.c.

void ipoib_mark_paths_invalid ( struct net_device dev)

Definition at line 379 of file ipoib_main.c.

int ipoib_mcast_attach ( struct net_device dev,
u16  mlid,
union ib_gid mgid,
int  set_qkey 
)

Definition at line 38 of file ipoib_verbs.c.

void ipoib_mcast_carrier_on_task ( struct work_struct work)

Definition at line 356 of file ipoib_multicast.c.

void ipoib_mcast_dev_down ( struct net_device dev)
void ipoib_mcast_dev_flush ( struct net_device dev)

Definition at line 729 of file ipoib_multicast.c.

void ipoib_mcast_join_task ( struct work_struct work)

Definition at line 508 of file ipoib_multicast.c.

void ipoib_mcast_restart_task ( struct work_struct work)

Definition at line 771 of file ipoib_multicast.c.

void ipoib_mcast_send ( struct net_device dev,
u8 daddr,
struct sk_buff skb 
)

Definition at line 644 of file ipoib_multicast.c.

int ipoib_mcast_start_thread ( struct net_device dev)

Definition at line 591 of file ipoib_multicast.c.

int ipoib_mcast_stop_thread ( struct net_device dev,
int  flush 
)

Definition at line 605 of file ipoib_multicast.c.

struct ipoib_neigh* ipoib_neigh_alloc ( u8 daddr,
struct net_device dev 
)
read

Definition at line 975 of file ipoib_main.c.

void ipoib_neigh_dtor ( struct ipoib_neigh neigh)

Definition at line 1031 of file ipoib_main.c.

void ipoib_neigh_free ( struct ipoib_neigh neigh)

Definition at line 1064 of file ipoib_main.c.

struct ipoib_neigh* ipoib_neigh_get ( struct net_device dev,
u8 daddr 
)
read

Definition at line 854 of file ipoib_main.c.

void __exit ipoib_netlink_fini ( void  )

Definition at line 167 of file ipoib_netlink.c.

int __init ipoib_netlink_init ( void  )

Definition at line 162 of file ipoib_netlink.c.

int ipoib_open ( struct net_device dev)

Definition at line 96 of file ipoib_main.c.

int ipoib_pkey_dev_delay_open ( struct net_device dev)

Definition at line 1070 of file ipoib_ib.c.

void ipoib_pkey_event ( struct work_struct work)
void ipoib_pkey_poll ( struct work_struct work)

Definition at line 1050 of file ipoib_ib.c.

int ipoib_poll ( struct napi_struct napi,
int  budget 
)

Definition at line 427 of file ipoib_ib.c.

void ipoib_reap_ah ( struct work_struct work)

Definition at line 648 of file ipoib_ib.c.

void ipoib_send ( struct net_device dev,
struct sk_buff skb,
struct ipoib_ah address,
u32  qpn 
)

Definition at line 542 of file ipoib_ib.c.

void ipoib_send_comp_handler ( struct ib_cq cq,
void dev_ptr 
)

Definition at line 495 of file ipoib_ib.c.

int ipoib_set_dev_features ( struct ipoib_dev_priv priv,
struct ib_device hca 
)

Definition at line 1494 of file ipoib_main.c.

void ipoib_set_ethtool_ops ( struct net_device dev)

Definition at line 89 of file ipoib_ethtool.c.

int ipoib_set_mode ( struct net_device dev,
const char buf 
)

Definition at line 218 of file ipoib_main.c.

void ipoib_set_umcast ( struct net_device ndev,
int  umcast_val 
)

Definition at line 1415 of file ipoib_main.c.

void ipoib_setup ( struct net_device dev)

Definition at line 1337 of file ipoib_main.c.

void ipoib_transport_dev_cleanup ( struct net_device dev)

Definition at line 245 of file ipoib_verbs.c.

int ipoib_transport_dev_init ( struct net_device dev,
struct ib_device ca 
)

Definition at line 131 of file ipoib_verbs.c.

int ipoib_vlan_add ( struct net_device pdev,
unsigned short  pkey 
)

Definition at line 122 of file ipoib_vlan.c.

int ipoib_vlan_delete ( struct net_device pdev,
unsigned short  pkey 
)

Definition at line 176 of file ipoib_vlan.c.

Variable Documentation

int ipoib_recvq_size
struct ib_sa_client ipoib_sa_client

Definition at line 84 of file ipoib_main.c.

int ipoib_sendq_size
struct workqueue_struct* ipoib_workqueue

Definition at line 82 of file ipoib_main.c.