/net/rxrpc/ |
D | ar-error.c | 74 u32 mtu = serr->ee.ee_info; in rxrpc_UDP_error_report() local 76 _net("Rx Received ICMP Fragmentation Needed (%d)", mtu); in rxrpc_UDP_error_report() 79 if (mtu > 0 && peer->if_mtu == 65535 && mtu < peer->if_mtu) { in rxrpc_UDP_error_report() 80 peer->if_mtu = mtu; in rxrpc_UDP_error_report() 81 _net("I/F MTU %u", mtu); in rxrpc_UDP_error_report() 85 if (mtu == 0) in rxrpc_UDP_error_report() 86 mtu = ntohs(icmp_hdr(skb)->un.frag.mtu); in rxrpc_UDP_error_report() 88 if (mtu == 0) { in rxrpc_UDP_error_report() 90 if (mtu > 1500) { in rxrpc_UDP_error_report() 91 mtu >>= 1; in rxrpc_UDP_error_report() [all …]
|
D | ar-ack.c | 553 unsigned mtu; in rxrpc_extract_ackinfo() local 565 mtu = min(ntohl(ackinfo.rxMTU), ntohl(ackinfo.maxMTU)); in rxrpc_extract_ackinfo() 568 if (mtu < peer->maxdata) { in rxrpc_extract_ackinfo() 570 peer->maxdata = mtu; in rxrpc_extract_ackinfo() 571 peer->mtu = mtu + peer->hdrsize; in rxrpc_extract_ackinfo() 573 _net("Net MTU %u (maxdata %u)", peer->mtu, peer->maxdata); in rxrpc_extract_ackinfo() 839 int genbit, loop, nbit, ioc, ret, mtu; in rxrpc_process_call() local 1165 mtu = call->conn->trans->peer->if_mtu; in rxrpc_process_call() 1166 mtu -= call->conn->trans->peer->hdrsize; in rxrpc_process_call() 1167 ackinfo.maxMTU = htonl(mtu); in rxrpc_process_call()
|
/net/netfilter/ipvs/ |
D | ip_vs_xmit.c | 225 int mtu; in ip_vs_bypass_xmit() local 244 mtu = dst_mtu(&rt->u.dst); in ip_vs_bypass_xmit() 245 if ((skb->len > mtu) && (iph->frag_off & htons(IP_DF))) { in ip_vs_bypass_xmit() 247 icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); in ip_vs_bypass_xmit() 289 int mtu; in ip_vs_bypass_xmit_v6() local 308 mtu = dst_mtu(&rt->u.dst); in ip_vs_bypass_xmit_v6() 309 if (skb->len > mtu) { in ip_vs_bypass_xmit_v6() 311 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); in ip_vs_bypass_xmit_v6() 356 int mtu; in ip_vs_nat_xmit() local 375 mtu = dst_mtu(&rt->u.dst); in ip_vs_nat_xmit() [all …]
|
/net/sched/ |
D | sch_teql.c | 197 || dev->mtu < m->dev->mtu) in teql_qdisc_init() 206 if (dev->mtu < m->dev->mtu) in teql_qdisc_init() 207 m->dev->mtu = dev->mtu; in teql_qdisc_init() 214 m->dev->mtu = dev->mtu; in teql_qdisc_init() 353 int mtu = 0xFFFE; in teql_master_open() local 368 if (slave->mtu < mtu) in teql_master_open() 369 mtu = slave->mtu; in teql_master_open() 385 m->dev->mtu = mtu; in teql_master_open() 414 if (new_mtu > qdisc_dev(q)->mtu) in teql_master_mtu() 419 dev->mtu = new_mtu; in teql_master_mtu() [all …]
|
D | sch_tbf.c | 105 u32 mtu; member 172 if (ptoks > (long)q->mtu) in tbf_dequeue() 173 ptoks = q->mtu; in tbf_dequeue() 221 q->ptokens = q->mtu; in tbf_reset() 270 if (ptab->data[n] > qopt->mtu) break; in tbf_change() 292 q->mtu = qopt->mtu; in tbf_change() 296 q->ptokens = q->mtu; in tbf_change() 359 opt.mtu = q->mtu; in tbf_dump()
|
/net/ipv6/ |
D | xfrm6_output.c | 32 int mtu, ret = 0; in xfrm6_tunnel_check_size() local 35 mtu = dst_mtu(dst); in xfrm6_tunnel_check_size() 36 if (mtu < IPV6_MIN_MTU) in xfrm6_tunnel_check_size() 37 mtu = IPV6_MIN_MTU; in xfrm6_tunnel_check_size() 39 if (!skb->local_df && skb->len > mtu) { in xfrm6_tunnel_check_size() 41 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); in xfrm6_tunnel_check_size()
|
D | ip6_output.c | 174 skb->dst->dev->mtu : dst_mtu(skb->dst); in ip6_skb_dst_mtu() 209 u32 mtu; in ip6_xmit() local 276 mtu = dst_mtu(dst); in ip6_xmit() 277 if ((skb->len <= mtu) || skb->local_df || skb_is_gso(skb)) { in ip6_xmit() 287 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); in ip6_xmit() 630 unsigned int mtu, hlen, left, len; in ip6_fragment() local 639 mtu = ip6_skb_dst_mtu(skb); in ip6_fragment() 647 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev); in ip6_fragment() 654 if (np && np->frag_size < mtu) { in ip6_fragment() 656 mtu = np->frag_size; in ip6_fragment() [all …]
|
D | ip6_tunnel.c | 425 __u32 mtu; in ip6_tnl_err() local 465 mtu = *info - offset; in ip6_tnl_err() 466 if (mtu < IPV6_MIN_MTU) in ip6_tnl_err() 467 mtu = IPV6_MIN_MTU; in ip6_tnl_err() 468 t->dev->mtu = mtu; in ip6_tnl_err() 470 if ((len = sizeof (*ipv6h) + ntohs(ipv6h->payload_len)) > mtu) { in ip6_tnl_err() 473 rel_info = mtu; in ip6_tnl_err() 856 int mtu; in ip6_tnl_xmit2() local 881 mtu = dst_mtu(dst) - sizeof (*ipv6h); in ip6_tnl_xmit2() 884 mtu -= 8; in ip6_tnl_xmit2() [all …]
|
D | sit.c | 550 int mtu; in ipip6_tunnel_xmit() local 640 mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); in ipip6_tunnel_xmit() 642 mtu = skb->dst ? dst_mtu(skb->dst) : dev->mtu; in ipip6_tunnel_xmit() 644 if (mtu < 68) { in ipip6_tunnel_xmit() 649 if (mtu < IPV6_MIN_MTU) in ipip6_tunnel_xmit() 650 mtu = IPV6_MIN_MTU; in ipip6_tunnel_xmit() 652 skb->dst->ops->update_pmtu(skb->dst, mtu); in ipip6_tunnel_xmit() 654 if (skb->len > mtu) { in ipip6_tunnel_xmit() 655 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev); in ipip6_tunnel_xmit() 705 if (mtu > IPV6_MIN_MTU) in ipip6_tunnel_xmit() [all …]
|
D | esp6.c | 336 static u32 esp6_get_mtu(struct xfrm_state *x, int mtu) in esp6_get_mtu() argument 343 mtu -= x->props.header_len + crypto_aead_authsize(esp->aead); in esp6_get_mtu() 344 rem = mtu & (align - 1); in esp6_get_mtu() 345 mtu &= ~(align - 1); in esp6_get_mtu() 349 mtu -= blksize - padsize; in esp6_get_mtu() 350 mtu += min_t(u32, blksize - padsize, rem); in esp6_get_mtu() 353 return mtu - 2; in esp6_get_mtu()
|
D | route.c | 87 static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu); 114 static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) in ip6_rt_blackhole_update_pmtu() argument 921 static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu) in ip6_rt_update_pmtu() argument 925 if (mtu < dst_mtu(dst) && rt6->rt6i_dst.plen == 128) { in ip6_rt_update_pmtu() 927 if (mtu < IPV6_MIN_MTU) { in ip6_rt_update_pmtu() 928 mtu = IPV6_MIN_MTU; in ip6_rt_update_pmtu() 931 dst->metrics[RTAX_MTU-1] = mtu; in ip6_rt_update_pmtu() 938 static inline unsigned int ipv6_advmss(struct net *net, unsigned int mtu) in ipv6_advmss() argument 940 mtu -= sizeof(struct ipv6hdr) + sizeof(struct tcphdr); in ipv6_advmss() 942 if (mtu < net->ipv6.sysctl.ip6_rt_min_advmss) in ipv6_advmss() [all …]
|
/net/ipv4/ |
D | ip_output.c | 220 skb->dst->dev->mtu : dst_mtu(skb->dst); in ip_skb_dst_mtu() 440 unsigned int mtu, hlen, left, len, ll_rs, pad; in ip_fragment() local 467 mtu = dst_mtu(&rt->u.dst) - hlen; /* Size of data space */ in ip_fragment() 482 if (first_len - hlen > mtu || in ip_fragment() 490 if (frag->len > mtu || in ip_fragment() 578 mtu -= pad; in ip_fragment() 594 if (len > mtu) in ip_fragment() 595 len = mtu; in ip_fragment() 723 int transhdrlen, int mtu, unsigned int flags) in ip_ufo_append_data() argument 757 skb_shinfo(skb)->gso_size = mtu - fragheaderlen; in ip_ufo_append_data() [all …]
|
D | ip_gre.c | 332 dev->mtu = ipgre_tunnel_bind_dev(dev); in ipgre_tunnel_locate() 621 int mtu; in ipgre_tunnel_xmit() local 708 mtu = dst_mtu(&rt->u.dst) - dev->hard_header_len - tunnel->hlen; in ipgre_tunnel_xmit() 710 mtu = skb->dst ? dst_mtu(skb->dst) : dev->mtu; in ipgre_tunnel_xmit() 713 skb->dst->ops->update_pmtu(skb->dst, mtu); in ipgre_tunnel_xmit() 719 mtu < ntohs(old_iph->tot_len)) { in ipgre_tunnel_xmit() 720 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); in ipgre_tunnel_xmit() 729 if (rt6 && mtu < dst_mtu(skb->dst) && mtu >= IPV6_MIN_MTU) { in ipgre_tunnel_xmit() 734 skb->dst->metrics[RTAX_MTU-1] = mtu; in ipgre_tunnel_xmit() 738 if (mtu >= IPV6_MIN_MTU && mtu < skb->len - tunnel->hlen + gre_hlen) { in ipgre_tunnel_xmit() [all …]
|
D | xfrm4_output.c | 23 int mtu, ret = 0; in xfrm4_tunnel_check_size() local 33 mtu = dst_mtu(dst); in xfrm4_tunnel_check_size() 34 if (skb->len > mtu) { in xfrm4_tunnel_check_size() 35 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); in xfrm4_tunnel_check_size()
|
D | ipip.c | 404 int mtu; in ipip_tunnel_xmit() local 448 mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); in ipip_tunnel_xmit() 450 mtu = skb->dst ? dst_mtu(skb->dst) : dev->mtu; in ipip_tunnel_xmit() 452 if (mtu < 68) { in ipip_tunnel_xmit() 458 skb->dst->ops->update_pmtu(skb->dst, mtu); in ipip_tunnel_xmit() 462 if ((old_iph->frag_off&htons(IP_DF)) && mtu < ntohs(old_iph->tot_len)) { in ipip_tunnel_xmit() 463 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); in ipip_tunnel_xmit() 567 dev->mtu = tdev->mtu - sizeof(struct iphdr); in ipip_tunnel_bind_dev() 691 dev->mtu = new_mtu; in ipip_tunnel_change_mtu() 710 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); in ipip_tunnel_setup()
|
D | esp4.c | 385 static u32 esp4_get_mtu(struct xfrm_state *x, int mtu) in esp4_get_mtu() argument 392 mtu -= x->props.header_len + crypto_aead_authsize(esp->aead); in esp4_get_mtu() 393 rem = mtu & (align - 1); in esp4_get_mtu() 394 mtu &= ~(align - 1); in esp4_get_mtu() 402 mtu -= blksize - 4; in esp4_get_mtu() 403 mtu += min_t(u32, blksize - 4, rem); in esp4_get_mtu() 407 mtu += min_t(u32, IPV4_BEET_PHMAXLEN, rem); in esp4_get_mtu() 411 return mtu - 2; in esp4_get_mtu()
|
/net/bridge/ |
D | br_if.c | 329 int mtu = 0; in br_min_mtu() local 334 mtu = ETH_DATA_LEN; in br_min_mtu() 337 if (!mtu || p->dev->mtu < mtu) in br_min_mtu() 338 mtu = p->dev->mtu; in br_min_mtu() 341 return mtu; in br_min_mtu()
|
/net/appletalk/ |
D | dev.c | 12 static int ltalk_change_mtu(struct net_device *dev, int mtu) in ltalk_change_mtu() argument 31 dev->mtu = LTALK_MTU; in ltalk_setup()
|
/net/8021q/ |
D | vlan_netlink.c | 128 dev->mtu = real_dev->mtu; in vlan_newlink() 129 else if (dev->mtu > real_dev->mtu) in vlan_newlink()
|
/net/tipc/ |
D | eth_media.c | 167 tb_ptr->mtu = dev->mtu; in enable_bearer() 211 eb_ptr->bearer->mtu = dev->mtu; in recv_notification()
|
/net/bluetooth/rfcomm/ |
D | core.c | 282 d->mtu = RFCOMM_DEFAULT_MTU; in rfcomm_dlc_clear_state() 393 d->mtu = s->mtu; in __rfcomm_dlc_open() 492 BT_DBG("dlc %p mtu %d len %d", d, d->mtu, len); in rfcomm_dlc_send() 494 if (len > d->mtu) in rfcomm_dlc_send() 573 s->mtu = RFCOMM_DEFAULT_MTU; in rfcomm_session_add() 828 BT_DBG("%p cr %d dlci %d mtu %d", s, cr, d->dlci, d->mtu); in rfcomm_send_pn() 854 pn->mtu = htobs(channel_mtu); in rfcomm_send_pn() 856 pn->mtu = htobs(d->mtu); in rfcomm_send_pn() 1274 d, d->state, d->dlci, pn->mtu, pn->flow_ctrl, pn->credits); in rfcomm_apply_pn() 1290 d->mtu = btohs(pn->mtu); in rfcomm_apply_pn() [all …]
|
/net/bluetooth/cmtp/ |
D | core.c | 218 if (!(nskb = alloc_skb(session->mtu, GFP_ATOMIC))) { in cmtp_process_transmit() 226 if ((tail = (session->mtu - nskb->len)) < 5) { in cmtp_process_transmit() 229 tail = session->mtu; in cmtp_process_transmit() 346 session->mtu = min_t(uint, l2cap_pi(sock->sk)->omtu, l2cap_pi(sock->sk)->imtu); in cmtp_add_connection() 348 BT_DBG("mtu %d", session->mtu); in cmtp_add_connection()
|
/net/netfilter/ |
D | xt_TCPMSS.c | 156 u_int32_t mtu = ~0U; in tcpmss_reverse_mtu() local 170 mtu = dst_mtu(&rt->u.dst); in tcpmss_reverse_mtu() 173 return mtu; in tcpmss_reverse_mtu()
|
/net/bluetooth/ |
D | sco.c | 119 conn->mtu = hdev->sco_mtu; in sco_conn_add() 121 conn->mtu = 60; in sco_conn_add() 236 if (len > conn->mtu) in sco_send_frame() 241 count = min_t(unsigned int, conn->mtu, len); in sco_send_frame() 692 opts.mtu = sco_pi(sk)->conn->mtu; in sco_sock_getsockopt_old() 694 BT_DBG("mtu %d", opts.mtu); in sco_sock_getsockopt_old()
|
/net/802/ |
D | fddi.c | 174 dev->mtu = new_mtu; in fddi_change_mtu() 194 dev->mtu = FDDI_K_SNAP_DLEN; /* Assume max payload of 802.2 SNAP frame */ in fddi_setup()
|