Go to the documentation of this file.
38 #include <linux/list.h>
40 #include <linux/netdevice.h>
54 #include <linux/sched.h>
113 #define IPOIB_OP_RECV (1ul << 31)
114 #ifdef CONFIG_INFINIBAND_IPOIB_CM
115 #define IPOIB_OP_CM (1ul << 30)
117 #define IPOIB_OP_CM (0)
362 #ifdef CONFIG_INFINIBAND_IPOIB_CM
366 #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
368 struct dentry *mcg_dentry;
369 struct dentry *path_dentry;
403 #ifdef CONFIG_INFINIBAND_IPOIB_CM
418 #define IPOIB_UD_MTU(ib_mtu) (ib_mtu - IPOIB_ENCAP_LEN)
419 #define IPOIB_UD_BUF_SIZE(ib_mtu) (ib_mtu + IB_GRH_BYTES)
421 static inline int ipoib_ud_need_sg(
unsigned int ib_mtu)
427 static inline void ipoib_neigh_put(
struct ipoib_neigh *neigh)
449 static inline void ipoib_put_ah(
struct ipoib_ah *
ah)
491 #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
508 union ib_gid *mgid,
int set_qkey);
538 #define IPOIB_FLAGS_RC 0x80
539 #define IPOIB_FLAGS_UC 0x40
542 #define IPOIB_CM_SUPPORTED(ha) (ha[0] & (IPOIB_FLAGS_RC))
544 #ifdef CONFIG_INFINIBAND_IPOIB_CM
548 static inline int ipoib_cm_admin_enabled(
struct net_device *
dev)
562 static inline int ipoib_cm_up(
struct ipoib_neigh *neigh)
581 return !!priv->cm.srq;
584 static inline unsigned int ipoib_cm_max_mtu(
struct net_device *
dev)
587 return priv->cm.max_cm_mtu;
607 #define ipoib_max_conn_qp 0
609 static inline int ipoib_cm_admin_enabled(
struct net_device *
dev)
619 static inline int ipoib_cm_up(
struct ipoib_neigh *neigh)
639 static inline unsigned int ipoib_cm_max_mtu(
struct net_device *
dev)
708 #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
720 #define ipoib_printk(level, priv, format, arg...) \
721 printk(level "%s: " format, ((struct ipoib_dev_priv *) priv)->dev->name , ## arg)
722 #define ipoib_warn(priv, format, arg...) \
723 ipoib_printk(KERN_WARNING, priv, format , ## arg)
730 #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
731 extern int ipoib_debug_level;
733 #define ipoib_dbg(priv, format, arg...) \
735 if (ipoib_debug_level > 0) \
736 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
738 #define ipoib_dbg_mcast(priv, format, arg...) \
740 if (mcast_debug_level > 0) \
741 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
744 #define ipoib_dbg(priv, format, arg...) \
745 do { (void) (priv); } while (0)
746 #define ipoib_dbg_mcast(priv, format, arg...) \
747 do { (void) (priv); } while (0)
750 #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA
751 #define ipoib_dbg_data(priv, format, arg...) \
753 if (data_debug_level > 0) \
754 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
757 #define ipoib_dbg_data(priv, format, arg...) \
758 do { (void) (priv); } while (0)
761 #define IPOIB_QPN(ha) (be32_to_cpup((__be32 *) ha) & 0xffffff)