static inline struct sdp_sock *sdp_sk(const struct sock *sk)
{
- return (struct sdp_sock *)sk;
+ return (struct sdp_sock *)sk;
}
#ifdef SDP_SOCK_HISTORY
/* Update the skb. */
if (merge) {
- skb_shinfo(skb)->frags[i - 1].size +=
- copy;
+ skb_shinfo(skb)->frags[i - 1].size += copy;
} else {
skb_fill_page_desc(skb, i, page, off, copy);
if (TCP_PAGE(sk)) {
int err, copied;
long timeo;
struct bzcopy_state *bz = NULL;
- int zcopy_thresh = -1 != ssk->zcopy_thresh ? ssk->zcopy_thresh : sdp_zcopy_thresh;
+ int zcopy_thresh =
+ -1 != ssk->zcopy_thresh ? ssk->zcopy_thresh : sdp_zcopy_thresh;
+
SDPSTATS_COUNTER_INC(sendmsg);
lock_sock(sk);
/* Bytes waiting in socket RX queue */
bytes_in_process += rcv_nxt(ssk) - ssk->copied_seq;
- if (bytes_in_process >= max_bytes) {
- sdp_prf(sk, NULL, "bytes_in_process: 0x%lx > max_bytes: 0x%lx",
- bytes_in_process, max_bytes);
- return 0;
- }
-
- return 1;
+ return bytes_in_process < max_bytes;
}
static inline void sdp_post_recvs(struct sdp_sock *ssk)
if (likely(!wc->status) || wc->status == IB_WC_WR_FLUSH_ERR)
return;
- sdp_dbg_data(sk, "Send completion with error. wr_id 0x%x Status %d\n",
+ sdp_dbg_data(sk, "Send completion with error. wr_id 0x%llx Status %d\n",
wc->wr_id, wc->status);
sdp_set_error(sk, -ECONNRESET);