• Home
  • Raw
  • Download

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()
1774 static int tcp_copy_straggler_data(struct tcp_zerocopy_receive *zc, in tcp_copy_straggler_data() argument
1778 unsigned long copy_address = (unsigned long)zc->copybuf_address; in tcp_copy_straggler_data()
1783 if (copy_address != zc->copybuf_address) in tcp_copy_straggler_data()
1793 zc->recv_skip_hint -= copylen; in tcp_copy_straggler_data()
1799 static int tcp_zerocopy_handle_leftover_data(struct tcp_zerocopy_receive *zc, in tcp_zerocopy_handle_leftover_data() argument
1805 u32 offset, copylen = min_t(u32, copybuf_len, zc->recv_skip_hint); in tcp_zerocopy_handle_leftover_data()
1815 zc->copybuf_len = tcp_copy_straggler_data(zc, skb, copylen, &offset, in tcp_zerocopy_handle_leftover_data()
1817 return zc->copybuf_len < 0 ? 0 : copylen; in tcp_zerocopy_handle_leftover_data()
1826 struct tcp_zerocopy_receive *zc) in tcp_zerocopy_vm_insert_batch() argument
1845 zc->recv_skip_hint += bytes_not_mapped; in tcp_zerocopy_vm_insert_batch()
1851 struct tcp_zerocopy_receive *zc) in tcp_zerocopy_receive() argument
1854 unsigned long address = (unsigned long)zc->address; in tcp_zerocopy_receive()
1855 s32 copybuf_len = zc->copybuf_len; in tcp_zerocopy_receive()
1868 zc->copybuf_len = 0; in tcp_zerocopy_receive()
1870 if (address & (PAGE_SIZE - 1) || address != zc->address) in tcp_zerocopy_receive()
1885 vma_len = min_t(unsigned long, zc->length, vma->vm_end - address); in tcp_zerocopy_receive()
1890 zc->length = aligned_len; in tcp_zerocopy_receive()
1891 zc->recv_skip_hint = 0; in tcp_zerocopy_receive()
1893 zc->length = avail_len; in tcp_zerocopy_receive()
1894 zc->recv_skip_hint = avail_len; in tcp_zerocopy_receive()
1898 while (length + PAGE_SIZE <= zc->length) { in tcp_zerocopy_receive()
1899 if (zc->recv_skip_hint < PAGE_SIZE) { in tcp_zerocopy_receive()
1908 &seq, zc); in tcp_zerocopy_receive()
1914 if (zc->recv_skip_hint > 0) in tcp_zerocopy_receive()
1921 zc->recv_skip_hint = skb->len - offset; in tcp_zerocopy_receive()
1927 int remaining = zc->recv_skip_hint; in tcp_zerocopy_receive()
1934 zc->recv_skip_hint -= remaining; in tcp_zerocopy_receive()
1940 zc->recv_skip_hint -= PAGE_SIZE; in tcp_zerocopy_receive()
1945 &seq, zc); in tcp_zerocopy_receive()
1954 zc); in tcp_zerocopy_receive()
1960 copylen = tcp_zerocopy_handle_leftover_data(zc, sk, skb, &seq, in tcp_zerocopy_receive()
1971 if (length == zc->length) in tcp_zerocopy_receive()
1972 zc->recv_skip_hint = 0; in tcp_zerocopy_receive()
1974 if (!zc->recv_skip_hint && sock_flag(sk, SOCK_DONE)) in tcp_zerocopy_receive()
1977 zc->length = length; in tcp_zerocopy_receive()
3935 struct tcp_zerocopy_receive zc = {}; in do_tcp_getsockopt() local
3943 if (len > sizeof(zc)) { in do_tcp_getsockopt()
3944 len = sizeof(zc); in do_tcp_getsockopt()
3948 if (copy_from_user(&zc, optval, len)) in do_tcp_getsockopt()
3951 err = tcp_zerocopy_receive(sk, &zc); in do_tcp_getsockopt()
3966 zc.err = sock_error(sk); in do_tcp_getsockopt()
3968 zc.inq = tcp_inq_hint(sk); in do_tcp_getsockopt()
3970 if (!err && copy_to_user(optval, &zc, len)) in do_tcp_getsockopt()