Path: blob/master/drivers/infiniband/ulp/ipoib/ipoib.h
15112 views
/*1* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.2* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.3* Copyright (c) 2004 Voltaire, Inc. All rights reserved.4*5* This software is available to you under a choice of one of two6* licenses. You may choose to be licensed under the terms of the GNU7* General Public License (GPL) Version 2, available from the file8* COPYING in the main directory of this source tree, or the9* OpenIB.org BSD license below:10*11* Redistribution and use in source and binary forms, with or12* without modification, are permitted provided that the following13* conditions are met:14*15* - Redistributions of source code must retain the above16* copyright notice, this list of conditions and the following17* disclaimer.18*19* - Redistributions in binary form must reproduce the above20* copyright notice, this list of conditions and the following21* disclaimer in the documentation and/or other materials22* provided with the distribution.23*24* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,25* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF26* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND27* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS28* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN29* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN30* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE31* SOFTWARE.32*/3334#ifndef _IPOIB_H35#define _IPOIB_H3637#include <linux/list.h>38#include <linux/skbuff.h>39#include <linux/netdevice.h>40#include <linux/workqueue.h>41#include <linux/kref.h>42#include <linux/if_infiniband.h>43#include <linux/mutex.h>4445#include <net/neighbour.h>4647#include <asm/atomic.h>4849#include <rdma/ib_verbs.h>50#include <rdma/ib_pack.h>51#include <rdma/ib_sa.h>52#include <linux/sched.h>5354/* constants */5556enum ipoib_flush_level {57IPOIB_FLUSH_LIGHT,58IPOIB_FLUSH_NORMAL,59IPOIB_FLUSH_HEAVY60};6162enum {63IPOIB_ENCAP_LEN = 4,6465IPOIB_UD_HEAD_SIZE = IB_GRH_BYTES + IPOIB_ENCAP_LEN,66IPOIB_UD_RX_SG = 2, /* max buffer needed for 4K mtu */6768IPOIB_CM_MTU = 0x10000 - 0x10, /* padding to align header to 16 */69IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN,70IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE,71IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE,72IPOIB_RX_RING_SIZE = 256,73IPOIB_TX_RING_SIZE = 128,74IPOIB_MAX_QUEUE_SIZE = 8192,75IPOIB_MIN_QUEUE_SIZE = 2,76IPOIB_CM_MAX_CONN_QP = 4096,7778IPOIB_NUM_WC = 4,7980IPOIB_MAX_PATH_REC_QUEUE = 3,81IPOIB_MAX_MCAST_QUEUE = 3,8283IPOIB_FLAG_OPER_UP = 0,84IPOIB_FLAG_INITIALIZED = 1,85IPOIB_FLAG_ADMIN_UP = 2,86IPOIB_PKEY_ASSIGNED = 3,87IPOIB_PKEY_STOP = 4,88IPOIB_FLAG_SUBINTERFACE = 5,89IPOIB_MCAST_RUN = 6,90IPOIB_STOP_REAPER = 7,91IPOIB_FLAG_ADMIN_CM = 9,92IPOIB_FLAG_UMCAST = 10,9394IPOIB_MAX_BACKOFF_SECONDS = 16,9596IPOIB_MCAST_FLAG_FOUND = 0, /* used in set_multicast_list */97IPOIB_MCAST_FLAG_SENDONLY = 1,98IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */99IPOIB_MCAST_FLAG_ATTACHED = 3,100101MAX_SEND_CQE = 16,102IPOIB_CM_COPYBREAK = 256,103};104105#define IPOIB_OP_RECV (1ul << 31)106#ifdef CONFIG_INFINIBAND_IPOIB_CM107#define IPOIB_OP_CM (1ul << 30)108#else109#define IPOIB_OP_CM (0)110#endif111112/* structs */113114struct ipoib_header {115__be16 proto;116u16 reserved;117};118119struct ipoib_pseudoheader {120u8 hwaddr[INFINIBAND_ALEN];121};122123/* Used for all multicast joins (broadcast, IPv4 mcast and IPv6 mcast) */124struct ipoib_mcast {125struct ib_sa_mcmember_rec mcmember;126struct ib_sa_multicast *mc;127struct ipoib_ah *ah;128129struct rb_node rb_node;130struct list_head list;131132unsigned long created;133unsigned long backoff;134135unsigned long flags;136unsigned char logcount;137138struct list_head neigh_list;139140struct sk_buff_head pkt_queue;141142struct net_device *dev;143};144145struct ipoib_rx_buf {146struct sk_buff *skb;147u64 mapping[IPOIB_UD_RX_SG];148};149150struct ipoib_tx_buf {151struct sk_buff *skb;152u64 mapping[MAX_SKB_FRAGS + 1];153};154155struct ipoib_cm_tx_buf {156struct sk_buff *skb;157u64 mapping;158};159160struct ib_cm_id;161162struct ipoib_cm_data {163__be32 qpn; /* High byte MUST be ignored on receive */164__be32 mtu;165};166167/*168* Quoting 10.3.1 Queue Pair and EE Context States:169*170* Note, for QPs that are associated with an SRQ, the Consumer should take the171* QP through the Error State before invoking a Destroy QP or a Modify QP to the172* Reset State. The Consumer may invoke the Destroy QP without first performing173* a Modify QP to the Error State and waiting for the Affiliated Asynchronous174* Last WQE Reached Event. However, if the Consumer does not wait for the175* Affiliated Asynchronous Last WQE Reached Event, then WQE and Data Segment176* leakage may occur. Therefore, it is good programming practice to tear down a177* QP that is associated with an SRQ by using the following process:178*179* - Put the QP in the Error State180* - Wait for the Affiliated Asynchronous Last WQE Reached Event;181* - either:182* drain the CQ by invoking the Poll CQ verb and either wait for CQ183* to be empty or the number of Poll CQ operations has exceeded184* CQ capacity size;185* - or186* post another WR that completes on the same CQ and wait for this187* WR to return as a WC;188* - and then invoke a Destroy QP or Reset QP.189*190* We use the second option and wait for a completion on the191* same CQ before destroying QPs attached to our SRQ.192*/193194enum ipoib_cm_state {195IPOIB_CM_RX_LIVE,196IPOIB_CM_RX_ERROR, /* Ignored by stale task */197IPOIB_CM_RX_FLUSH /* Last WQE Reached event observed */198};199200struct ipoib_cm_rx {201struct ib_cm_id *id;202struct ib_qp *qp;203struct ipoib_cm_rx_buf *rx_ring;204struct list_head list;205struct net_device *dev;206unsigned long jiffies;207enum ipoib_cm_state state;208int recv_count;209};210211struct ipoib_cm_tx {212struct ib_cm_id *id;213struct ib_qp *qp;214struct list_head list;215struct net_device *dev;216struct ipoib_neigh *neigh;217struct ipoib_path *path;218struct ipoib_cm_tx_buf *tx_ring;219unsigned tx_head;220unsigned tx_tail;221unsigned long flags;222u32 mtu;223};224225struct ipoib_cm_rx_buf {226struct sk_buff *skb;227u64 mapping[IPOIB_CM_RX_SG];228};229230struct ipoib_cm_dev_priv {231struct ib_srq *srq;232struct ipoib_cm_rx_buf *srq_ring;233struct ib_cm_id *id;234struct list_head passive_ids; /* state: LIVE */235struct list_head rx_error_list; /* state: ERROR */236struct list_head rx_flush_list; /* state: FLUSH, drain not started */237struct list_head rx_drain_list; /* state: FLUSH, drain started */238struct list_head rx_reap_list; /* state: FLUSH, drain done */239struct work_struct start_task;240struct work_struct reap_task;241struct work_struct skb_task;242struct work_struct rx_reap_task;243struct delayed_work stale_task;244struct sk_buff_head skb_queue;245struct list_head start_list;246struct list_head reap_list;247struct ib_wc ibwc[IPOIB_NUM_WC];248struct ib_sge rx_sge[IPOIB_CM_RX_SG];249struct ib_recv_wr rx_wr;250int nonsrq_conn_qp;251int max_cm_mtu;252int num_frags;253};254255struct ipoib_ethtool_st {256u16 coalesce_usecs;257u16 max_coalesced_frames;258};259260/*261* Device private locking: network stack tx_lock protects members used262* in TX fast path, lock protects everything else. lock nests inside263* of tx_lock (ie tx_lock must be acquired first if needed).264*/265struct ipoib_dev_priv {266spinlock_t lock;267268struct net_device *dev;269270struct napi_struct napi;271272unsigned long flags;273274struct mutex vlan_mutex;275276struct rb_root path_tree;277struct list_head path_list;278279struct ipoib_mcast *broadcast;280struct list_head multicast_list;281struct rb_root multicast_tree;282283struct delayed_work pkey_poll_task;284struct delayed_work mcast_task;285struct work_struct carrier_on_task;286struct work_struct flush_light;287struct work_struct flush_normal;288struct work_struct flush_heavy;289struct work_struct restart_task;290struct delayed_work ah_reap_task;291292struct ib_device *ca;293u8 port;294u16 pkey;295u16 pkey_index;296struct ib_pd *pd;297struct ib_mr *mr;298struct ib_cq *recv_cq;299struct ib_cq *send_cq;300struct ib_qp *qp;301u32 qkey;302303union ib_gid local_gid;304u16 local_lid;305306unsigned int admin_mtu;307unsigned int mcast_mtu;308unsigned int max_ib_mtu;309310struct ipoib_rx_buf *rx_ring;311312struct ipoib_tx_buf *tx_ring;313unsigned tx_head;314unsigned tx_tail;315struct ib_sge tx_sge[MAX_SKB_FRAGS + 1];316struct ib_send_wr tx_wr;317unsigned tx_outstanding;318struct ib_wc send_wc[MAX_SEND_CQE];319320struct ib_recv_wr rx_wr;321struct ib_sge rx_sge[IPOIB_UD_RX_SG];322323struct ib_wc ibwc[IPOIB_NUM_WC];324325struct list_head dead_ahs;326327struct ib_event_handler event_handler;328329struct net_device *parent;330struct list_head child_intfs;331struct list_head list;332333#ifdef CONFIG_INFINIBAND_IPOIB_CM334struct ipoib_cm_dev_priv cm;335#endif336337#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG338struct list_head fs_list;339struct dentry *mcg_dentry;340struct dentry *path_dentry;341#endif342int hca_caps;343struct ipoib_ethtool_st ethtool;344struct timer_list poll_timer;345};346347struct ipoib_ah {348struct net_device *dev;349struct ib_ah *ah;350struct list_head list;351struct kref ref;352unsigned last_send;353};354355struct ipoib_path {356struct net_device *dev;357struct ib_sa_path_rec pathrec;358struct ipoib_ah *ah;359struct sk_buff_head queue;360361struct list_head neigh_list;362363int query_id;364struct ib_sa_query *query;365struct completion done;366367struct rb_node rb_node;368struct list_head list;369int valid;370};371372struct ipoib_neigh {373struct ipoib_ah *ah;374#ifdef CONFIG_INFINIBAND_IPOIB_CM375struct ipoib_cm_tx *cm;376#endif377union ib_gid dgid;378struct sk_buff_head queue;379380struct neighbour *neighbour;381struct net_device *dev;382383struct list_head list;384};385386#define IPOIB_UD_MTU(ib_mtu) (ib_mtu - IPOIB_ENCAP_LEN)387#define IPOIB_UD_BUF_SIZE(ib_mtu) (ib_mtu + IB_GRH_BYTES)388389static inline int ipoib_ud_need_sg(unsigned int ib_mtu)390{391return IPOIB_UD_BUF_SIZE(ib_mtu) > PAGE_SIZE;392}393394/*395* We stash a pointer to our private neighbour information after our396* hardware address in neigh->ha. The ALIGN() expression here makes397* sure that this pointer is stored aligned so that an unaligned398* load is not needed to dereference it.399*/400static inline struct ipoib_neigh **to_ipoib_neigh(struct neighbour *neigh)401{402return (void*) neigh + ALIGN(offsetof(struct neighbour, ha) +403INFINIBAND_ALEN, sizeof(void *));404}405406struct ipoib_neigh *ipoib_neigh_alloc(struct neighbour *neigh,407struct net_device *dev);408void ipoib_neigh_free(struct net_device *dev, struct ipoib_neigh *neigh);409410extern struct workqueue_struct *ipoib_workqueue;411412/* functions */413414int ipoib_poll(struct napi_struct *napi, int budget);415void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr);416void ipoib_send_comp_handler(struct ib_cq *cq, void *dev_ptr);417418struct ipoib_ah *ipoib_create_ah(struct net_device *dev,419struct ib_pd *pd, struct ib_ah_attr *attr);420void ipoib_free_ah(struct kref *kref);421static inline void ipoib_put_ah(struct ipoib_ah *ah)422{423kref_put(&ah->ref, ipoib_free_ah);424}425426int ipoib_open(struct net_device *dev);427int ipoib_add_pkey_attr(struct net_device *dev);428int ipoib_add_umcast_attr(struct net_device *dev);429430void ipoib_send(struct net_device *dev, struct sk_buff *skb,431struct ipoib_ah *address, u32 qpn);432void ipoib_reap_ah(struct work_struct *work);433434void ipoib_mark_paths_invalid(struct net_device *dev);435void ipoib_flush_paths(struct net_device *dev);436struct ipoib_dev_priv *ipoib_intf_alloc(const char *format);437438int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port);439void ipoib_ib_dev_flush_light(struct work_struct *work);440void ipoib_ib_dev_flush_normal(struct work_struct *work);441void ipoib_ib_dev_flush_heavy(struct work_struct *work);442void ipoib_pkey_event(struct work_struct *work);443void ipoib_ib_dev_cleanup(struct net_device *dev);444445int ipoib_ib_dev_open(struct net_device *dev);446int ipoib_ib_dev_up(struct net_device *dev);447int ipoib_ib_dev_down(struct net_device *dev, int flush);448int ipoib_ib_dev_stop(struct net_device *dev, int flush);449450int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port);451void ipoib_dev_cleanup(struct net_device *dev);452453void ipoib_mcast_join_task(struct work_struct *work);454void ipoib_mcast_carrier_on_task(struct work_struct *work);455void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb);456457void ipoib_mcast_restart_task(struct work_struct *work);458int ipoib_mcast_start_thread(struct net_device *dev);459int ipoib_mcast_stop_thread(struct net_device *dev, int flush);460461void ipoib_mcast_dev_down(struct net_device *dev);462void ipoib_mcast_dev_flush(struct net_device *dev);463464#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG465struct ipoib_mcast_iter *ipoib_mcast_iter_init(struct net_device *dev);466int ipoib_mcast_iter_next(struct ipoib_mcast_iter *iter);467void ipoib_mcast_iter_read(struct ipoib_mcast_iter *iter,468union ib_gid *gid,469unsigned long *created,470unsigned int *queuelen,471unsigned int *complete,472unsigned int *send_only);473474struct ipoib_path_iter *ipoib_path_iter_init(struct net_device *dev);475int ipoib_path_iter_next(struct ipoib_path_iter *iter);476void ipoib_path_iter_read(struct ipoib_path_iter *iter,477struct ipoib_path *path);478#endif479480int ipoib_mcast_attach(struct net_device *dev, u16 mlid,481union ib_gid *mgid, int set_qkey);482483int ipoib_init_qp(struct net_device *dev);484int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca);485void ipoib_transport_dev_cleanup(struct net_device *dev);486487void ipoib_event(struct ib_event_handler *handler,488struct ib_event *record);489490int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey);491int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey);492493void ipoib_pkey_poll(struct work_struct *work);494int ipoib_pkey_dev_delay_open(struct net_device *dev);495void ipoib_drain_cq(struct net_device *dev);496497void ipoib_set_ethtool_ops(struct net_device *dev);498int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca);499500#ifdef CONFIG_INFINIBAND_IPOIB_CM501502#define IPOIB_FLAGS_RC 0x80503#define IPOIB_FLAGS_UC 0x40504505/* We don't support UC connections at the moment */506#define IPOIB_CM_SUPPORTED(ha) (ha[0] & (IPOIB_FLAGS_RC))507508extern int ipoib_max_conn_qp;509510static inline int ipoib_cm_admin_enabled(struct net_device *dev)511{512struct ipoib_dev_priv *priv = netdev_priv(dev);513return IPOIB_CM_SUPPORTED(dev->dev_addr) &&514test_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags);515}516517static inline int ipoib_cm_enabled(struct net_device *dev, struct neighbour *n)518{519struct ipoib_dev_priv *priv = netdev_priv(dev);520return IPOIB_CM_SUPPORTED(n->ha) &&521test_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags);522}523524static inline int ipoib_cm_up(struct ipoib_neigh *neigh)525526{527return test_bit(IPOIB_FLAG_OPER_UP, &neigh->cm->flags);528}529530static inline struct ipoib_cm_tx *ipoib_cm_get(struct ipoib_neigh *neigh)531{532return neigh->cm;533}534535static inline void ipoib_cm_set(struct ipoib_neigh *neigh, struct ipoib_cm_tx *tx)536{537neigh->cm = tx;538}539540static inline int ipoib_cm_has_srq(struct net_device *dev)541{542struct ipoib_dev_priv *priv = netdev_priv(dev);543return !!priv->cm.srq;544}545546static inline unsigned int ipoib_cm_max_mtu(struct net_device *dev)547{548struct ipoib_dev_priv *priv = netdev_priv(dev);549return priv->cm.max_cm_mtu;550}551552void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx);553int ipoib_cm_dev_open(struct net_device *dev);554void ipoib_cm_dev_stop(struct net_device *dev);555int ipoib_cm_dev_init(struct net_device *dev);556int ipoib_cm_add_mode_attr(struct net_device *dev);557void ipoib_cm_dev_cleanup(struct net_device *dev);558struct ipoib_cm_tx *ipoib_cm_create_tx(struct net_device *dev, struct ipoib_path *path,559struct ipoib_neigh *neigh);560void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx);561void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,562unsigned int mtu);563void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc);564void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc);565#else566567struct ipoib_cm_tx;568569#define ipoib_max_conn_qp 0570571static inline int ipoib_cm_admin_enabled(struct net_device *dev)572{573return 0;574}575static inline int ipoib_cm_enabled(struct net_device *dev, struct neighbour *n)576577{578return 0;579}580581static inline int ipoib_cm_up(struct ipoib_neigh *neigh)582583{584return 0;585}586587static inline struct ipoib_cm_tx *ipoib_cm_get(struct ipoib_neigh *neigh)588{589return NULL;590}591592static inline void ipoib_cm_set(struct ipoib_neigh *neigh, struct ipoib_cm_tx *tx)593{594}595596static inline int ipoib_cm_has_srq(struct net_device *dev)597{598return 0;599}600601static inline unsigned int ipoib_cm_max_mtu(struct net_device *dev)602{603return 0;604}605606static inline607void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx)608{609return;610}611612static inline613int ipoib_cm_dev_open(struct net_device *dev)614{615return 0;616}617618static inline619void ipoib_cm_dev_stop(struct net_device *dev)620{621return;622}623624static inline625int ipoib_cm_dev_init(struct net_device *dev)626{627return -ENOSYS;628}629630static inline631void ipoib_cm_dev_cleanup(struct net_device *dev)632{633return;634}635636static inline637struct ipoib_cm_tx *ipoib_cm_create_tx(struct net_device *dev, struct ipoib_path *path,638struct ipoib_neigh *neigh)639{640return NULL;641}642643static inline644void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx)645{646return;647}648649static inline650int ipoib_cm_add_mode_attr(struct net_device *dev)651{652return 0;653}654655static inline void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,656unsigned int mtu)657{658dev_kfree_skb_any(skb);659}660661static inline void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)662{663}664665static inline void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)666{667}668#endif669670#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG671void ipoib_create_debug_files(struct net_device *dev);672void ipoib_delete_debug_files(struct net_device *dev);673int ipoib_register_debugfs(void);674void ipoib_unregister_debugfs(void);675#else676static inline void ipoib_create_debug_files(struct net_device *dev) { }677static inline void ipoib_delete_debug_files(struct net_device *dev) { }678static inline int ipoib_register_debugfs(void) { return 0; }679static inline void ipoib_unregister_debugfs(void) { }680#endif681682#define ipoib_printk(level, priv, format, arg...) \683printk(level "%s: " format, ((struct ipoib_dev_priv *) priv)->dev->name , ## arg)684#define ipoib_warn(priv, format, arg...) \685ipoib_printk(KERN_WARNING, priv, format , ## arg)686687extern int ipoib_sendq_size;688extern int ipoib_recvq_size;689690extern struct ib_sa_client ipoib_sa_client;691692#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG693extern int ipoib_debug_level;694695#define ipoib_dbg(priv, format, arg...) \696do { \697if (ipoib_debug_level > 0) \698ipoib_printk(KERN_DEBUG, priv, format , ## arg); \699} while (0)700#define ipoib_dbg_mcast(priv, format, arg...) \701do { \702if (mcast_debug_level > 0) \703ipoib_printk(KERN_DEBUG, priv, format , ## arg); \704} while (0)705#else /* CONFIG_INFINIBAND_IPOIB_DEBUG */706#define ipoib_dbg(priv, format, arg...) \707do { (void) (priv); } while (0)708#define ipoib_dbg_mcast(priv, format, arg...) \709do { (void) (priv); } while (0)710#endif /* CONFIG_INFINIBAND_IPOIB_DEBUG */711712#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA713#define ipoib_dbg_data(priv, format, arg...) \714do { \715if (data_debug_level > 0) \716ipoib_printk(KERN_DEBUG, priv, format , ## arg); \717} while (0)718#else /* CONFIG_INFINIBAND_IPOIB_DEBUG_DATA */719#define ipoib_dbg_data(priv, format, arg...) \720do { (void) (priv); } while (0)721#endif /* CONFIG_INFINIBAND_IPOIB_DEBUG_DATA */722723#define IPOIB_QPN(ha) (be32_to_cpup((__be32 *) ha) & 0xffffff)724725#endif /* _IPOIB_H */726727728