Lines Matching defs:rcd

161 typedef int (*intr_handler)(struct hfi1_ctxtdata *rcd, int data);
198 /* verbs rx_stats per rcd */
315 * @rcd: the receive context
320 static inline u32 rcvhdrq_size(struct hfi1_ctxtdata *rcd)
322 return PAGE_ALIGN(rcd->rcvhdrq_cnt *
323 rcd->rcvhdrqentsize * sizeof(u32));
337 struct hfi1_ctxtdata *rcd;
1127 spinlock_t uctxt_lock; /* protect rcd changes */
1309 struct hfi1_ctxtdata **rcd;
1422 void handle_user_interrupt(struct hfi1_ctxtdata *rcd);
1424 int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd);
1425 int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd);
1428 struct hfi1_ctxtdata **rcd);
1429 void hfi1_free_ctxt(struct hfi1_ctxtdata *rcd);
1432 void hfi1_free_ctxtdata(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd);
1433 int hfi1_rcd_put(struct hfi1_ctxtdata *rcd);
1434 int hfi1_rcd_get(struct hfi1_ctxtdata *rcd);
1438 int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread);
1439 int handle_receive_interrupt_nodma_rtail(struct hfi1_ctxtdata *rcd, int thread);
1440 int handle_receive_interrupt_dma_rtail(struct hfi1_ctxtdata *rcd, int thread);
1441 int handle_receive_interrupt_napi_fp(struct hfi1_ctxtdata *rcd, int budget);
1442 int handle_receive_interrupt_napi_sp(struct hfi1_ctxtdata *rcd, int budget);
1460 * hfi1_rcd_head - add accessor for rcd head
1461 * @rcd: the context
1463 static inline u32 hfi1_rcd_head(struct hfi1_ctxtdata *rcd)
1465 return rcd->head;
1469 * hfi1_set_rcd_head - add accessor for rcd head
1470 * @rcd: the context
1473 static inline void hfi1_set_rcd_head(struct hfi1_ctxtdata *rcd, u32 head)
1475 rcd->head = head;
1479 static inline __le32 *get_rhf_addr(struct hfi1_ctxtdata *rcd)
1481 return (__le32 *)rcd->rcvhdrq + rcd->head + rcd->rhf_offset;
1485 static inline bool get_dma_rtail_setting(struct hfi1_ctxtdata *rcd)
1487 return !!HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL);
1505 * @rcd: the receive context
1509 static inline u8 hfi1_seq_cnt(struct hfi1_ctxtdata *rcd)
1511 return rcd->seq_cnt;
1516 * @rcd: the receive context
1520 static inline void hfi1_set_seq_cnt(struct hfi1_ctxtdata *rcd, u8 cnt)
1522 rcd->seq_cnt = cnt;
1527 * @rcd: the receive context
1532 static inline bool last_rcv_seq(struct hfi1_ctxtdata *rcd, u32 seq)
1534 return seq != rcd->seq_cnt;
1539 * @rcd: the receive context
1544 static inline bool hfi1_seq_incr(struct hfi1_ctxtdata *rcd, u32 seq)
1546 rcd->seq_cnt = hfi1_seq_incr_wrap(rcd->seq_cnt);
1547 return last_rcv_seq(rcd, seq);
1552 * @rcd: the receive context
1554 static inline u8 get_hdrqentsize(struct hfi1_ctxtdata *rcd)
1556 return rcd->rcvhdrqentsize;
1561 * @rcd: the receive context
1563 static inline u16 get_hdrq_cnt(struct hfi1_ctxtdata *rcd)
1565 return rcd->rcvhdrq_cnt;
1570 * @rcd: the receive context
1572 static inline bool hfi1_is_slowpath(struct hfi1_ctxtdata *rcd)
1574 return rcd->do_interrupt == rcd->slow_handler;
1579 * @rcd: the receive context
1581 static inline bool hfi1_is_fastpath(struct hfi1_ctxtdata *rcd)
1583 if (rcd->ctxt == HFI1_CTRL_CTXT)
1586 return rcd->do_interrupt == rcd->fast_handler;
1591 * @rcd: the receive context
1593 static inline void hfi1_set_fast(struct hfi1_ctxtdata *rcd)
1595 if (unlikely(!rcd))
1597 if (unlikely(!hfi1_is_fastpath(rcd)))
1598 rcd->do_interrupt = rcd->fast_handler;
1936 static inline struct hfi1_ibport *rcd_to_iport(struct hfi1_ctxtdata *rcd)
1938 return &rcd->ppd->ibport_data;
2105 * @rcd - the receive context
2107 static inline __le64 *hfi1_rcvhdrtail_kvaddr(const struct hfi1_ctxtdata *rcd)
2109 return (__le64 *)rcd->rcvhdrtail_kvaddr;
2112 static inline void clear_rcvhdrtail(const struct hfi1_ctxtdata *rcd)
2114 u64 *kv = (u64 *)hfi1_rcvhdrtail_kvaddr(rcd);
2120 static inline u32 get_rcvhdrtail(const struct hfi1_ctxtdata *rcd)
2126 return (u32)le64_to_cpu(*hfi1_rcvhdrtail_kvaddr(rcd));
2129 static inline bool hfi1_packet_present(struct hfi1_ctxtdata *rcd)
2131 if (likely(!rcd->rcvhdrtail_kvaddr)) {
2132 u32 seq = rhf_rcv_seq(rhf_to_cpu(get_rhf_addr(rcd)));
2134 return !last_rcv_seq(rcd, seq);
2136 return hfi1_rcd_head(rcd) != get_rcvhdrtail(rcd);
2182 void seqfile_dump_rcd(struct seq_file *s, struct hfi1_ctxtdata *rcd);
2575 struct hfi1_ibport *ibp = &packet->rcd->ppd->ibport_data;