rc.c (3a485c2be49dde899e506684bb5f06d5b3f73e82) | rc.c (d61ea0751aa097182291c7ceed447bc73e020109) |
---|---|
1/* 2 * Copyright(c) 2015, 2016 Intel Corporation. 3 * 4 * This file is provided under a dual BSD/GPLv2 license. When using or 5 * redistributing this file, you may do so under either license. 6 * 7 * GPL LICENSE SUMMARY 8 * --- 262 unchanged lines hidden (view full) --- 271 int middle = 0; 272 int delta; 273 274 lockdep_assert_held(&qp->s_lock); 275 ps->s_txreq = get_txreq(ps->dev, qp); 276 if (IS_ERR(ps->s_txreq)) 277 goto bail_no_tx; 278 | 1/* 2 * Copyright(c) 2015, 2016 Intel Corporation. 3 * 4 * This file is provided under a dual BSD/GPLv2 license. When using or 5 * redistributing this file, you may do so under either license. 6 * 7 * GPL LICENSE SUMMARY 8 * --- 262 unchanged lines hidden (view full) --- 271 int middle = 0; 272 int delta; 273 274 lockdep_assert_held(&qp->s_lock); 275 ps->s_txreq = get_txreq(ps->dev, qp); 276 if (IS_ERR(ps->s_txreq)) 277 goto bail_no_tx; 278 |
279 ps->s_txreq->phdr.hdr.hdr_type = priv->hdr_type; | |
280 if (priv->hdr_type == HFI1_PKT_TYPE_9B) { 281 /* header size in 32-bit words LRH+BTH = (8+12)/4. */ 282 hwords = 5; 283 if (rdma_ah_get_ah_flags(&qp->remote_ah_attr) & IB_AH_GRH) 284 ohdr = &ps->s_txreq->phdr.hdr.ibh.u.l.oth; 285 else 286 ohdr = &ps->s_txreq->phdr.hdr.ibh.u.oth; 287 } else { --- 1673 unchanged lines hidden (view full) --- 1961 if (ppd->cc_log_idx == OPA_CONG_LOG_ELEMS) 1962 ppd->cc_log_idx = 0; 1963 cc_event->lqpn = lqpn & RVT_QPN_MASK; 1964 cc_event->rqpn = rqpn & RVT_QPN_MASK; 1965 cc_event->sl = sl; 1966 cc_event->svc_type = svc_type; 1967 cc_event->rlid = rlid; 1968 /* keep timestamp in units of 1.024 usec */ | 279 if (priv->hdr_type == HFI1_PKT_TYPE_9B) { 280 /* header size in 32-bit words LRH+BTH = (8+12)/4. */ 281 hwords = 5; 282 if (rdma_ah_get_ah_flags(&qp->remote_ah_attr) & IB_AH_GRH) 283 ohdr = &ps->s_txreq->phdr.hdr.ibh.u.l.oth; 284 else 285 ohdr = &ps->s_txreq->phdr.hdr.ibh.u.oth; 286 } else { --- 1673 unchanged lines hidden (view full) --- 1960 if (ppd->cc_log_idx == OPA_CONG_LOG_ELEMS) 1961 ppd->cc_log_idx = 0; 1962 cc_event->lqpn = lqpn & RVT_QPN_MASK; 1963 cc_event->rqpn = rqpn & RVT_QPN_MASK; 1964 cc_event->sl = sl; 1965 cc_event->svc_type = svc_type; 1966 cc_event->rlid = rlid; 1967 /* keep timestamp in units of 1.024 usec */ |
1969 cc_event->timestamp = ktime_to_ns(ktime_get()) / 1024; | 1968 cc_event->timestamp = ktime_get_ns() / 1024; |
1970 1971 spin_unlock_irqrestore(&ppd->cc_log_lock, flags); 1972} 1973 1974void process_becn(struct hfi1_pportdata *ppd, u8 sl, u32 rlid, u32 lqpn, 1975 u32 rqpn, u8 svc_type) 1976{ 1977 struct cca_timer *cca_timer; --- 192 unchanged lines hidden (view full) --- 2170 goto nack_op_err; 2171 if (!ret) 2172 goto rnr_nak; 2173 qp->r_rcv_len = 0; 2174 if (opcode == OP(SEND_ONLY)) 2175 goto no_immediate_data; 2176 if (opcode == OP(SEND_ONLY_WITH_INVALIDATE)) 2177 goto send_last_inv; | 1969 1970 spin_unlock_irqrestore(&ppd->cc_log_lock, flags); 1971} 1972 1973void process_becn(struct hfi1_pportdata *ppd, u8 sl, u32 rlid, u32 lqpn, 1974 u32 rqpn, u8 svc_type) 1975{ 1976 struct cca_timer *cca_timer; --- 192 unchanged lines hidden (view full) --- 2169 goto nack_op_err; 2170 if (!ret) 2171 goto rnr_nak; 2172 qp->r_rcv_len = 0; 2173 if (opcode == OP(SEND_ONLY)) 2174 goto no_immediate_data; 2175 if (opcode == OP(SEND_ONLY_WITH_INVALIDATE)) 2176 goto send_last_inv; |
2178 /* FALLTHROUGH for SEND_ONLY_WITH_IMMEDIATE */ | 2177 /* FALLTHROUGH -- for SEND_ONLY_WITH_IMMEDIATE */ |
2179 case OP(SEND_LAST_WITH_IMMEDIATE): 2180send_last_imm: 2181 wc.ex.imm_data = ohdr->u.imm_data; 2182 wc.wc_flags = IB_WC_WITH_IMM; 2183 goto send_last; 2184 case OP(SEND_LAST_WITH_INVALIDATE): 2185send_last_inv: 2186 rkey = be32_to_cpu(ohdr->u.ieth); --- 339 unchanged lines hidden --- | 2178 case OP(SEND_LAST_WITH_IMMEDIATE): 2179send_last_imm: 2180 wc.ex.imm_data = ohdr->u.imm_data; 2181 wc.wc_flags = IB_WC_WITH_IMM; 2182 goto send_last; 2183 case OP(SEND_LAST_WITH_INVALIDATE): 2184send_last_inv: 2185 rkey = be32_to_cpu(ohdr->u.ieth); --- 339 unchanged lines hidden --- |