Lines Matching full:pending

46  * - NAK received (this is equivalent to issuing re-submit for all pending
49 * - cancel (non-pending and pending)
54 * containing all packets scheduled for transmission, and the set of pending
61 * - the pending set,
71 * sets-up the timeout and adds the packet to the pending set before starting
79 * reference to the packet from the pending set. The receiver thread will then
82 * On receival of a NAK, the receiver thread re-submits all currently pending
87 * checking all currently pending packets if their timeout has expired. If the
99 * packet cannot be added to the queue, the pending set, and the timeout, or
102 * references from the data structures (queue, pending) have to be removed.
125 * may not be queued, dequeued, or removed or added to the pending set. Note
139 * - pending
140 * Indicates if a packet is present in the set of pending packets or not.
141 * This flag must only be modified with the pending lock held, and must be
142 * coherent to the presence of the packet in the pending set.
167 * - To avoid deadlocks, if both queue and pending locks are required, the
168 * pending lock must be acquired before the queue lock.
172 * - The packet timestamp must be accessed only while holding the pending
212 * SSH_PTL_MAX_PENDING - Maximum number of pending packets.
710 * less limited via the maximum number of pending packets). Thus, when in __ssh_ptl_queue_find_entrypoint()
804 spin_lock(&ptl->pending.lock); in ssh_ptl_pending_push()
808 spin_unlock(&ptl->pending.lock); in ssh_ptl_pending_push()
813 * On re-submission, the packet has already been added the pending in ssh_ptl_pending_push()
819 /* In case it is already pending (e.g. re-submission), do not add it. */ in ssh_ptl_pending_push()
821 atomic_inc(&ptl->pending.count); in ssh_ptl_pending_push()
822 list_add_tail(&ssh_packet_get(p)->pending_node, &ptl->pending.head); in ssh_ptl_pending_push()
825 spin_unlock(&ptl->pending.lock); in ssh_ptl_pending_push()
835 spin_lock(&ptl->pending.lock); in ssh_ptl_pending_remove()
838 spin_unlock(&ptl->pending.lock); in ssh_ptl_pending_remove()
843 atomic_dec(&ptl->pending.count); in ssh_ptl_pending_remove()
845 spin_unlock(&ptl->pending.lock); in ssh_ptl_pending_remove()
888 return !atomic_read(&ptl->pending.count); in ssh_ptl_tx_can_process()
899 return atomic_read(&ptl->pending.count) < SSH_PTL_MAX_PENDING; in ssh_ptl_tx_can_process()
1198 spin_lock(&ptl->pending.lock); in ssh_ptl_ack_pop()
1199 list_for_each_entry_safe(p, n, &ptl->pending.head, pending_node) { in ssh_ptl_ack_pop()
1202 * to be added to pending is first to be sent, is first to be in ssh_ptl_ack_pop()
1218 * Mark the packet as ACKed and remove it from pending by in ssh_ptl_ack_pop()
1219 * removing its node and decrementing the pending counter. in ssh_ptl_ack_pop()
1226 atomic_dec(&ptl->pending.count); in ssh_ptl_ack_pop()
1232 spin_unlock(&ptl->pending.lock); in ssh_ptl_ack_pop()
1252 * The packet has not been found in the set of pending in ssh_ptl_acknowledge()
1255 ptl_warn(ptl, "ptl: received ACK for non-pending packet\n"); in ssh_ptl_acknowledge()
1258 * The packet is pending, but we are not allowed to take in ssh_ptl_acknowledge()
1295 if (atomic_read(&ptl->pending.count) < SSH_PTL_MAX_PENDING) in ssh_ptl_acknowledge()
1345 (atomic_read(&ptl->pending.count) < SSH_PTL_MAX_PENDING)) in ssh_ptl_submit()
1357 * with the pending lock held.
1368 lockdep_assert_held(&packet->ptl->pending.lock); in __ssh_ptl_resubmit()
1414 spin_lock(&ptl->pending.lock); in ssh_ptl_resubmit_pending()
1416 /* Re-queue all pending packets. */ in ssh_ptl_resubmit_pending()
1417 list_for_each_entry(p, &ptl->pending.head, pending_node) { in ssh_ptl_resubmit_pending()
1427 spin_unlock(&ptl->pending.lock); in ssh_ptl_resubmit_pending()
1481 if (atomic_read(&p->ptl->pending.count) < SSH_PTL_MAX_PENDING) in ssh_ptl_cancel()
1489 /* Must be called with pending lock held */
1492 lockdep_assert_held(&p->ptl->pending.lock); in ssh_packet_get_expiration()
1511 trace_ssam_ptl_timeout_reap(atomic_read(&ptl->pending.count)); in ssh_ptl_timeout_reap()
1514 * Mark reaper as "not pending". This is done before checking any in ssh_ptl_timeout_reap()
1521 spin_lock(&ptl->pending.lock); in ssh_ptl_timeout_reap()
1523 list_for_each_entry_safe(p, n, &ptl->pending.head, pending_node) { in ssh_ptl_timeout_reap()
1562 * added to the pending list again after we've removed it here. in ssh_ptl_timeout_reap()
1569 atomic_dec(&ptl->pending.count); in ssh_ptl_timeout_reap()
1573 spin_unlock(&ptl->pending.lock); in ssh_ptl_timeout_reap()
1584 * the pending set. in ssh_ptl_timeout_reap()
1909 * and pending packets. Packets canceled by this operation will be completed
1949 * and pending set. in ssh_ptl_shutdown()
1955 * packet as locked an then remove it from the queue (or pending set in ssh_ptl_shutdown()
1978 /* Mark pending packets as locked and move them to complete_p. */ in ssh_ptl_shutdown()
1979 spin_lock(&ptl->pending.lock); in ssh_ptl_shutdown()
1980 list_for_each_entry_safe(p, n, &ptl->pending.head, pending_node) { in ssh_ptl_shutdown()
1988 atomic_set(&ptl->pending.count, 0); in ssh_ptl_shutdown()
1989 spin_unlock(&ptl->pending.lock); in ssh_ptl_shutdown()
2037 spin_lock_init(&ptl->pending.lock); in ssh_ptl_init()
2038 INIT_LIST_HEAD(&ptl->pending.head); in ssh_ptl_init()
2039 atomic_set_release(&ptl->pending.count, 0); in ssh_ptl_init()