summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2007-03-20 13:15:20 +0000
committerbms <bms@FreeBSD.org>2007-03-20 13:15:20 +0000
commita243534ddeca344d053b1777b3f872a43e1d20e8 (patch)
treea973fe43b644a8ee09f5459e70581207b88eb344 /sys/netinet/raw_ip.c
parent626ae2ae346d88a1a5297fd817ae81992d5d56ce (diff)
downloadFreeBSD-src-a243534ddeca344d053b1777b3f872a43e1d20e8.zip
FreeBSD-src-a243534ddeca344d053b1777b3f872a43e1d20e8.tar.gz
Increase default size of raw IP send and receive buffers to the same as
udp_sendspace, to avoid a situation where jumbograms (datagrams > 9KB) are unnecessarily fragmented. A common use case for this is OSPF link-state database synchronization during adjacency bringup on a high speed network with a large MTU. It is not possible to auto-tune this setting until a socket is bound to a given interface, and because the laddr part of the inpcb tuple may be overridden, it makes no sense to do so. Applications may request a larger socket buffer size by using the SO_SENDBUF and SO_RECVBUF socket options. Certain applications such as Quagga ospfd do not probe for interface MTU and therefore do not increase SO_SENDBUF in this use case. XORP is not affected by this problem as it preemptively uses SO_SENDBUF and SO_RECVBUF to account for any possible additional latency in XRL IPC. PR: kern/108375 Requested by: Vladimir Ivanov MFC after: 1 week
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 51fe333..0c76d30 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -106,12 +106,6 @@ int (*ip_rsvp_vif)(struct socket *, struct sockopt *);
void (*ip_rsvp_force_done)(struct socket *);
/*
- * Nominal space allocated to a raw ip socket.
- */
-#define RIPSNDQ 8192
-#define RIPRCVQ 8192
-
-/*
* Raw interface to IP protocol.
*/
@@ -595,8 +589,8 @@ rip_ctlinput(int cmd, struct sockaddr *sa, void *vip)
}
}
-u_long rip_sendspace = RIPSNDQ;
-u_long rip_recvspace = RIPRCVQ;
+u_long rip_sendspace = 9216;
+u_long rip_recvspace = 9216;
SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW,
&rip_sendspace, 0, "Maximum outgoing raw IP datagram size");
OpenPOWER on IntegriCloud