Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/tom/t4_cpl_io.c
Show First 20 Lines • Show All 797 Lines • ▼ Show 20 Lines | #endif | ||||
if (sb->sb_flags & SB_AUTOSIZE && | if (sb->sb_flags & SB_AUTOSIZE && | ||||
V_tcp_do_autosndbuf && | V_tcp_do_autosndbuf && | ||||
sb->sb_hiwat < V_tcp_autosndbuf_max && | sb->sb_hiwat < V_tcp_autosndbuf_max && | ||||
sbused(sb) >= sb->sb_hiwat * 7 / 8) { | sbused(sb) >= sb->sb_hiwat * 7 / 8) { | ||||
int newsize = min(sb->sb_hiwat + V_tcp_autosndbuf_inc, | int newsize = min(sb->sb_hiwat + V_tcp_autosndbuf_inc, | ||||
V_tcp_autosndbuf_max); | V_tcp_autosndbuf_max); | ||||
if (!sbreserve_locked(sb, newsize, so, NULL)) | if (!sbreserve_locked(so, SO_SND, newsize, NULL)) | ||||
sb->sb_flags &= ~SB_AUTOSIZE; | sb->sb_flags &= ~SB_AUTOSIZE; | ||||
else | else | ||||
sowwakeup = 1; /* room available */ | sowwakeup = 1; /* room available */ | ||||
} | } | ||||
if (sowwakeup) { | if (sowwakeup) { | ||||
if (!TAILQ_EMPTY(&toep->aiotx_jobq)) | if (!TAILQ_EMPTY(&toep->aiotx_jobq)) | ||||
t4_aiotx_queue_toep(so, toep); | t4_aiotx_queue_toep(so, toep); | ||||
sowwakeup_locked(so); | sowwakeup_locked(so); | ||||
▲ Show 20 Lines • Show All 950 Lines • ▼ Show 20 Lines | do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) | ||||
if (sb->sb_flags & SB_AUTOSIZE && | if (sb->sb_flags & SB_AUTOSIZE && | ||||
V_tcp_do_autorcvbuf && | V_tcp_do_autorcvbuf && | ||||
sb->sb_hiwat < V_tcp_autorcvbuf_max && | sb->sb_hiwat < V_tcp_autorcvbuf_max && | ||||
len > (sbspace(sb) / 8 * 7)) { | len > (sbspace(sb) / 8 * 7)) { | ||||
unsigned int hiwat = sb->sb_hiwat; | unsigned int hiwat = sb->sb_hiwat; | ||||
unsigned int newsize = min(hiwat + sc->tt.autorcvbuf_inc, | unsigned int newsize = min(hiwat + sc->tt.autorcvbuf_inc, | ||||
V_tcp_autorcvbuf_max); | V_tcp_autorcvbuf_max); | ||||
if (!sbreserve_locked(sb, newsize, so, NULL)) | if (!sbreserve_locked(so, SO_RCV, newsize, NULL)) | ||||
sb->sb_flags &= ~SB_AUTOSIZE; | sb->sb_flags &= ~SB_AUTOSIZE; | ||||
} | } | ||||
if (ulp_mode(toep) == ULP_MODE_TCPDDP) { | if (ulp_mode(toep) == ULP_MODE_TCPDDP) { | ||||
int changed = !(toep->ddp.flags & DDP_ON) ^ cpl->ddp_off; | int changed = !(toep->ddp.flags & DDP_ON) ^ cpl->ddp_off; | ||||
if (toep->ddp.waiting_count != 0 || toep->ddp.active_count != 0) | if (toep->ddp.waiting_count != 0 || toep->ddp.active_count != 0) | ||||
CTR3(KTR_CXGBE, "%s: tid %u, non-ddp rx (%d bytes)", | CTR3(KTR_CXGBE, "%s: tid %u, non-ddp rx (%d bytes)", | ||||
▲ Show 20 Lines • Show All 689 Lines • Show Last 20 Lines |