| /linux-6.15/drivers/infiniband/sw/rxe/ |
| H A D | rxe.c | 84 rxe->raw_gid); in rxe_init_device_param() 142 rxe->raw_gid); in rxe_init_ports() 149 rxe_pool_init(rxe, &rxe->uc_pool, RXE_TYPE_UC); in rxe_init_pools() 150 rxe_pool_init(rxe, &rxe->pd_pool, RXE_TYPE_PD); in rxe_init_pools() 151 rxe_pool_init(rxe, &rxe->ah_pool, RXE_TYPE_AH); in rxe_init_pools() 152 rxe_pool_init(rxe, &rxe->srq_pool, RXE_TYPE_SRQ); in rxe_init_pools() 153 rxe_pool_init(rxe, &rxe->qp_pool, RXE_TYPE_QP); in rxe_init_pools() 154 rxe_pool_init(rxe, &rxe->cq_pool, RXE_TYPE_CQ); in rxe_init_pools() 155 rxe_pool_init(rxe, &rxe->mr_pool, RXE_TYPE_MR); in rxe_init_pools() 156 rxe_pool_init(rxe, &rxe->mw_pool, RXE_TYPE_MW); in rxe_init_pools() [all …]
|
| H A D | rxe_mcast.c | 165 spin_lock_bh(&rxe->mcg_lock); in rxe_lookup_mcg() 186 mcg->rxe = rxe; in __rxe_init_mcg() 220 if (atomic_inc_return(&rxe->mcg_num) > rxe->attr.max_mcast_grp) { in rxe_get_mcg() 232 spin_lock_bh(&rxe->mcg_lock); in rxe_get_mcg() 237 atomic_dec(&rxe->mcg_num); in rxe_get_mcg() 252 atomic_dec(&rxe->mcg_num); in rxe_get_mcg() 276 struct rxe_dev *rxe = mcg->rxe; in __rxe_destroy_mcg() local 282 atomic_dec(&rxe->mcg_num); in __rxe_destroy_mcg() 351 struct rxe_dev *rxe = mcg->rxe; in rxe_attach_mcg() local 356 spin_lock_bh(&rxe->mcg_lock); in rxe_attach_mcg() [all …]
|
| H A D | rxe_mmap.c | 22 spin_lock_bh(&rxe->pending_lock); in rxe_mmap_release() 27 spin_unlock_bh(&rxe->pending_lock); in rxe_mmap_release() 75 spin_lock_bh(&rxe->pending_lock); in rxe_mmap() 83 spin_unlock_bh(&rxe->pending_lock); in rxe_mmap() 91 spin_unlock_bh(&rxe->pending_lock); in rxe_mmap() 97 spin_unlock_bh(&rxe->pending_lock); in rxe_mmap() 129 spin_lock_bh(&rxe->mmap_offset_lock); in rxe_create_mmap_info() 131 if (rxe->mmap_offset == 0) in rxe_create_mmap_info() 134 ip->info.offset = rxe->mmap_offset; in rxe_create_mmap_info() 135 rxe->mmap_offset += ALIGN(size, SHMLBA); in rxe_create_mmap_info() [all …]
|
| H A D | rxe_net.c | 137 struct rxe_dev *rxe; in rxe_udp_encap_recv() local 147 if (!rxe) in rxe_udp_encap_recv() 156 pkt->rxe = rxe; in rxe_udp_encap_recv() 349 struct rxe_dev *rxe; in rxe_skb_tx_dtor() local 357 if (WARN_ON(!rxe)) in rxe_skb_tx_dtor() 511 pkt->rxe = rxe; in rxe_init_packet() 545 if (!rxe) in rxe_net_add() 564 ev.device = &rxe->ib_dev; in rxe_port_event() 595 rxe_port_up(rxe); in rxe_set_port_state() 597 rxe_port_down(rxe); in rxe_set_port_state() [all …]
|
| H A D | rxe_recv.c | 78 struct rxe_port *port = &rxe->port; in check_keys() 137 struct rxe_dev *rxe = pkt->rxe; in hdr_check() local 161 err = check_addr(rxe, pkt, qp); in hdr_check() 206 mcg = rxe_lookup_mcg(rxe, &dgid); in rxe_rcv_mcast_pkt() 210 spin_lock_bh(&rxe->mcg_lock); in rxe_rcv_mcast_pkt() 258 spin_unlock_bh(&rxe->mcg_lock); in rxe_rcv_mcast_pkt() 271 ib_device_put(&rxe->ib_dev); in rxe_rcv_mcast_pkt() 320 struct rxe_dev *rxe = pkt->rxe; in rxe_rcv() local 325 if (rxe_chk_dgid(rxe, skb) < 0) in rxe_rcv() 347 rxe_rcv_mcast_pkt(rxe, skb); in rxe_rcv() [all …]
|
| H A D | rxe_verbs.c | 22 struct rxe_dev *rxe = to_rdev(ibdev); in rxe_query_device() local 26 rxe_dbg_dev(rxe, "malformed udata\n"); in rxe_query_device() 43 struct rxe_dev *rxe = to_rdev(ibdev); in rxe_query_port() local 61 mutex_lock(&rxe->usdev_lock); in rxe_query_port() 73 mutex_unlock(&rxe->usdev_lock); in rxe_query_port() 132 memcpy(rxe->ib_dev.node_desc, in rxe_modify_device() 163 port = &rxe->port; in rxe_modify_port() 582 err = rxe_qp_chk_init(rxe, init); in rxe_create_qp() 1431 struct rxe_dev *rxe = in parent_show() local 1457 rxe_set_port_state(rxe); in rxe_enable_driver() [all …]
|
| H A D | rxe_srq.c | 15 if (attr->max_wr > rxe->attr.max_srq_wr) { in rxe_srq_chk_init() 16 rxe_dbg_dev(rxe, "max_wr(%d) > max_srq_wr(%d)\n", in rxe_srq_chk_init() 17 attr->max_wr, rxe->attr.max_srq_wr); in rxe_srq_chk_init() 22 rxe_dbg_dev(rxe, "max_wr(%d) <= 0\n", attr->max_wr); in rxe_srq_chk_init() 29 if (attr->max_sge > rxe->attr.max_srq_sge) { in rxe_srq_chk_init() 30 rxe_dbg_dev(rxe, "max_sge(%d) > max_srq_sge(%d)\n", in rxe_srq_chk_init() 31 attr->max_sge, rxe->attr.max_srq_sge); in rxe_srq_chk_init() 109 if (attr->max_wr > rxe->attr.max_srq_wr) { in rxe_srq_chk_attr() 111 attr->max_wr, rxe->attr.max_srq_wr); in rxe_srq_chk_attr() 131 if (attr->srq_limit > rxe->attr.max_srq_wr) { in rxe_srq_chk_attr() [all …]
|
| H A D | rxe_qp.c | 21 if (cap->max_send_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap() 23 cap->max_send_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap() 29 cap->max_send_sge, rxe->attr.max_send_sge); in rxe_qp_chk_cap() 36 cap->max_recv_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap() 76 rxe_dbg_dev(rxe, "missing cq\n"); in rxe_qp_chk_init() 80 if (rxe_qp_chk_cap(rxe, cap, !!init->srq)) in rxe_qp_chk_init() 89 port = &rxe->port; in rxe_qp_chk_init() 159 port = &rxe->port; in rxe_qp_init_misc() 374 rxe_qp_init_misc(rxe, qp, init); in rxe_qp_from_init() 476 struct rxe_port *port = &rxe->port; in rxe_qp_chk_attr() [all …]
|
| H A D | rxe_cq.c | 11 int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq, in rxe_cq_chk_attr() argument 17 rxe_dbg_dev(rxe, "cqe(%d) <= 0\n", cqe); in rxe_cq_chk_attr() 21 if (cqe > rxe->attr.max_cqe) { in rxe_cq_chk_attr() 22 rxe_dbg_dev(rxe, "cqe(%d) > max_cqe(%d)\n", in rxe_cq_chk_attr() 23 cqe, rxe->attr.max_cqe); in rxe_cq_chk_attr() 42 int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, in rxe_cq_from_init() argument 50 cq->queue = rxe_queue_init(rxe, &cqe, in rxe_cq_from_init() 53 rxe_dbg_dev(rxe, "unable to create cq\n"); in rxe_cq_from_init() 57 err = do_mmap_info(rxe, uresp ? &uresp->mi : NULL, udata, in rxe_cq_from_init()
|
| H A D | rxe_loc.h | 21 int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq, 24 int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, 37 struct rxe_mcg *rxe_lookup_mcg(struct rxe_dev *rxe, union ib_gid *mgid); 63 int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, 96 struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av, 105 int rxe_qp_chk_init(struct rxe_dev *rxe, struct ib_qp_init_attr *init); 111 int rxe_qp_chk_attr(struct rxe_dev *rxe, struct rxe_qp *qp, 163 int rxe_srq_from_init(struct rxe_dev *rxe, struct rxe_srq *srq, 166 int rxe_srq_chk_attr(struct rxe_dev *rxe, struct rxe_srq *srq, 168 int rxe_srq_from_attr(struct rxe_dev *rxe, struct rxe_srq *srq, [all …]
|
| H A D | rxe_queue.c | 12 int do_mmap_info(struct rxe_dev *rxe, struct mminfo __user *outbuf, in do_mmap_info() argument 20 ip = rxe_create_mmap_info(rxe, buf_size, udata, buf); in do_mmap_info() 31 spin_lock_bh(&rxe->pending_lock); in do_mmap_info() 32 list_add(&ip->pending_mmaps, &rxe->pending_mmaps); in do_mmap_info() 33 spin_unlock_bh(&rxe->pending_lock); in do_mmap_info() 55 struct rxe_queue *rxe_queue_init(struct rxe_dev *rxe, int *num_elem, in rxe_queue_init() argument 70 q->rxe = rxe; in rxe_queue_init() 158 new_q = rxe_queue_init(q->rxe, &num_elem, elem_size, q->type); in rxe_queue_resize() 162 err = do_mmap_info(new_q->rxe, outbuf, udata, new_q->buf, in rxe_queue_resize()
|
| H A D | rxe.h | 41 #define rxe_dbg_dev(rxe, fmt, ...) ibdev_dbg(&(rxe)->ib_dev, \ argument 62 #define rxe_err_dev(rxe, fmt, ...) ibdev_err_ratelimited(&(rxe)->ib_dev, \ argument 83 #define rxe_info_dev(rxe, fmt, ...) ibdev_info_ratelimited(&(rxe)->ib_dev, \ argument 102 void rxe_set_mtu(struct rxe_dev *rxe, unsigned int dev_mtu); 104 int rxe_add(struct rxe_dev *rxe, unsigned int mtu, const char *ibdev_name, 120 void rxe_port_up(struct rxe_dev *rxe); 121 void rxe_port_down(struct rxe_dev *rxe); 122 void rxe_set_port_state(struct rxe_dev *rxe);
|
| H A D | rxe_mw.c | 20 struct rxe_dev *rxe = to_rdev(ibmw->device); in rxe_alloc_mw() local 25 ret = rxe_add_to_pool(&rxe->mw_pool, mw); in rxe_alloc_mw() 169 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_bind_mw() local 174 mw = rxe_pool_get_index(&rxe->mw_pool, mw_rkey >> 8); in rxe_bind_mw() 186 mr = rxe_pool_get_index(&rxe->mr_pool, mr_lkey >> 8); in rxe_bind_mw() 260 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_invalidate_mw() local 264 mw = rxe_pool_get_index(&rxe->mw_pool, rkey >> 8); in rxe_invalidate_mw() 292 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_lookup_mw() local 297 mw = rxe_pool_get_index(&rxe->mw_pool, index); in rxe_lookup_mw()
|
| H A D | rxe_icrc.c | 21 static __be32 rxe_crc32(struct rxe_dev *rxe, __be32 crc, void *next, size_t len) in rxe_crc32() argument 86 crc = rxe_crc32(pkt->rxe, crc, pshdr, length); in rxe_icrc_hdr() 89 crc = rxe_crc32(pkt->rxe, crc, pkt->hdr + RXE_BTH_BYTES, in rxe_icrc_hdr() 112 icrc = rxe_crc32(pkt->rxe, icrc, (u8 *)payload_addr(pkt), in rxe_icrc_check() 134 icrc = rxe_crc32(pkt->rxe, icrc, (u8 *)payload_addr(pkt), in rxe_icrc_generate()
|
| H A D | rxe_av.c | 21 struct rxe_dev *rxe; in chk_attr() local 28 rxe = to_rdev(ah->ibah.device); in chk_attr() 31 rxe = to_rdev(qp->ibqp.device); in chk_attr() 34 port = &rxe->port; in chk_attr() 151 ah = rxe_pool_get_index(&pkt->rxe->ah_pool, ah_num); in rxe_get_av()
|
| H A D | rxe_comp.c | 132 rxe_counter_inc(SKB_TO_PKT(skb)->rxe, RXE_CNT_SENDER_SCHED); in rxe_comp_queue_pkt() 221 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in check_ack() local 304 rxe_counter_inc(rxe, RXE_CNT_RCV_RNR); in check_ack() 314 rxe_counter_inc(rxe, in check_ack() 442 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in do_complete() local 462 rxe_counter_inc(rxe, RXE_CNT_RDMA_SEND); in do_complete() 640 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_completer() local 784 rxe_counter_inc(rxe, in rxe_completer() 793 rxe_counter_inc(rxe, RXE_CNT_RETRY_EXCEEDED); in rxe_completer() 816 rxe_counter_inc(rxe, in rxe_completer()
|
| H A D | rxe_pool.h | 32 struct rxe_dev *rxe; member 51 void rxe_pool_init(struct rxe_dev *rxe, struct rxe_pool *pool,
|
| H A D | rxe_queue.h | 63 struct rxe_dev *rxe; member 79 int do_mmap_info(struct rxe_dev *rxe, struct mminfo __user *outbuf, 85 struct rxe_queue *rxe_queue_init(struct rxe_dev *rxe, int *num_elem,
|
| H A D | rxe_pool.c | 92 void rxe_pool_init(struct rxe_dev *rxe, struct rxe_pool *pool, in rxe_pool_init() argument 99 pool->rxe = rxe; in rxe_pool_init()
|
| H A D | rxe_verbs.h | 387 struct rxe_dev *rxe; member 451 static inline void rxe_counter_inc(struct rxe_dev *rxe, enum rxe_counters index) in rxe_counter_inc() argument 453 atomic64_inc(&rxe->stats_counters[index]); in rxe_counter_inc() 516 int rxe_register_device(struct rxe_dev *rxe, const char *ibdev_name,
|
| H A D | rxe_mr.c | 129 int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, in rxe_mr_init_user() argument 139 umem = ib_umem_get(&rxe->ib_dev, start, length, access); in rxe_mr_init_user() 627 struct rxe_dev *rxe = to_rdev(pd->ibpd.device); in lookup_mr() local 630 mr = rxe_pool_get_index(&rxe->mr_pool, index); in lookup_mr() 647 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_invalidate_mr() local 652 mr = rxe_pool_get_index(&rxe->mr_pool, key >> 8); in rxe_invalidate_mr()
|
| H A D | rxe_req.c | 405 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in get_mtu() local 410 return rxe->port.mtu_cap; in get_mtu() 419 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in init_req_packet() local 433 skb = rxe_init_packet(rxe, av, paylen, pkt); in init_req_packet() 641 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_requester() local 766 pkt.rxe = rxe; in rxe_requester()
|
| H A D | rxe_odp.c | 79 int rxe_odp_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, in rxe_odp_mr_init_user() argument 93 if (!(rxe->attr.odp_caps.general_caps & IB_ODP_SUPPORT_IMPLICIT)) in rxe_odp_mr_init_user() 99 umem_odp = ib_umem_odp_get(&rxe->ib_dev, start, length, access_flags, in rxe_odp_mr_init_user()
|
| H A D | rxe_resp.c | 74 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in check_psn() local 83 rxe_counter_inc(rxe, RXE_CNT_OUT_OF_SEQ_REQ); in check_psn() 87 rxe_counter_inc(rxe, RXE_CNT_DUP_REQ); in check_psn() 780 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in prepare_ack_packet() local 841 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_recheck_mr() local 846 mw = rxe_pool_get_index(&rxe->mw_pool, rkey >> 8); in rxe_recheck_mr() 863 mr = rxe_pool_get_index(&rxe->mr_pool, rkey >> 8); in rxe_recheck_mr() 1071 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in do_complete() local 1090 rxe_counter_inc(rxe, RXE_CNT_RDMA_RECV); in do_complete() 1503 struct rxe_dev *rxe = to_rdev(qp->ibqp.device); in rxe_receiver() local [all …]
|
| /linux-6.15/drivers/infiniband/sw/ |
| H A D | Makefile | 3 obj-$(CONFIG_RDMA_RXE) += rxe/
|