Lines Matching refs:pkt
13 static int check_type_state(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, in check_type_state() argument
21 pkt_type = pkt->opcode & 0xe0; in check_type_state()
41 if (pkt->mask & RXE_REQ_MASK) { in check_type_state()
67 static int check_keys(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, in check_keys() argument
71 u16 pkey = bth_pkey(pkt); in check_keys()
73 pkt->pkey_index = 0; in check_keys()
83 if (unlikely(deth_qkey(pkt) != qkey)) { in check_keys()
92 static int check_addr(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, in check_addr() argument
95 struct sk_buff *skb = PKT_TO_SKB(pkt); in check_addr()
100 if (unlikely(pkt->port_num != qp->attr.port_num)) in check_addr()
127 static int hdr_check(struct rxe_pkt_info *pkt) in hdr_check() argument
129 struct rxe_dev *rxe = pkt->rxe; in hdr_check()
132 u32 qpn = bth_qpn(pkt); in hdr_check()
136 if (unlikely(bth_tver(pkt) != BTH_TVER)) in hdr_check()
149 err = check_type_state(rxe, pkt, qp); in hdr_check()
153 err = check_addr(rxe, pkt, qp); in hdr_check()
157 err = check_keys(rxe, pkt, qpn, qp); in hdr_check()
161 if (unlikely((pkt->mask & RXE_GRH_MASK) == 0)) in hdr_check()
165 pkt->qp = qp; in hdr_check()
174 static inline void rxe_rcv_pkt(struct rxe_pkt_info *pkt, struct sk_buff *skb) in rxe_rcv_pkt() argument
176 if (pkt->mask & RXE_REQ_MASK) in rxe_rcv_pkt()
177 rxe_resp_queue_pkt(pkt->qp, skb); in rxe_rcv_pkt()
179 rxe_comp_queue_pkt(pkt->qp, skb); in rxe_rcv_pkt()
184 struct rxe_pkt_info *pkt = SKB_TO_PKT(skb); in rxe_rcv_mcast_pkt() local
213 err = check_type_state(rxe, pkt, qp); in rxe_rcv_mcast_pkt()
217 err = check_keys(rxe, pkt, bth_qpn(pkt), qp); in rxe_rcv_mcast_pkt()
243 pkt->qp = qp; in rxe_rcv_mcast_pkt()
245 rxe_rcv_pkt(pkt, skb); in rxe_rcv_mcast_pkt()
278 struct rxe_pkt_info *pkt = SKB_TO_PKT(skb); in rxe_chk_dgid() local
283 if (pkt->mask & RXE_LOOPBACK_MASK) in rxe_chk_dgid()
311 struct rxe_pkt_info *pkt = SKB_TO_PKT(skb); in rxe_rcv() local
312 struct rxe_dev *rxe = pkt->rxe; in rxe_rcv()
320 pkt->opcode = bth_opcode(pkt); in rxe_rcv()
321 pkt->psn = bth_psn(pkt); in rxe_rcv()
322 pkt->qp = NULL; in rxe_rcv()
323 pkt->mask |= rxe_opcode[pkt->opcode].mask; in rxe_rcv()
325 if (unlikely(skb->len < header_size(pkt))) in rxe_rcv()
328 err = hdr_check(pkt); in rxe_rcv()
332 err = rxe_icrc_check(skb, pkt); in rxe_rcv()
338 if (unlikely(bth_qpn(pkt) == IB_MULTICAST_QPN)) in rxe_rcv()
341 rxe_rcv_pkt(pkt, skb); in rxe_rcv()
346 if (pkt->qp) in rxe_rcv()
347 rxe_put(pkt->qp); in rxe_rcv()