Lines Matching refs:cork
962 struct inet_cork *cork, in __ip_append_data() argument
972 struct ip_options *opt = cork->opt; in __ip_append_data()
982 struct rtable *rt = (struct rtable *)cork->dst; in __ip_append_data()
990 mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize; in __ip_append_data()
991 paged = !!cork->gso_size; in __ip_append_data()
993 if (cork->tx_flags & SKBTX_ANY_SW_TSTAMP && in __ip_append_data()
1003 if (cork->length + length > maxnonfragsize - fragheaderlen) { in __ip_append_data()
1016 (!(flags & MSG_MORE) || cork->gso_size) && in __ip_append_data()
1052 cork->length += length; in __ip_append_data()
1174 skb_shinfo(skb)->tx_flags = cork->tx_flags; in __ip_append_data()
1175 cork->tx_flags = 0; in __ip_append_data()
1255 cork->length -= length; in __ip_append_data()
1261 static int ip_setup_cork(struct sock *sk, struct inet_cork *cork, in ip_setup_cork() argument
1276 if (!cork->opt) { in ip_setup_cork()
1277 cork->opt = kmalloc(sizeof(struct ip_options) + 40, in ip_setup_cork()
1279 if (unlikely(!cork->opt)) in ip_setup_cork()
1282 memcpy(cork->opt, &opt->opt, sizeof(struct ip_options) + opt->opt.optlen); in ip_setup_cork()
1283 cork->flags |= IPCORK_OPT; in ip_setup_cork()
1284 cork->addr = ipc->addr; in ip_setup_cork()
1287 cork->fragsize = ip_sk_use_pmtu(sk) ? in ip_setup_cork()
1290 if (!inetdev_valid_mtu(cork->fragsize)) in ip_setup_cork()
1293 cork->gso_size = ipc->gso_size; in ip_setup_cork()
1295 cork->dst = &rt->dst; in ip_setup_cork()
1299 cork->length = 0; in ip_setup_cork()
1300 cork->ttl = ipc->ttl; in ip_setup_cork()
1301 cork->tos = ipc->tos; in ip_setup_cork()
1302 cork->mark = ipc->sockc.mark; in ip_setup_cork()
1303 cork->priority = ipc->priority; in ip_setup_cork()
1304 cork->transmit_time = ipc->sockc.transmit_time; in ip_setup_cork()
1305 cork->tx_flags = 0; in ip_setup_cork()
1306 sock_tx_timestamp(sk, ipc->sockc.tsflags, &cork->tx_flags); in ip_setup_cork()
1336 err = ip_setup_cork(sk, &inet->cork.base, ipc, rtp); in ip_append_data()
1343 return __ip_append_data(sk, fl4, &sk->sk_write_queue, &inet->cork.base, in ip_append_data()
1355 struct inet_cork *cork; in ip_append_page() local
1371 cork = &inet->cork.base; in ip_append_page()
1372 rt = (struct rtable *)cork->dst; in ip_append_page()
1373 if (cork->flags & IPCORK_OPT) in ip_append_page()
1374 opt = cork->opt; in ip_append_page()
1380 mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize; in ip_append_page()
1386 if (cork->length + size > maxnonfragsize - fragheaderlen) { in ip_append_page()
1396 cork->length += size; in ip_append_page()
1471 cork->length -= size; in ip_append_page()
1476 static void ip_cork_release(struct inet_cork *cork) in ip_cork_release() argument
1478 cork->flags &= ~IPCORK_OPT; in ip_cork_release()
1479 kfree(cork->opt); in ip_cork_release()
1480 cork->opt = NULL; in ip_cork_release()
1481 dst_release(cork->dst); in ip_cork_release()
1482 cork->dst = NULL; in ip_cork_release()
1492 struct inet_cork *cork) in __ip_make_skb() argument
1499 struct rtable *rt = (struct rtable *)cork->dst; in __ip_make_skb()
1538 if (cork->flags & IPCORK_OPT) in __ip_make_skb()
1539 opt = cork->opt; in __ip_make_skb()
1541 if (cork->ttl != 0) in __ip_make_skb()
1542 ttl = cork->ttl; in __ip_make_skb()
1551 iph->tos = (cork->tos != -1) ? cork->tos : inet->tos; in __ip_make_skb()
1560 ip_options_build(skb, opt, cork->addr, rt); in __ip_make_skb()
1563 skb->priority = (cork->tos != -1) ? cork->priority: sk->sk_priority; in __ip_make_skb()
1564 skb->mark = cork->mark; in __ip_make_skb()
1565 skb->tstamp = cork->transmit_time; in __ip_make_skb()
1570 cork->dst = NULL; in __ip_make_skb()
1577 ip_cork_release(cork); in __ip_make_skb()
1614 struct inet_cork *cork) in __ip_flush_pending_frames() argument
1621 ip_cork_release(cork); in __ip_flush_pending_frames()
1626 __ip_flush_pending_frames(sk, &sk->sk_write_queue, &inet_sk(sk)->cork.base); in ip_flush_pending_frames()
1635 struct inet_cork *cork, unsigned int flags) in ip_make_skb() argument
1645 cork->flags = 0; in ip_make_skb()
1646 cork->addr = 0; in ip_make_skb()
1647 cork->opt = NULL; in ip_make_skb()
1648 err = ip_setup_cork(sk, cork, ipc, rtp); in ip_make_skb()
1652 err = __ip_append_data(sk, fl4, &queue, cork, in ip_make_skb()
1656 __ip_flush_pending_frames(sk, &queue, cork); in ip_make_skb()
1660 return __ip_make_skb(sk, fl4, &queue, cork); in ip_make_skb()