Changeset View
Changeset View
Standalone View
Standalone View
sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | sdp_xmit_poll(struct sdp_sock *ssk, int force) | ||||
int wc_processed = 0; | int wc_processed = 0; | ||||
SDP_WLOCK_ASSERT(ssk); | SDP_WLOCK_ASSERT(ssk); | ||||
sdp_prf(ssk->socket, NULL, "%s", __func__); | sdp_prf(ssk->socket, NULL, "%s", __func__); | ||||
/* If we don't have a pending timer, set one up to catch our recent | /* If we don't have a pending timer, set one up to catch our recent | ||||
post in case the interface becomes idle */ | post in case the interface becomes idle */ | ||||
if (!callout_pending(&ssk->tx_ring.timer)) | if (!callout_pending(&ssk->tx_ring.timer)) | ||||
callout_reset(&ssk->tx_ring.timer, SDP_TX_POLL_TIMEOUT, | callout_reset_sbt_on_arg1(&ssk->tx_ring.timer, | ||||
sdp_poll_tx_timeout, ssk); | tick_sbt * SDP_TX_POLL_TIMEOUT, 0, | ||||
sdp_poll_tx_timeout, ssk, sdp_poll_tx_timeout, -1, | |||||
C_HARDCLOCK); | |||||
/* Poll the CQ every SDP_TX_POLL_MODER packets */ | /* Poll the CQ every SDP_TX_POLL_MODER packets */ | ||||
if (force || (++ssk->tx_ring.poll_cnt & (SDP_TX_POLL_MODER - 1)) == 0) | if (force || (++ssk->tx_ring.poll_cnt & (SDP_TX_POLL_MODER - 1)) == 0) | ||||
wc_processed = sdp_process_tx_cq(ssk); | wc_processed = sdp_process_tx_cq(ssk); | ||||
return wc_processed; | return wc_processed; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | sdp_poll_tx(struct sdp_sock *ssk) | ||||
inflight = (u32) tx_ring_posted(ssk); | inflight = (u32) tx_ring_posted(ssk); | ||||
sdp_prf1(ssk->socket, NULL, "finished tx processing. inflight = %d", | sdp_prf1(ssk->socket, NULL, "finished tx processing. inflight = %d", | ||||
inflight); | inflight); | ||||
/* If there are still packets in flight and the timer has not already | /* If there are still packets in flight and the timer has not already | ||||
* been scheduled by the Tx routine then schedule it here to guarantee | * been scheduled by the Tx routine then schedule it here to guarantee | ||||
* completion processing of these packets */ | * completion processing of these packets */ | ||||
if (inflight) | if (inflight) | ||||
callout_reset(&ssk->tx_ring.timer, SDP_TX_POLL_TIMEOUT, | callout_reset_sbt_on_arg1(&ssk->tx_ring.timer, | ||||
sdp_poll_tx_timeout, ssk); | tick_sbt * SDP_TX_POLL_TIMEOUT, 0, | ||||
sdp_poll_tx_timeout, ssk, sdp_poll_tx_timeout, -1, | |||||
C_HARDCLOCK); | |||||
out: | out: | ||||
#ifdef SDP_ZCOPY | #ifdef SDP_ZCOPY | ||||
if (ssk->tx_ring.rdma_inflight && ssk->tx_ring.rdma_inflight->busy) { | if (ssk->tx_ring.rdma_inflight && ssk->tx_ring.rdma_inflight->busy) { | ||||
sdp_prf1(sk, NULL, "RDMA is inflight - arming irq"); | sdp_prf1(sk, NULL, "RDMA is inflight - arming irq"); | ||||
sdp_arm_tx_cq(ssk); | sdp_arm_tx_cq(ssk); | ||||
} | } | ||||
#endif | #endif | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |