• Home
  • Raw
  • Download

Lines Matching refs:srq

425 static inline u32 t4_srq_avail(struct t4_srq *srq)  in t4_srq_avail()  argument
427 return srq->size - 1 - srq->in_use; in t4_srq_avail()
430 static inline void t4_srq_produce(struct t4_srq *srq, u8 len16) in t4_srq_produce() argument
432 srq->in_use++; in t4_srq_produce()
433 if (++srq->pidx == srq->size) in t4_srq_produce()
434 srq->pidx = 0; in t4_srq_produce()
435 srq->wq_pidx += DIV_ROUND_UP(len16 * 16, T4_EQ_ENTRY_SIZE); in t4_srq_produce()
436 if (srq->wq_pidx >= srq->size * T4_RQ_NUM_SLOTS) in t4_srq_produce()
437 srq->wq_pidx %= srq->size * T4_RQ_NUM_SLOTS; in t4_srq_produce()
438 srq->queue[srq->size].status.host_pidx = srq->pidx; in t4_srq_produce()
441 static inline void t4_srq_produce_pending_wr(struct t4_srq *srq) in t4_srq_produce_pending_wr() argument
443 srq->pending_in_use++; in t4_srq_produce_pending_wr()
444 srq->in_use++; in t4_srq_produce_pending_wr()
445 if (++srq->pending_pidx == srq->size) in t4_srq_produce_pending_wr()
446 srq->pending_pidx = 0; in t4_srq_produce_pending_wr()
449 static inline void t4_srq_consume_pending_wr(struct t4_srq *srq) in t4_srq_consume_pending_wr() argument
451 srq->pending_in_use--; in t4_srq_consume_pending_wr()
452 srq->in_use--; in t4_srq_consume_pending_wr()
453 if (++srq->pending_cidx == srq->size) in t4_srq_consume_pending_wr()
454 srq->pending_cidx = 0; in t4_srq_consume_pending_wr()
457 static inline void t4_srq_produce_ooo(struct t4_srq *srq) in t4_srq_produce_ooo() argument
459 srq->in_use--; in t4_srq_produce_ooo()
460 srq->ooo_count++; in t4_srq_produce_ooo()
463 static inline void t4_srq_consume_ooo(struct t4_srq *srq) in t4_srq_consume_ooo() argument
465 srq->cidx++; in t4_srq_consume_ooo()
466 if (srq->cidx == srq->size) in t4_srq_consume_ooo()
467 srq->cidx = 0; in t4_srq_consume_ooo()
468 srq->queue[srq->size].status.host_cidx = srq->cidx; in t4_srq_consume_ooo()
469 srq->ooo_count--; in t4_srq_consume_ooo()
472 static inline void t4_srq_consume(struct t4_srq *srq) in t4_srq_consume() argument
474 srq->in_use--; in t4_srq_consume()
475 if (++srq->cidx == srq->size) in t4_srq_consume()
476 srq->cidx = 0; in t4_srq_consume()
477 srq->queue[srq->size].status.host_cidx = srq->cidx; in t4_srq_consume()
582 static inline void t4_ring_srq_db(struct t4_srq *srq, u16 inc, u8 len16, in t4_ring_srq_db() argument
587 if (inc == 1 && srq->bar2_qid == 0 && wqe) { in t4_ring_srq_db()
589 __func__, srq->pidx, len16); in t4_ring_srq_db()
590 pio_copy(srq->bar2_va + SGE_UDB_WCDOORBELL, (u64 *)wqe); in t4_ring_srq_db()
593 __func__, srq->pidx, len16); in t4_ring_srq_db()
594 writel(PIDX_T5_V(inc) | QID_V(srq->bar2_qid), in t4_ring_srq_db()
595 srq->bar2_va + SGE_UDB_KDOORBELL); in t4_ring_srq_db()