Lines Matching defs:credits
312 * This is the main function for allocating credits when sending
316 * - send credits: this tells us how many WRs we're allowed
320 * - posted credits: this tells us how many WRs we recently
323 * Every time we transmit credits to the peer, we subtract
324 * the amount of transferred credits from this counter.
327 * exhausted their send credits, and are unable to send new credits
329 * one credit update to the peer before exhausting our credits.
330 * When new credits arrive, we subtract one credit that is withheld
332 * credits (see rds_ib_send_add_credits below).
339 * In the send path, we need to update the counters for send credits
342 * and grab the posted credits counter. Hence, we have to use a
352 * atomic_add (in the receive path, when receiving fresh credits),
371 rdsdebug("wanted=%u credits=%u posted=%u\n",
381 /* Oops, there aren't that many credits left! */
392 * the posted regardless of whether any send credits are
408 void rds_ib_send_add_credits(struct rds_connection *conn, unsigned int credits)
412 if (credits == 0)
415 rdsdebug("credits=%u current=%u%s\n",
416 credits,
420 atomic_add(IB_SET_SEND_CREDITS(credits), &ic->i_credits);
424 WARN_ON(IB_GET_SEND_CREDITS(credits) >= 16384);
447 * credits and has to throttle.
724 /* Put back wrs & credits we didn't use */