posted = IB_GET_POST_CREDITS(oldval);
avail = IB_GET_SEND_CREDITS(oldval);
- rdsdebug("rds_ib_send_grab_credits(%u): credits=%u posted=%u\n",
- wanted, avail, posted);
+ rds_rtd(RDS_RTD_FLOW_CNTRL,
+ "rds_ib_send_grab_credits(%u): credits=%u posted=%u\n",
+ wanted, avail, posted);
/* The last credit must be used to send a credit update. */
if (avail && !posted)
if (credits == 0)
return;
- rdsdebug("rds_ib_send_add_credits(%u): current=%u%s\n",
- credits,
- IB_GET_SEND_CREDITS(atomic_read(&ic->i_credits)),
- test_bit(RDS_LL_SEND_FULL, &conn->c_flags) ? ", ll_send_full" : "");
+ rds_rtd(RDS_RTD_FLOW_CNTRL,
+ "rds_ib_send_add_credits(%u): current=%u%s\n",
+ credits,
+ IB_GET_SEND_CREDITS(atomic_read(&ic->i_credits)),
+ test_bit(RDS_LL_SEND_FULL, &conn->c_flags) ?
+ ", ll_send_full" : "");
atomic_add(IB_SET_SEND_CREDITS(credits), &ic->i_credits);
if (test_and_clear_bit(RDS_LL_SEND_FULL, &conn->c_flags))
* credits and has to throttle.
* For the time being, 16 seems to be a good compromise.
*/
+ rds_rtd(RDS_RTD_FLOW_CNTRL, "ic->i_credits %u\n",
+ IB_GET_POST_CREDITS(atomic_read(&ic->i_credits)));
if (IB_GET_POST_CREDITS(atomic_read(&ic->i_credits)) >= 16)
set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags);
}
RDS_RTD_SND = 1 << 14, /* 0x4000 */
RDS_RTD_SND_EXT = 1 << 15, /* 0x8000 */
+ RDS_RTD_FLOW_CNTRL = 1 << 16, /* 0x10000 */
/* bit 20 ~ 31 are module specific bits */
RDS_RTD_CORE = 1 << 20, /* 0x100000 */