Lines Matching refs:pkt
13 static int check_type_state(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, in check_type_state() argument
22 pkt_type = pkt->opcode & 0xe0; in check_type_state()
43 if (pkt->mask & RXE_REQ_MASK) { in check_type_state()
75 static int check_keys(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, in check_keys() argument
79 u16 pkey = bth_pkey(pkt); in check_keys()
81 pkt->pkey_index = 0; in check_keys()
91 if (unlikely(deth_qkey(pkt) != qkey)) { in check_keys()
100 static int check_addr(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, in check_addr() argument
103 struct sk_buff *skb = PKT_TO_SKB(pkt); in check_addr()
108 if (unlikely(pkt->port_num != qp->attr.port_num)) in check_addr()
135 static int hdr_check(struct rxe_pkt_info *pkt) in hdr_check() argument
137 struct rxe_dev *rxe = pkt->rxe; in hdr_check()
140 u32 qpn = bth_qpn(pkt); in hdr_check()
144 if (unlikely(bth_tver(pkt) != BTH_TVER)) in hdr_check()
157 err = check_type_state(rxe, pkt, qp); in hdr_check()
161 err = check_addr(rxe, pkt, qp); in hdr_check()
165 err = check_keys(rxe, pkt, qpn, qp); in hdr_check()
169 if (unlikely((pkt->mask & RXE_GRH_MASK) == 0)) in hdr_check()
173 pkt->qp = qp; in hdr_check()
182 static inline void rxe_rcv_pkt(struct rxe_pkt_info *pkt, struct sk_buff *skb) in rxe_rcv_pkt() argument
184 if (pkt->mask & RXE_REQ_MASK) in rxe_rcv_pkt()
185 rxe_resp_queue_pkt(pkt->qp, skb); in rxe_rcv_pkt()
187 rxe_comp_queue_pkt(pkt->qp, skb); in rxe_rcv_pkt()
192 struct rxe_pkt_info *pkt = SKB_TO_PKT(skb); in rxe_rcv_mcast_pkt() local
221 err = check_type_state(rxe, pkt, qp); in rxe_rcv_mcast_pkt()
225 err = check_keys(rxe, pkt, bth_qpn(pkt), qp); in rxe_rcv_mcast_pkt()
251 pkt->qp = qp; in rxe_rcv_mcast_pkt()
253 rxe_rcv_pkt(pkt, skb); in rxe_rcv_mcast_pkt()
286 struct rxe_pkt_info *pkt = SKB_TO_PKT(skb); in rxe_chk_dgid() local
291 if (pkt->mask & RXE_LOOPBACK_MASK) in rxe_chk_dgid()
319 struct rxe_pkt_info *pkt = SKB_TO_PKT(skb); in rxe_rcv() local
320 struct rxe_dev *rxe = pkt->rxe; in rxe_rcv()
328 pkt->opcode = bth_opcode(pkt); in rxe_rcv()
329 pkt->psn = bth_psn(pkt); in rxe_rcv()
330 pkt->qp = NULL; in rxe_rcv()
331 pkt->mask |= rxe_opcode[pkt->opcode].mask; in rxe_rcv()
333 if (unlikely(skb->len < header_size(pkt))) in rxe_rcv()
336 err = hdr_check(pkt); in rxe_rcv()
340 err = rxe_icrc_check(skb, pkt); in rxe_rcv()
346 if (unlikely(bth_qpn(pkt) == IB_MULTICAST_QPN)) in rxe_rcv()
349 rxe_rcv_pkt(pkt, skb); in rxe_rcv()
354 if (pkt->qp) in rxe_rcv()
355 rxe_put(pkt->qp); in rxe_rcv()