/freebsd/sbin/ipf/ipsend/ |
H A D | iptest.c | 46 \t\t-m mtu\t\tfake MTU to use when sending out\n\ 70 int mtu = 1500, tests = 0, pointtest = 0, c; in main() local 99 mtu = atoi(optarg); in main() 100 if (mtu < 28) in main() 102 fprintf(stderr, "mtu must be > 28\n"); in main() 155 printf("mtu: %d\n", mtu); in main() 160 ip_test1(dev, mtu, (ip_t *)ti, gwip, pointtest); in main() 163 ip_test2(dev, mtu, (ip_t *)ti, gwip, pointtest); in main() 166 ip_test3(dev, mtu, (ip_t *)ti, gwip, pointtest); in main() 169 ip_test4(dev, mtu, (ip_t *)ti, gwip, pointtest); in main() [all …]
|
H A D | iptests.c | 93 ip_test1(char *dev, int mtu, ip_t *ip, struct in_addr gwip, int ptest) in ip_test1() argument 258 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() 266 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() 274 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() 282 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() 304 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() 307 ip->ip_len = MIN(768 + 20, mtu - 68); in ip_test1() 311 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() 318 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() 336 (void) send_ip(nfd, mtu, ip, gwip, 1); in ip_test1() [all …]
|
H A D | ip.c | 77 send_ip(int nfd, int mtu, ip_t *ip, struct in_addr gwip, int frag) in send_ip() argument 132 if (!frag || (sizeof(*eh) + iplen < mtu)) in send_ip() 153 if (mtu < (hlen + 8)) { in send_ip() 154 fprintf(stderr, "mtu (%d) < ip header size (%d) + 8\n", in send_ip() 155 mtu, hlen); in send_ip() 196 if ((sent + (mtu - hlen)) >= iplen) in send_ip() 202 ts = (mtu - hlen); in send_ip() 235 send_tcp(int nfd, int mtu, ip_t *ip, struct in_addr gwip) in send_tcp() argument 278 return (send_ip(nfd, mtu, ip, gwip, 1)); in send_tcp() 286 send_udp(int nfd, int mtu, ip_t *ip, struct in_addr gwip) in send_udp() argument [all …]
|
H A D | ipresend.c | 56 \t\t-m mtu\t\tfake MTU to use when sending out\n\ 69 int mtu = 1500, c; in main() local 81 mtu = atoi(optarg); in main() 82 if (mtu < 28) in main() 84 fprintf(stderr, "mtu must be > 28\n"); in main() 124 printf("mtu: %d\n", mtu); in main() 126 return (ip_resend(dev, mtu, ipr, gwip, resend)); in main()
|
H A D | ipsend.c | 50 \t\t-m mtu\t\tfake MTU to use when sending out\n\ 120 send_packets(char *dev, int mtu, ip_t *ip, struct in_addr gwip) in send_packets() argument 127 return (send_packet(wfd, mtu, ip, gwip)); in send_packets() 173 int mtu = 1500, olen = 0, c, nonl = 0; in main() local 269 mtu = atoi(optarg); in main() 270 if (mtu < 28) in main() 272 fprintf(stderr, "mtu must be > 28\n"); in main() 404 printf("mtu: %d\n", mtu); in main() 412 return (do_socket(dev, mtu, ip, gwip)); in main() 414 return (send_packets(dev, mtu, ip, gwip)); in main()
|
/freebsd/share/man/man4/ |
H A D | gif.4 | 102 .Ss MTU Configuration and Path MTU Discovery 108 This means the MTU value configured on the interface will be ignored 115 This behavior prevents potential issues when the path MTU is 116 smaller than the interface MTU. 132 A tunnel interface always has an implicit smaller MTU for the inner protocol 134 Note that the interface MTU on a 139 is used as MTU for the outer protocol. 140 This means that the MTU for the inner protocol varies depending on the 142 If an outgoing packet bigger than the inner protocol MTU arrives at a 148 the inner is 20 octets smaller than the interface MTU. [all …]
|
H A D | vxlan.4 | 165 .Sh MTU 170 header, the resulting frame may be larger than the MTU of the 174 specification recommends the physical network MTU be configured 179 driver sets its MTU to usual ethernet MTU of 1500 bytes, reduced by 184 .Cm mtu 185 command may be used to set the fixed MTU size on the 188 current MTU of the physical network. 190 .Cm mtu 193 interface MTU on routing or address changes.
|
/freebsd/tools/tools/netrate/tcpp/ |
H A D | runit.pl | 25 print OUTFILE "kernel,tso,lro,mtu,cores,trial,"; 36 my ($kernel, $tso, $lro, $mtu) = @_; 38 $prefix = "$kernel,$tso,$lro,$mtu"; 41 system("ssh root\@hydra1 ifconfig cxgb0 $tso $lro mtu $mtu"); 43 system("ssh root\@hydra2 ifconfig cxgb0 $tso $lro mtu $mtu"); 50 # Frobbing MTU requires resetting the host cache, which we don't do, 51 # so don't frob MTU. 56 foreach $mtu (@mtu_options) { 60 test($kernel, $tso, $lro, $mtu);
|
/freebsd/share/examples/libifconfig/ |
H A D | setmtu.c | 42 int mtu; in main() local 48 " should be the MTU to set."); in main() 53 mtu = (int)strtol(argv[2], &ptr, 10); in main() 56 printf("New MTU: %d", mtu); in main() 64 if (ifconfig_set_mtu(lifh, ifname, mtu) == 0) { in main() 65 printf("Successfully changed MTU of %s to %d\n", ifname, mtu); in main() 78 warnx("Failed to set MTU (SIOCSIFMTU)\n"); in main() 81 "Failed to set MTU due to error in unexpected ioctl() call %lu. Error code: %i.\n", in main()
|
/freebsd/sys/netinet/ |
H A D | sctp_cc_functions.c | 65 (net->cwnd > (net->mtu - sizeof(struct sctphdr)))) { in sctp_enforce_cwnd_limit() 67 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) { in sctp_enforce_cwnd_limit() 68 net->cwnd = net->mtu - sizeof(struct sctphdr); in sctp_enforce_cwnd_limit() 83 net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND)); in sctp_set_initial_cc_param() 91 net->cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu; in sctp_set_initial_cc_param() 97 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) { in sctp_set_initial_cc_param() 98 net->cwnd = net->mtu - sizeof(struct sctphdr); in sctp_set_initial_cc_param() 160 (uint64_t)net->mtu * in sctp_cwnd_update_after_fr() 180 (uint64_t)net->mtu * in sctp_cwnd_update_after_fr() 190 if (net->ssthresh < net->mtu) { in sctp_cwnd_update_after_fr() [all …]
|
/freebsd/crypto/openssl/ssl/ |
H A D | d1_lib.c | 92 d1->mtu = 0; in dtls1_new() 177 size_t mtu; in dtls1_clear() local 192 mtu = s->d1->mtu; in dtls1_clear() 207 s->d1->mtu = mtu; in dtls1_clear() 263 s->d1->mtu = larg; in dtls1_ctrl() 369 size_t mtu; in dtls1_check_timeout_num() local 374 /* Reduce MTU after 2 unsuccessful retransmissions */ in dtls1_check_timeout_num() 377 mtu = in dtls1_check_timeout_num() 379 if (mtu < s->d1->mtu) in dtls1_check_timeout_num() 380 s->d1->mtu = mtu; in dtls1_check_timeout_num() [all …]
|
/freebsd/contrib/netbsd-tests/net/net/ |
H A D | t_mtudisc.sh | 39 atf_set "descr" "Tests for IPv4 Path MTU Dicorvery basic behavior" 101 # shmif0(mtu=1500) ----- shmif1(mtu=1280) shmif0(mtu=1500) ----- shmif0(mtu=1500) 113 # Set mtu of shmif0 to 1280 115 atf_check -s exit:0 rump.ifconfig shmif0 mtu 1280 144 # Test disabled path mtu discorvery 155 # Check path mtu size on remote server 162 # Test enabled path mtu discorvery 173 # Check path mtu size on remote server
|
/freebsd/contrib/ofed/libibverbs/man/ |
H A D | ibv_xsrq_pingpong.1 | 9 [\-p port] [\-d device] [\-i ib port] [\-s size] [\-m mtu] [\-c clients] 13 [\-p port] [\-d device] [\-i ib port] [\-s size] [\-m mtu] [\-c clients] 37 \fB\-m\fR, \fB\-\-mtu\fR=\fIMTU\fR 38 use path mtu of size \fIMTU\fR (default 2048)
|
/freebsd/crypto/openssl/ssl/quic/ |
H A D | quic_demux.c | 39 size_t mtu; member 85 demux->mtu = DEMUX_DEFAULT_MTU; in ossl_quic_demux_new() 122 unsigned int mtu; in ossl_quic_demux_set_bio() local 128 * Try to determine our MTU if possible. The BIO is not required to in ossl_quic_demux_set_bio() 129 * support this, in which case we remain at the last known MTU, or our in ossl_quic_demux_set_bio() 132 mtu = BIO_dgram_get_mtu(net_bio); in ossl_quic_demux_set_bio() 133 if (mtu >= QUIC_MIN_INITIAL_DGRAM_LEN) in ossl_quic_demux_set_bio() 134 ossl_quic_demux_set_mtu(demux, mtu); /* best effort */ in ossl_quic_demux_set_bio() 138 int ossl_quic_demux_set_mtu(QUIC_DEMUX *demux, unsigned int mtu) in ossl_quic_demux_set_mtu() argument 140 if (mtu < QUIC_MIN_INITIAL_DGRAM_LEN) in ossl_quic_demux_set_mtu() [all …]
|
/freebsd/usr.sbin/bluetooth/btpand/ |
H A D | client.c | 53 uint16_t mru, mtu; in client_init() local 116 len = sizeof(mtu); in client_init() 117 if (getsockopt(fd, SOL_L2CAP, SO_L2CAP_OMTU, &mtu, &len) == -1) { in client_init() 121 if (mtu < BNEP_MTU_MIN) { in client_init() 122 log_err("L2CAP OMTU too small (%d)", mtu); in client_init() 132 if (n < (mtu * 2)) { in client_init() 133 n = mtu * 2; in client_init() 140 n = mtu; in client_init() 154 chan->mtu = mtu; in client_init()
|
H A D | server.c | 159 uint16_t mru, mtu; in server_read() local 197 len = sizeof(mtu); in server_read() 198 if (getsockopt(fd, SOL_L2CAP, SO_L2CAP_OMTU, &mtu, &len) == -1) { in server_read() 203 if (mtu < BNEP_MTU_MIN) { in server_read() 204 log_err("L2CAP OMTU too small (%d)", mtu); in server_read() 216 if (n < (mtu * 2)) { in server_read() 217 n = mtu * 2; in server_read() 225 n = mtu; in server_read() 250 chan->mtu = mtu; in server_read()
|
/freebsd/contrib/ofed/opensm/opensm/ |
H A D | osm_sa_multipath_record.c | 102 1. No MTU required in sa_multipath_rec_apply_tavor_mtu_limit() 103 2. Required MTU < in sa_multipath_rec_apply_tavor_mtu_limit() 104 3. Required MTU = 1K or 512 or 256 in sa_multipath_rec_apply_tavor_mtu_limit() 105 4. Required MTU > 256 or 512 in sa_multipath_rec_apply_tavor_mtu_limit() 123 /* the largest MTU possible */ in sa_multipath_rec_apply_tavor_mtu_limit() 155 uint8_t mtu; in mpr_rcv_get_path_parms() local 180 mtu = ib_port_info_get_mtu_cap(p_pi); in mpr_rcv_get_path_parms() 185 Mellanox Tavor device performance is better using 1K MTU. in mpr_rcv_get_path_parms() 186 If required MTU and MTU selector are such that 1K is OK in mpr_rcv_get_path_parms() 188 port MTU with 1K. in mpr_rcv_get_path_parms() [all …]
|
H A D | osm_port.c | 190 uint8_t mtu; in osm_physp_calc_link_mtu() local 197 /* use the available MTU */ in osm_physp_calc_link_mtu() 198 mtu = ib_port_info_get_mtu_cap(&p_physp->port_info); in osm_physp_calc_link_mtu() 205 "MTU = %u. This Port MTU: %u\n", in osm_physp_calc_link_mtu() 208 remote_mtu, mtu); in osm_physp_calc_link_mtu() 210 if (mtu != remote_mtu) { in osm_physp_calc_link_mtu() 211 if (mtu > remote_mtu) in osm_physp_calc_link_mtu() 212 mtu = remote_mtu; in osm_physp_calc_link_mtu() 213 if (mtu != current_mtu) in osm_physp_calc_link_mtu() 215 "MTU mismatch between ports." in osm_physp_calc_link_mtu() [all …]
|
H A D | osm_sa_path_record.c | 112 1. No MTU required in sa_path_rec_apply_tavor_mtu_limit() 113 2. Required MTU < in sa_path_rec_apply_tavor_mtu_limit() 114 3. Required MTU = 1K or 512 or 256 in sa_path_rec_apply_tavor_mtu_limit() 115 4. Required MTU > 256 or 512 in sa_path_rec_apply_tavor_mtu_limit() 133 /* the largest MTU possible */ in sa_path_rec_apply_tavor_mtu_limit() 165 uint8_t mtu; in pr_rcv_get_path_parms() local 192 mtu = ib_port_info_get_mtu_cap(p_pi); in pr_rcv_get_path_parms() 197 Mellanox Tavor device performance is better using 1K MTU. in pr_rcv_get_path_parms() 198 If required MTU and MTU selector are such that 1K is OK in pr_rcv_get_path_parms() 200 port MTU with 1K. in pr_rcv_get_path_parms() [all …]
|
H A D | osm_sa_mcmember_record.c | 109 dest->mtu = src->mtu; in copy_from_create_mc_rec() 218 /* Fill in the mtu, rate, and packet lifetime selectors */ in mcmr_rcv_respond() 219 item->resp.mc_rec.mtu &= 0x3f; in mcmr_rcv_respond() 220 item->resp.mc_rec.mtu |= IB_PATH_SELECTOR_EXACTLY << 6; in mcmr_rcv_respond() 237 we make sure the following components provided match: MTU and RATE 254 mtu_sel = (uint8_t) (p_recvd_mcmember_rec->mtu >> 6); in validate_more_comp_fields() 256 mtu_required = (uint8_t) (p_recvd_mcmember_rec->mtu & 0x3F); in validate_more_comp_fields() 257 mtu_mgrp = (uint8_t) (p_mgrp->mcmember_rec.mtu & 0x3F); in validate_more_comp_fields() 259 case 0: /* Greater than MTU specified */ in validate_more_comp_fields() 262 "Requested mcast group has MTU %x, " in validate_more_comp_fields() [all …]
|
/freebsd/sys/dev/irdma/ |
H A D | icrdma.c | 161 * @l2params: destination, qos, tc, mtu info structure 235 * irdma_log_invalid_mtu - check mtu setting validity 236 * @mtu: mtu value 240 irdma_log_invalid_mtu(u16 mtu, struct irdma_sc_dev *dev) in irdma_log_invalid_mtu() argument 242 if (mtu < IRDMA_MIN_MTU_IPV4) in irdma_log_invalid_mtu() 244 "MTU setting [%d] too low for RDMA traffic. Minimum MTU is 576 for IPv4\n", in irdma_log_invalid_mtu() 245 mtu); in irdma_log_invalid_mtu() 246 else if (mtu < IRDMA_MIN_MTU_IPV6) in irdma_log_invalid_mtu() 248 "MTU setting [%d] too low for RDMA traffic. Minimum MTU is 1280 for IPv6\n", in irdma_log_invalid_mtu() 249 mtu); in irdma_log_invalid_mtu() [all …]
|
/freebsd/sys/netpfil/ipfw/nat64/ |
H A D | nat64_translate.c | 534 #define FRAGSZ(mtu) ((mtu) - sizeof(struct ip6_hdr) - sizeof(struct ip6_frag)) argument 537 struct mbufq *mq, struct mbuf *m, uint32_t mtu, uint16_t ip_id, in nat64_fragment6() argument 549 if (ip_off == 0 && plen <= mtu - hlen) { in nat64_fragment6() 578 /* The packet size exceeds interface MTU */ in nat64_fragment6() 584 len = FRAGSZ(mtu) & ~7; in nat64_fragment6() 644 nat64_icmp6_reflect(struct mbuf *m, uint8_t type, uint8_t code, uint32_t mtu, in nat64_icmp6_reflect() argument 753 icmp6->icmp6_mtu = htonl(mtu); in nat64_icmp6_reflect() 790 uint8_t code, uint16_t mtu, struct nat64_counters *stats, void *logdata) in nat64_icmp_reflect() argument 860 icmp->icmp_nextmtu = htons(mtu); in nat64_icmp_reflect() 907 uint32_t mtu; in nat64_icmp_translate() local [all …]
|
/freebsd/sys/dev/mlx5/mlx5_en/ |
H A D | mlx5_en_port_buffer.c | 124 /* xoff = ((301+2.16 * len [m]) * speed [Gbps] + 2.72 MTU [B]) */ 125 static u32 calculate_xoff(struct mlx5e_priv *priv, unsigned int mtu) in calculate_xoff() argument 137 xoff = (301 + 216 * priv->dcbx.cable_len / 100) * speed / 1000 + 272 * mtu / 100; in calculate_xoff() 175 * mtu: device's MTU 192 static int update_buffer_lossy(struct mlx5e_priv *priv, unsigned int mtu, in update_buffer_lossy() argument 240 u32 change, unsigned int mtu, in mlx5e_port_manual_buffer_config() argument 246 u32 xoff = calculate_xoff(priv, mtu); in mlx5e_port_manual_buffer_config() 274 err = update_buffer_lossy(priv, mtu, pfc->pfc_en, buffer, xoff, in mlx5e_port_manual_buffer_config() 286 err = update_buffer_lossy(priv, mtu, curr_pfc_en, prio2buffer, xoff, in mlx5e_port_manual_buffer_config()
|
/freebsd/sys/netinet6/ |
H A D | ip6_output.c | 396 * Type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and nd_ifinfo.linkmtu 419 u_long mtu; in ip6_output() local 660 mtu = 0; in ip6_output() 709 mtu = ifp->if_mtu; in ip6_output() 782 * mtu can be 0 and will be refined later. in ip6_output() 794 if ((error = IPSEC_OUTPUT(ipv6, ifp, m, inp, mtu == 0 ? in ip6_output() 795 ifp->if_mtu : mtu)) != 0) { in ip6_output() 940 /* Determine path MTU. */ in ip6_output() 941 ip6_getpmtu(ro_pmtu, ro != ro_pmtu, ifp, &ip6->ip6_dst, &mtu, fibnum, in ip6_output() 943 KASSERT(mtu > 0, ("%s:%d: mtu %ld, ro_pmtu %p ro %p ifp %p fibnum %u", in ip6_output() [all …]
|
/freebsd/crypto/openssl/test/ |
H A D | dtls_mtu_test.c | 80 /* For record MTU values between 500 and 539, call DTLS_get_data_mtu() in mtu_test() 81 * to query the payload MTU which will fit. */ in mtu_test() 86 TEST_info("%s%s MTU for record mtu %d = %lu", in mtu_test() 90 TEST_info("Cipher %s MTU %d", cs, 500 + i); in mtu_test() 112 /* DTLS_get_data_mtu() with record MTU 500+i returned mtus[i] ... */ in mtu_test() 117 * that made a record *larger* than the record MTU 500+j! in mtu_test() 127 * fits within the record MTU 500+i, so DTLS_get_data_mtu() in mtu_test()
|