Lines Matching refs:zc
1198 bool zc = false; in tcp_sendmsg_locked() local
1211 zc = sk->sk_route_caps & NETIF_F_SG; in tcp_sendmsg_locked()
1212 if (!zc) in tcp_sendmsg_locked()
1319 if (skb_availroom(skb) > 0 && !zc) { in tcp_sendmsg_locked()
1325 } else if (!zc) { in tcp_sendmsg_locked()
1752 struct tcp_zerocopy_receive *zc) in tcp_zerocopy_vm_insert_batch() argument
1771 zc->recv_skip_hint += bytes_not_mapped; in tcp_zerocopy_vm_insert_batch()
1777 struct tcp_zerocopy_receive *zc) in tcp_zerocopy_receive() argument
1779 unsigned long address = (unsigned long)zc->address; in tcp_zerocopy_receive()
1792 if (address & (PAGE_SIZE - 1) || address != zc->address) in tcp_zerocopy_receive()
1809 zc->length = min_t(unsigned long, zc->length, vma->vm_end - address); in tcp_zerocopy_receive()
1813 zc->length = min_t(u32, zc->length, inq); in tcp_zerocopy_receive()
1814 zap_len = zc->length & ~(PAGE_SIZE - 1); in tcp_zerocopy_receive()
1817 zc->recv_skip_hint = 0; in tcp_zerocopy_receive()
1819 zc->recv_skip_hint = zc->length; in tcp_zerocopy_receive()
1823 while (length + PAGE_SIZE <= zc->length) { in tcp_zerocopy_receive()
1824 if (zc->recv_skip_hint < PAGE_SIZE) { in tcp_zerocopy_receive()
1831 &seq, zc); in tcp_zerocopy_receive()
1837 if (zc->recv_skip_hint > 0) in tcp_zerocopy_receive()
1844 zc->recv_skip_hint = skb->len - offset; in tcp_zerocopy_receive()
1857 int remaining = zc->recv_skip_hint; in tcp_zerocopy_receive()
1864 zc->recv_skip_hint -= remaining; in tcp_zerocopy_receive()
1870 zc->recv_skip_hint -= PAGE_SIZE; in tcp_zerocopy_receive()
1875 &seq, zc); in tcp_zerocopy_receive()
1884 zc); in tcp_zerocopy_receive()
1896 if (length == zc->length) in tcp_zerocopy_receive()
1897 zc->recv_skip_hint = 0; in tcp_zerocopy_receive()
1899 if (!zc->recv_skip_hint && sock_flag(sk, SOCK_DONE)) in tcp_zerocopy_receive()
1902 zc->length = length; in tcp_zerocopy_receive()
3826 struct tcp_zerocopy_receive zc; in do_tcp_getsockopt() local
3833 if (len > sizeof(zc)) { in do_tcp_getsockopt()
3834 len = sizeof(zc); in do_tcp_getsockopt()
3838 if (copy_from_user(&zc, optval, len)) in do_tcp_getsockopt()
3841 err = tcp_zerocopy_receive(sk, &zc); in do_tcp_getsockopt()
3843 if (len == sizeof(zc)) in do_tcp_getsockopt()
3856 zc.err = sock_error(sk); in do_tcp_getsockopt()
3858 zc.inq = tcp_inq_hint(sk); in do_tcp_getsockopt()
3860 if (!err && copy_to_user(optval, &zc, len)) in do_tcp_getsockopt()