Lines Matching refs:credits
315 * This is the main function for allocating credits when sending
319 * - send credits: this tells us how many WRs we're allowed
323 * - posted credits: this tells us how many WRs we recently
326 * Every time we transmit credits to the peer, we subtract
327 * the amount of transferred credits from this counter.
330 * exhausted their send credits, and are unable to send new credits
332 * one credit update to the peer before exhausting our credits.
333 * When new credits arrive, we subtract one credit that is withheld
335 * credits (see rdsv3_ib_send_add_credits below).
342 * In the send path, we need to update the counters for send credits
345 * and grab the posted credits counter. Hence, we have to use a
355 * atomic_add (in the receive path, when receiving fresh credits),
379 "wanted (%u): credits=%u posted=%u\n", wanted, avail, posted);
388 /* Oops, there aren't that many credits left! */
399 * the posted regardless of whether any send credits are
420 rdsv3_ib_send_add_credits(struct rdsv3_connection *conn, unsigned int credits)
424 if (credits == 0)
428 "credits (%u): current=%u%s\n",
429 credits,
434 atomic_add_32(&ic->i_credits, IB_SET_SEND_CREDITS(credits));
438 ASSERT(!(IB_GET_SEND_CREDITS(credits) >= 16384));
443 "Return: conn: %p, credits: %d",
444 conn, credits);
470 * credits and has to throttle.