Lines Matching refs:zc
1114 static int select_size(bool first_skb, bool zc) in select_size() argument
1116 if (zc) in select_size()
1183 bool zc = false; in tcp_sendmsg_locked() local
1201 zc = sk->sk_route_caps & NETIF_F_SG; in tcp_sendmsg_locked()
1202 if (!zc) in tcp_sendmsg_locked()
1285 linear = select_size(first_skb, zc); in tcp_sendmsg_locked()
1310 if (skb_availroom(skb) > 0 && !zc) { in tcp_sendmsg_locked()
1316 } else if (!zc) { in tcp_sendmsg_locked()
1748 struct tcp_zerocopy_receive *zc) in tcp_zerocopy_receive() argument
1750 unsigned long address = (unsigned long)zc->address; in tcp_zerocopy_receive()
1758 if (address & (PAGE_SIZE - 1) || address != zc->address) in tcp_zerocopy_receive()
1772 zc->length = min_t(unsigned long, zc->length, vma->vm_end - address); in tcp_zerocopy_receive()
1776 zc->length = min_t(u32, zc->length, tcp_inq(sk)); in tcp_zerocopy_receive()
1777 zc->length &= ~(PAGE_SIZE - 1); in tcp_zerocopy_receive()
1779 zap_page_range(vma, address, zc->length); in tcp_zerocopy_receive()
1781 zc->recv_skip_hint = 0; in tcp_zerocopy_receive()
1783 while (length + PAGE_SIZE <= zc->length) { in tcp_zerocopy_receive()
1784 if (zc->recv_skip_hint < PAGE_SIZE) { in tcp_zerocopy_receive()
1792 zc->recv_skip_hint = skb->len - offset; in tcp_zerocopy_receive()
1812 zc->recv_skip_hint -= PAGE_SIZE; in tcp_zerocopy_receive()
1825 if (length == zc->length) in tcp_zerocopy_receive()
1826 zc->recv_skip_hint = 0; in tcp_zerocopy_receive()
1828 if (!zc->recv_skip_hint && sock_flag(sk, SOCK_DONE)) in tcp_zerocopy_receive()
1831 zc->length = length; in tcp_zerocopy_receive()
3549 struct tcp_zerocopy_receive zc; in do_tcp_getsockopt() local
3554 if (len != sizeof(zc)) in do_tcp_getsockopt()
3556 if (copy_from_user(&zc, optval, len)) in do_tcp_getsockopt()
3559 err = tcp_zerocopy_receive(sk, &zc); in do_tcp_getsockopt()
3561 if (!err && copy_to_user(optval, &zc, len)) in do_tcp_getsockopt()