Lines Matching defs:rcd
202 typedef int (*intr_handler)(struct hfi1_ctxtdata *rcd, int data);
239 /* verbs rx_stats per rcd */
356 * @rcd: the receive context
361 static inline u32 rcvhdrq_size(struct hfi1_ctxtdata *rcd)
363 return PAGE_ALIGN(rcd->rcvhdrq_cnt *
364 rcd->rcvhdrqentsize * sizeof(u32));
378 struct hfi1_ctxtdata *rcd;
1177 spinlock_t uctxt_lock; /* protect rcd changes */
1359 struct hfi1_ctxtdata **rcd;
1474 void handle_user_interrupt(struct hfi1_ctxtdata *rcd);
1476 int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd);
1477 int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd);
1480 struct hfi1_ctxtdata **rcd);
1481 void hfi1_free_ctxt(struct hfi1_ctxtdata *rcd);
1484 void hfi1_free_ctxtdata(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd);
1485 int hfi1_rcd_put(struct hfi1_ctxtdata *rcd);
1486 int hfi1_rcd_get(struct hfi1_ctxtdata *rcd);
1490 int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread);
1491 int handle_receive_interrupt_nodma_rtail(struct hfi1_ctxtdata *rcd, int thread);
1492 int handle_receive_interrupt_dma_rtail(struct hfi1_ctxtdata *rcd, int thread);
1493 int handle_receive_interrupt_napi_fp(struct hfi1_ctxtdata *rcd, int budget);
1494 int handle_receive_interrupt_napi_sp(struct hfi1_ctxtdata *rcd, int budget);
1512 * hfi1_rcd_head - add accessor for rcd head
1513 * @rcd: the context
1515 static inline u32 hfi1_rcd_head(struct hfi1_ctxtdata *rcd)
1517 return rcd->head;
1521 * hfi1_set_rcd_head - add accessor for rcd head
1522 * @rcd: the context
1525 static inline void hfi1_set_rcd_head(struct hfi1_ctxtdata *rcd, u32 head)
1527 rcd->head = head;
1531 static inline __le32 *get_rhf_addr(struct hfi1_ctxtdata *rcd)
1533 return (__le32 *)rcd->rcvhdrq + rcd->head + rcd->rhf_offset;
1537 static inline bool get_dma_rtail_setting(struct hfi1_ctxtdata *rcd)
1539 return !!HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL);
1557 * @rcd: the receive context
1561 static inline u8 hfi1_seq_cnt(struct hfi1_ctxtdata *rcd)
1563 return rcd->seq_cnt;
1568 * @rcd: the receive context
1572 static inline void hfi1_set_seq_cnt(struct hfi1_ctxtdata *rcd, u8 cnt)
1574 rcd->seq_cnt = cnt;
1579 * @rcd: the receive context
1584 static inline bool last_rcv_seq(struct hfi1_ctxtdata *rcd, u32 seq)
1586 return seq != rcd->seq_cnt;
1591 * @rcd: the receive context
1596 static inline bool hfi1_seq_incr(struct hfi1_ctxtdata *rcd, u32 seq)
1598 rcd->seq_cnt = hfi1_seq_incr_wrap(rcd->seq_cnt);
1599 return last_rcv_seq(rcd, seq);
1604 * @rcd: the receive context
1606 static inline u8 get_hdrqentsize(struct hfi1_ctxtdata *rcd)
1608 return rcd->rcvhdrqentsize;
1613 * @rcd: the receive context
1615 static inline u16 get_hdrq_cnt(struct hfi1_ctxtdata *rcd)
1617 return rcd->rcvhdrq_cnt;
1622 * @rcd: the receive context
1624 static inline bool hfi1_is_slowpath(struct hfi1_ctxtdata *rcd)
1626 return rcd->do_interrupt == rcd->slow_handler;
1631 * @rcd: the receive context
1633 static inline bool hfi1_is_fastpath(struct hfi1_ctxtdata *rcd)
1635 if (rcd->ctxt == HFI1_CTRL_CTXT)
1638 return rcd->do_interrupt == rcd->fast_handler;
1643 * @rcd: the receive context
1645 static inline void hfi1_set_fast(struct hfi1_ctxtdata *rcd)
1647 if (unlikely(!rcd))
1649 if (unlikely(!hfi1_is_fastpath(rcd)))
1650 rcd->do_interrupt = rcd->fast_handler;
1988 static inline struct hfi1_ibport *rcd_to_iport(struct hfi1_ctxtdata *rcd)
1990 return &rcd->ppd->ibport_data;
2157 * @rcd - the receive context
2159 static inline __le64 *hfi1_rcvhdrtail_kvaddr(const struct hfi1_ctxtdata *rcd)
2161 return (__le64 *)rcd->rcvhdrtail_kvaddr;
2164 static inline void clear_rcvhdrtail(const struct hfi1_ctxtdata *rcd)
2166 u64 *kv = (u64 *)hfi1_rcvhdrtail_kvaddr(rcd);
2172 static inline u32 get_rcvhdrtail(const struct hfi1_ctxtdata *rcd)
2178 return (u32)le64_to_cpu(*hfi1_rcvhdrtail_kvaddr(rcd));
2181 static inline bool hfi1_packet_present(struct hfi1_ctxtdata *rcd)
2183 if (likely(!rcd->rcvhdrtail_kvaddr)) {
2184 u32 seq = rhf_rcv_seq(rhf_to_cpu(get_rhf_addr(rcd)));
2186 return !last_rcv_seq(rcd, seq);
2188 return hfi1_rcd_head(rcd) != get_rcvhdrtail(rcd);
2235 void seqfile_dump_rcd(struct seq_file *s, struct hfi1_ctxtdata *rcd);
2628 struct hfi1_ibport *ibp = &packet->rcd->ppd->ibport_data;