Lines Matching refs:head

80 static void i_ldc_get_tx_head(ldc_chan_t *ldcp, uint64_t *head);
82 static int i_ldc_set_rx_head(ldc_chan_t *ldcp, uint64_t head);
86 static int i_ldc_set_rxdq_head(ldc_chan_t *ldcp, uint64_t head);
87 static void i_ldc_rxdq_copy(ldc_chan_t *ldcp, uint64_t *head);
88 static uint64_t i_ldc_dq_rx_get_state(ldc_chan_t *ldcp, uint64_t *head,
90 static uint64_t i_ldc_hvq_rx_get_state(ldc_chan_t *ldcp, uint64_t *head,
356 * lengths. Just pass the head, tail, and entries values so that the
366 #define TRACE_RXHVQ_LENGTH(ldcp, head, tail) \
369 uint64_t, head, \
378 #define Q_CONTIG_SPACE(head, tail, size) \
379 ((head) <= (tail) ? ((size) - (tail)) : \
380 ((head) - (tail) - LDC_PACKET_SIZE))
806 * Set the receive queue head
810 i_ldc_set_rx_head(ldc_chan_t *ldcp, uint64_t head)
818 if ((rv = hv_ldc_rx_set_qhead(ldcp->id, head)) == 0)
829 "rv = 0x%x", ldcp->id, head, rv);
841 i_ldc_get_tx_head(ldc_chan_t *ldcp, uint64_t *head)
847 /* get current Tx head */
848 *head = ldcp->tx_head;
851 * Reliable mode will use the ACKd head instead of the regular tx_head.
862 /* advance ACKd head */
867 *head = ldcp->tx_ackd_head;
874 * the cached head and tail are equal (queue is full)
883 /* Read the head and tail ptrs from HV */
911 D2(ldcp->id, "i_ldc_get_tx_tail: (0x%llx) head=0x%llx, tail=0x%llx\n",
953 * The *head argument represents the current head pointer for the HV
955 * the *head pointer will be updated. This allows the caller to update
956 * the head pointer in HV using the returned *head value.
959 i_ldc_rxdq_copy(ldc_chan_t *ldcp, uint64_t *head)
971 bcopy((void *)(ldcp->rx_q_va + *head),
975 /* Update rx head */
976 *head = (*head + LDC_PACKET_SIZE) % q_size;
983 * Update the Rx data queue head pointer
986 i_ldc_set_rxdq_head(ldc_chan_t *ldcp, uint64_t head)
988 ldcp->rx_dq_head = head;
993 * Get the Rx data queue head and tail pointers
996 i_ldc_dq_rx_get_state(ldc_chan_t *ldcp, uint64_t *head, uint64_t *tail,
1000 *head = ldcp->rx_dq_head;
1006 * Wrapper for the Rx HV queue set head function. Giving the
1007 * data queue and HV queue set head functions the same type.
1010 i_ldc_hvq_rx_get_state(ldc_chan_t *ldcp, uint64_t *head, uint64_t *tail,
1013 return (i_ldc_h2v_error(hv_ldc_rx_get_state(ldcp->id, head, tail,
1834 * Read the current Tx head and tail
1851 * current head location. This is how far the HV has
1852 * actually send pkts. Pkts between head and tail are
2319 D2(ldcp->id, "i_ldc_rx_process_hvq: head=0x%llx, "
2339 /* move the head one position */
2481 /* move the head one position */
3060 * set the ACKd head to current head location for reliable
3692 * Otherwise, if the data queue head and tail pointers
4094 * dont need to set q head for every
4115 /* toss pkt, inc head, cont reading */
4164 "head=0x%lx, expect=%d, got=%d\n", ldcp->id,
4184 /* move the head one position */
4195 /* set the queue head */
4204 /* advance head if it is a CTRL packet or a DATA ACK packet */
4208 /* set the queue head */
4520 * the appropriate head based on the link mode.
4618 D1(ldcp->id, "hv_tx_set_tail returns 0x%x (head 0x%x, "
4627 "(head 0x%x, tail 0x%x state 0x%x)\n",