/* * hfi1 specific data structures that will be hidden from rvt after the queue * pair is made common
*/ struct hfi1_qp_priv { struct hfi1_ahg_info *s_ahg; /* ahg info for next header */ struct sdma_engine *s_sde; /* current sde */ struct send_context *s_sendcontext; /* current sendcontext */ struct hfi1_ctxtdata *rcd; /* QP's receive context */ struct page **pages; /* for TID page scan */
u32 tid_enqueue; /* saved when tid waited */
u8 s_sc; /* SC[0..4] for next packet */ struct iowait s_iowait; struct timer_list s_tid_timer; /* for timing tid wait */ struct timer_list s_tid_retry_timer; /* for timing tid ack */ struct list_head tid_wait; /* for queueing tid space */ struct hfi1_opfn_data opfn; struct tid_flow_state flow_state; struct tid_rdma_qp_params tid_rdma; struct rvt_qp *owner;
u16 s_running_pkt_size;
u8 hdr_type; /* 9B or 16B */ struct rvt_sge_state tid_ss; /* SGE state pointer for 2nd leg */
atomic_t n_requests; /* # of TID RDMA requests in the */ /* queue */
atomic_t n_tid_requests; /* # of sent TID RDMA requests */ unsignedlong tid_timer_timeout_jiffies; unsignedlong tid_retry_timeout_jiffies;
/* variables for the TID RDMA SE state machine */
u8 s_state;
u8 s_retry;
u8 rnr_nak_state; /* RNR NAK state */
u8 s_nak_state;
u32 s_nak_psn;
u32 s_flags;
u32 s_tid_cur;
u32 s_tid_head;
u32 s_tid_tail;
u32 r_tid_head; /* Most recently added TID RDMA request */
u32 r_tid_tail; /* the last completed TID RDMA request */
u32 r_tid_ack; /* the TID RDMA request to be ACK'ed */
u32 r_tid_alloc; /* Request for which we are allocating resources */
u32 pending_tid_w_segs; /* Num of pending tid write segments */
u32 pending_tid_w_resp; /* Num of pending tid write responses */
u32 alloc_w_segs; /* Number of segments for which write */ /* resources have been allocated for this QP */
/* For TID RDMA READ */
u32 tid_r_reqs; /* Num of tid reads requested */
u32 tid_r_comp; /* Num of tid reads completed */
u32 pending_tid_r_segs; /* Num of pending tid read segments */
u16 pkts_ps; /* packets per segment */
u8 timeout_shift; /* account for number of packets per segment */
u32 r_next_psn_kdeth;
u32 r_next_psn_kdeth_save;
u32 s_resync_psn;
u8 sync_pt; /* Set when QP reaches sync point */
u8 resync;
};
#define HFI1_QP_WQE_INVALID ((u32)-1)
struct hfi1_swqe_priv { struct tid_rdma_request tid_req; struct rvt_sge_state ss; /* Used for TID RDMA READ Request */
};
struct hfi1_ack_priv { struct rvt_sge_state ss; /* used for TID WRITE RESP */ struct tid_rdma_request tid_req;
};
/* * This structure is used to hold commonly lookedup and computed values during * the send engine progress.
*/ struct iowait_work; struct hfi1_pkt_state { struct hfi1_ibdev *dev; struct hfi1_ibport *ibp; struct hfi1_pportdata *ppd; struct verbs_txreq *s_txreq; struct iowait_work *wait; unsignedlong flags; unsignedlong timeout; unsignedlong timeout_int; int cpu;
u8 opcode; bool in_thread; bool pkts_sent;
};
#define HFI1_PSN_CREDIT 16
struct hfi1_opcode_stats {
u64 n_packets; /* number of packets */
u64 n_bytes; /* total number of bytes */
};
/* * This must be called with s_lock held.
*/ void hfi1_bad_pkey(struct hfi1_ibport *ibp, u32 key, u32 sl,
u32 qp1, u32 qp2, u32 lid1, u32 lid2); void hfi1_cap_mask_chg(struct rvt_dev_info *rdi, u32 port_num); void hfi1_sys_guid_chg(struct hfi1_ibport *ibp); void hfi1_node_desc_chg(struct hfi1_ibport *ibp); int hfi1_process_mad(struct ib_device *ibdev, int mad_flags, u32 port, conststruct ib_wc *in_wc, conststruct ib_grh *in_grh, conststruct ib_mad *in_mad, struct ib_mad *out_mad,
size_t *out_mad_size, u16 *out_mad_pkey_index);
/* * The PSN_MASK and PSN_SHIFT allow for * 1) comparing two PSNs * 2) returning the PSN with any upper bits masked * 3) returning the difference between to PSNs * * The number of significant bits in the PSN must * necessarily be at least one bit less than * the container holding the PSN.
*/ #define PSN_MASK 0x7FFFFFFF #define PSN_SHIFT 1 #define PSN_MODIFY_MASK 0xFFFFFF
/* * Compare two PSNs * Returns an integer <, ==, or > than zero.
*/ staticinlineint cmp_psn(u32 a, u32 b)
{ return (((int)a) - ((int)b)) << PSN_SHIFT;
}
/* * Return masked PSN
*/ staticinline u32 mask_psn(u32 a)
{ return a & PSN_MASK;
}
/* * Return delta between two PSNs
*/ staticinline u32 delta_psn(u32 a, u32 b)
{ return (((int)a - (int)b) << PSN_SHIFT) >> PSN_SHIFT;
}
/* * Look through all the active flows for a TID RDMA request and find * the one (if it exists) that contains the specified PSN.
*/ staticinline u32 __full_flow_psn(struct flow_state *state, u32 psn)
{ return mask_psn((state->generation << HFI1_KDETH_BTH_SEQ_SHIFT) |
(psn & HFI1_KDETH_BTH_SEQ_MASK));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.