Lines Matching refs:cork

955 			    struct inet_cork *cork,  in __ip_append_data()  argument
965 struct ip_options *opt = cork->opt; in __ip_append_data()
975 struct rtable *rt = dst_rtable(cork->dst); in __ip_append_data()
983 mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize; in __ip_append_data()
984 paged = !!cork->gso_size; in __ip_append_data()
992 if (cork->length + length > maxnonfragsize - fragheaderlen) { in __ip_append_data()
1005 (!(flags & MSG_MORE) || cork->gso_size) && in __ip_append_data()
1050 cork->length += length; in __ip_append_data()
1052 hold_tskey = cork->tx_flags & SKBTX_ANY_TSTAMP && in __ip_append_data()
1182 skb_shinfo(skb)->tx_flags = cork->tx_flags; in __ip_append_data()
1183 cork->tx_flags = 0; in __ip_append_data()
1276 cork->length -= length; in __ip_append_data()
1284 static int ip_setup_cork(struct sock *sk, struct inet_cork *cork, in ip_setup_cork() argument
1294 cork->fragsize = ip_sk_use_pmtu(sk) ? in ip_setup_cork()
1297 if (!inetdev_valid_mtu(cork->fragsize)) in ip_setup_cork()
1305 if (!cork->opt) { in ip_setup_cork()
1306 cork->opt = kmalloc(sizeof(struct ip_options) + 40, in ip_setup_cork()
1308 if (unlikely(!cork->opt)) in ip_setup_cork()
1311 memcpy(cork->opt, &opt->opt, sizeof(struct ip_options) + opt->opt.optlen); in ip_setup_cork()
1312 cork->flags |= IPCORK_OPT; in ip_setup_cork()
1313 cork->addr = ipc->addr; in ip_setup_cork()
1316 cork->gso_size = ipc->gso_size; in ip_setup_cork()
1318 cork->dst = &rt->dst; in ip_setup_cork()
1322 cork->length = 0; in ip_setup_cork()
1323 cork->ttl = ipc->ttl; in ip_setup_cork()
1324 cork->tos = ipc->tos; in ip_setup_cork()
1325 cork->mark = ipc->sockc.mark; in ip_setup_cork()
1326 cork->priority = ipc->priority; in ip_setup_cork()
1327 cork->transmit_time = ipc->sockc.transmit_time; in ip_setup_cork()
1328 cork->tx_flags = 0; in ip_setup_cork()
1329 sock_tx_timestamp(sk, ipc->sockc.tsflags, &cork->tx_flags); in ip_setup_cork()
1359 err = ip_setup_cork(sk, &inet->cork.base, ipc, rtp); in ip_append_data()
1366 return __ip_append_data(sk, fl4, &sk->sk_write_queue, &inet->cork.base, in ip_append_data()
1371 static void ip_cork_release(struct inet_cork *cork) in ip_cork_release() argument
1373 cork->flags &= ~IPCORK_OPT; in ip_cork_release()
1374 kfree(cork->opt); in ip_cork_release()
1375 cork->opt = NULL; in ip_cork_release()
1376 dst_release(cork->dst); in ip_cork_release()
1377 cork->dst = NULL; in ip_cork_release()
1387 struct inet_cork *cork) in __ip_make_skb() argument
1394 struct rtable *rt = dst_rtable(cork->dst); in __ip_make_skb()
1434 if (cork->flags & IPCORK_OPT) in __ip_make_skb()
1435 opt = cork->opt; in __ip_make_skb()
1437 if (cork->ttl != 0) in __ip_make_skb()
1438 ttl = cork->ttl; in __ip_make_skb()
1447 iph->tos = (cork->tos != -1) ? cork->tos : READ_ONCE(inet->tos); in __ip_make_skb()
1456 ip_options_build(skb, opt, cork->addr, rt); in __ip_make_skb()
1459 skb->priority = (cork->tos != -1) ? cork->priority: READ_ONCE(sk->sk_priority); in __ip_make_skb()
1460 skb->mark = cork->mark; in __ip_make_skb()
1462 skb_set_delivery_time(skb, cork->transmit_time, SKB_CLOCK_MONOTONIC); in __ip_make_skb()
1464 skb_set_delivery_type_by_clockid(skb, cork->transmit_time, sk->sk_clockid); in __ip_make_skb()
1469 cork->dst = NULL; in __ip_make_skb()
1487 ip_cork_release(cork); in __ip_make_skb()
1524 struct inet_cork *cork) in __ip_flush_pending_frames() argument
1531 ip_cork_release(cork); in __ip_flush_pending_frames()
1536 __ip_flush_pending_frames(sk, &sk->sk_write_queue, &inet_sk(sk)->cork.base); in ip_flush_pending_frames()
1545 struct inet_cork *cork, unsigned int flags) in ip_make_skb() argument
1555 cork->flags = 0; in ip_make_skb()
1556 cork->addr = 0; in ip_make_skb()
1557 cork->opt = NULL; in ip_make_skb()
1558 err = ip_setup_cork(sk, cork, ipc, rtp); in ip_make_skb()
1562 err = __ip_append_data(sk, fl4, &queue, cork, in ip_make_skb()
1566 __ip_flush_pending_frames(sk, &queue, cork); in ip_make_skb()
1570 return __ip_make_skb(sk, fl4, &queue, cork); in ip_make_skb()